[xmlsec] nss integration error

Mazola Winstrol mazofeifer at gmail.com
Tue Oct 13 20:26:41 PDT 2015


Hello,

I'm new to xmlsec.

I'm trying to sign a xml using nss engine.

I'm using the code base of the example "sign a xml with 509 certificate (
https://www.aleksey.com/xmlsec/api/xmlsec-examples-sign-x509.html)"
with some changes:


   - The initialization code include the required initialization code for
   the nss engine;
   - For the steps of loading the private key and certificate, i replaced
   the generic functions "xmlSecCryptoAppKeyLoad" and
   "xmlSecCryptoAppKeyCertLoad" with the "xmlSecNssAppKeyLoadSECItem" and
   "xmlSecNssAppKeyCertLoadSECItem" (my application already has a reference to
   a CERTCertificate object at the time of the document signing).

All the steps are performed successfully.

The error occurs when executing the function "xmlSecDSigCtxSign". I get
function result of -1 and the error reporting bellow:

file: xmldsig.c
line: 871
func: xmlSecDSigCtxProcessKeyInfoNode
errorObject:
errorSubject:
reason: 45
msg:
-------------------------------
file: xmldsig.c
line: 565
func: xmlSecDSigCtxProcessSignatureNode
errorObject:
errorSubject: xmlSecDSigCtxProcessKeyInfoNode
reason: 1
msg:
-------------------------------
file: xmldsig.c
line: 303
func: xmlSecDSigCtxSign
errorObject:
errorSubject: xmlSecDSigCtxSignatureProcessNode
reason: 1
msg:
-------------------------------


What may be the cause of the error?
Best regards
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.aleksey.com/pipermail/xmlsec/attachments/20151014/8cd5164d/attachment.html>


More information about the xmlsec mailing list