Skip to content

Instantly share code, notes, and snippets.

@mbohun
Created October 15, 2023 03:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mbohun/54e3ef90a35fad2d5a5e9861fd1fdc7d to your computer and use it in GitHub Desktop.
Save mbohun/54e3ef90a35fad2d5a5e9861fd1fdc7d to your computer and use it in GitHub Desktop.
Okular certutils digital_sign
  1. create a new certificate with certutil command:
    certutil -S \
    -s "CN=[ your full name ],O= [ Business or School ],OU=[ Deparment or position ],L= [ Location ],ST=[ State ],C= [ Country code ],E= [ your email ]" \
    -g 2048 \
    -d sql:$HOME/.pki/nssdb \
    -n [ new name of certificate ] \
    -x \
    -t "Cu,Cu,Cu" \
    -p 405-555-5555 \
    --email [ your email ] \
    -m 1234
    
  2. List the created certificate:
    certutil -d sql:$HOME/.pki/nssdb -L
    
  3. Open Okular and go to: Settings > configure backends > PDF
  4. In the section: Certificate database, choose Custom and enter this path: $HOME/.pki/nssdb
  5. Apply and Restart Okular, and then you'd see the available certificate in the options of step 4 to sign digitally.

REFERENCES:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment