[xmlsec] Signing xml using etoken

Ivan Barrera A. ivan.barrera at will.cl
Fri Jun 27 15:24:54 PDT 2008

Hi !

I've been fighting the last week on trying to sign xmldocuments, using a
cert stored on an etoken. (aladdin 32K).
Im using the lib /usr/lib/libeTPkcs11.so provided by aladdin, and trying
to sign the document in any way.

So far, ive tried openssl, and nss with no luck. Using openssl alone, i
can get the system to sign smime documents using the token (  openssl
smime -sign -engine pkcs11 -in test.xml -out a.xml -signer my-cert.pem
-keyform engine -inkey
And adding the etoken lib to nss :
modutil -list gives
  2. eToken
        library name: /usr/lib/libeTPkcs11.so
         slots: 17 slots attached
        status: loaded

         slot: AKS ifdh 00 00
        token: eToken

However, when i try to sign anything using xmlsec1, i only get

# xmlsec1 --sign --crypto nss   --output a.xml test4.xml
library function failed: ;last nss error=0 (0x00000000)
is not found: ;last nss error=0 (0x00000000)
library function failed: ;last nss error=0 (0x00000000)
library function failed: ;last nss error=0 (0x00000000)
Error: signature failed
Error: failed to sign file "test4.xml"

Ive tried using keyname, keyvalue, keys.xml file. Nothing worked.  Most
probably, im doing something wrong.
Someone has done , or know how can i achieve this ?

BTW, Running on fedora core 9, using latest openct/pcscd/xmlsec.

More information about the xmlsec mailing list