Joined: 09 Sep 2003
Location: Troyes France
|Posted: Wed Aug 02, 2006 10:04 am Post subject:
|For completion of previous post you can also find in OpenOffice Wiki, an article on digital signature :
How to use digital Signatures [url]http://wiki.services.openoffice.org/wiki/How_to_use_digital_Signatures [/url]
I am not sure i will use digital signature architecture because I don't really trust it. Under Windows and under Linux when I sign a document the OS doesn't ask me for a password and I don't like that ! That means only user account passwords are protection : if you are logged and not in front of your computer, every body can sign for you. For me it's a weakness (for OS not for OOo).
It would be great if anybody can confirm or infirm that : perhaps my certificate is not good !
Certificate management by OS or Firefox is weak as I said, but what about OOo ? I absolutly don't like management with the MOZILLA_CERTIFICATE_FOLDER environment variable under Linux. Do you know how I manage it at the first time ? I change the script <OOo2.0>/program/soffice to export this variable. This was the weaker thing I can do ! Now everybody with an account on my computer can sign for me !!! Of course I can manage it an other way but it's the first idea I have and I don't see why other could not have the same idea.
I have written code in OOoBAsic but I never obtain the certificate with this code and I don't know why. Because I don't want to go further with this API I give this code :
oDocumentDigitalSignatures = createUnoService( "com.sun.star.security.DocumentDigitalSignatures" )
'prints out : documentsignatures.xml
'prints out : macrosignatures.xml
'prints out : packagesignatures.xml
Dim xXMLSecurityContext as object
xXMLSecurityContext = createUnoService( "com.sun.star.xml.crypto.XMLSecurityContext" )
Dim Env as object
'Doesn't work : Env = xXMLSecurityContext. getSecurityEnvironment
'prints out com.sun.star.xml.security.bridge.xmlsec.XMLSecurityContext_MSCryptImpl under Windows
'prints out com.sun.star.xml.security.bridge.xmlsec.XMLSecurityContext_NssImpl under Linux
Dim xSecurityEnvironment as Object
xSecurityEnvironment = createUnoService( "com.sun.star.xml.crypto.SecurityEnvironment" )
'prints out Microsoft Crypto API
'prints out Unknown Token under Linux !
Dim i as Integer
Dim Certificates() as Object
Certificates() = xSecurityEnvironment.getPersonalCertificates()
'prints out 0 means O certificate !
'For i = 0 To lbound(Certificates())
Dim Certificat as Object
Linux & Windows OOo3.0
UNO & C++ : WIKI