Ubuntu – How to digitally sign documents in OpenOffice under Ubuntu

certificatesopenoffice.orgsignature

On Ubuntu 19.04, Libreoffice seems to be there, but when I clicked, all the apps seem to be missing (like the word processor and the spreadsheet). So I first installed OpenOffice. Then I figured out that I could install Libreoffice as well:

sudo apt install libreoffice

so I now can verify that both have the same issue.

Both Openoffice and Libreoffice have an option claiming to digitally sign a document.

So I created a certificate using instructions from this site: https://websiteforstudents.com/self-signed-certificates-ubuntu-17-04-17-10/
Here is the shell script I wrote to do it so I would not forget the steps:

#! /bin/bash
# see https://websiteforstudents.com/self-signed-certificates-ubuntu-17-04-17-10/

name=dbk
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
days=365
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.*

OpenOffice still didn't find the certificate or offer me any way to select a directory. In the wiki for openoffice, I found a page claiming there are 4 ways to select the directory where OpenOffice will look:
https://wiki.openoffice.org/wiki/How_to_use_digital_Signatures

One of those ways would be to set an environment variable:

export MOZILLA_CERTIFICATE_FOLDER=~/cert

This didn't work either.
In Libreoffice, I can see an option to start a certificate manager.
When I click, I get the following window.

enter image description here

I can click on the certificate in the cert directory but the open button is not clickable.

How can I get either word processor to find the certificate that I created in ~/cert, or is there something wrong with the steps I used to create it?

Best Answer

To date, I have not found any solution for digitally signing under OpenOffice or LibreOffice. It's really too bad as these open source products are great, but there is zero support for this issue.

I am using a commercial product (Master PDF 5), which is available free but watermarks pdfs. I'm not thrilled but for now it does the job.

Related Question