How to sign a document on linux

asked 2019-10-01 21:37:03 +0200

updated 2019-10-01 21:40:41 +0200

The instructions to digitally sign a document are woefully inadequate. I did the following:

# see
openssl genrsa -aes128 -out $name.key 2048 #generate a key
#best to generate without a passphrase, so next command removes it
openssl rsa -in $name.key -out $name.key
# create a certificate signing request. This one is good for a year
openssl req -new -days $days -key $name.key -out $name.csr

openssl x509 -in $name.csr -out $name.crt -req -signkey $name.key -days $days

#make it readable only to you, to protect it
chmod 400 $name.*

In Libreoffice, I can click on File->DigitalSignatures and a requester comes up with an empty list. I can start Certificate manager and see my self-signed certificate on the machine. So it's there.

I could export it from the certificate manager, but that would just put it into a different directory. The certificate is already in my home directory under directory cert: /myhome/cert

I also exported


which is the directory where the certificate is, but Libreoffice does not find it. How exactly am I supposed to tell libreoffice where the certificate is? LibreOffice always shows a blank list of certificates to sign with.

edit retag flag offensive close merge delete