nss integration error

Mazola Winstrol <[email protected]>
Newsgroups gmane.text.xml.xmlsec
Message-ID <CAA5Zefep_=OoDaX8awvNvUajzTzRup9pVCdChdR08Z1GRDL6aw@mail.gmail.com>
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

_______________________________________________
xmlsec mailing list
[email protected]
http://www.aleksey.com/mailman/listinfo/xmlsec
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.