Signing Documents
Before you can sign documents in OpenOffice (version 2.0 and later) you need to add/import your client certificate. Depending on your OS you firts must add this in the MS Crypto engine (Windows) or you should set a environment variable directing to your Mozilla product which includes your key in it's profile (Solaris, Linux).
Linux/Solaris: You need to export your thunderbird/firefox profile path in the environment variable MOZILLA_CERTIFICATE_FOLDER. For example add this into your ~/.bashrc:
export MOZILLA_CERTIFICATE_FOLDER=~/.mozilla/firefox/Mzg25Tns.default
Please see the proposed solution from OpenOffice: http://wiki.services.openoffice.org/wiki/Certificate_Detection
Windows: In Windows open the "Control Panel-Internet options-Content-Certificates" and add your certificate and your key-pair (normaly one p12 file) to your own certificates (in german Windows installations it's called "Systemsteuerung-Internetoptionen-Inhalte-Zertifikate...").
If you don't already have P12 file with your key-pair and the client certificat in it, you first need to export this out of your browser where it was generated. This is very easily done in firefox (make a "backup" of your own certificates).
Generally: After that you can import your cert into OOo. Follow the instructions in the "File/Digital Signatures..." menue. A german howto you can find at
http://de.openoffice.org/doc/howto_2_0/office/signing.html Signing OOo documents (german article)
See also:
OpenOffice 2.0 supports signing and encryption. See http://specs.openoffice.org/appwide/security/Electronic_Signatures_and_Security.sxw (openoffice format, or a pdf copy at http://bcn.boulder.co.us/~neal/i2/OpenOffice_Electronic_Signatures_and_Security.pdf) for the spec, design details, and a competitive analysis
Verifying Documents
If you want to automatically verify the signatures on OpenOffice documents:
Download XMLSec: http://www.aleksey.com/xmlsec/download.html
Put a CaBundle into the file /etc/ssl/cert.pem
> unzip Document.odt > xmlsec1 --verify META-INF/documentsignatures.xml OK SignedInfo References (ok/all): 5/5 Manifests References (ok/all): 0/0