Command :

xmlsec1 --sign --pkcs12 Staging_Signature_PrivateKey.p12 --pwd public --output 
/Users/itsbalamurali/Workspace/out.xml /Users/itsbalamurali/Workspace/in.xml

XMLSEC1 VERSION: xmlsec1 1.2.20 (openssl)

XML trying to sign:

<?xml version='1.0' encoding='UTF-8'?>
<Otp uid="999999990019" type="A" tid="public" 
lk="MEaMX8fkRa6PqsqK6wGMrEXcXFl_oXHA-YuknI2uf0gKgZ80HaZgG3A" ver="1.6" 
txn="WieW8ZTFp0" ac="public" sa="public">
<Opts ch="00"></Opts>
<Signature xmlns="http://www.w3.org/2000/09/xmldsig#";>
<SignedInfo xmlns="http://www.w3.org/2000/09/xmldsig#";>
<CanonicalizationMethod xmlns="http://www.w3.org/2000/09/xmldsig#"; 
Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315";></CanonicalizationMethod>
<SignatureMethod xmlns="http://www.w3.org/2000/09/xmldsig#"; 
Algorithm=""></SignatureMethod>
<Reference xmlns="http://www.w3.org/2000/09/xmldsig#";>
<Transforms xmlns="http://www.w3.org/2000/09/xmldsig#";>
<Transform xmlns="http://www.w3.org/2000/09/xmldsig#"; 
Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature";></Transform>
<Transform xmlns="http://www.w3.org/2000/09/xmldsig#"; 
Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#";></Transform>
</Transforms>
<DigestMethod xmlns="http://www.w3.org/2000/09/xmldsig#"; 
Algorithm="http://www.w3.org/2000/09/xmldsig#sha1";></DigestMethod>
<DigestValue xmlns="http://www.w3.org/2000/09/xmldsig#";></DigestValue>
</Reference>
</SignedInfo>
<SignatureValue xmlns="http://www.w3.org/2000/09/xmldsig#";></SignatureValue>
<KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#";>
<X509Data xmlns="http://www.w3.org/2000/09/xmldsig#";>
<X509Certificate xmlns="http://www.w3.org/2000/09/xmldsig#";></X509Certificate>
</X509Data>
</KeyInfo>
</Signature>
</Otp>

Error:

func=xmlSecTransformNodeRead:file=transforms.c:line=1543:obj=unknown:subj=xmlSecTransformIdListFindByHref:error=1:xmlsec
 library function failed:href=
func=xmlSecTransformCtxNodeRead:file=transforms.c:line=694:obj=unknown:subj=xmlSecTransformNodeRead:error=1:xmlsec
 library function failed:name=SignatureMethod
func=xmlSecDSigCtxProcessSignedInfoNode:file=xmldsig.c:line=742:obj=unknown:subj=xmlSecTransformCtxNodeRead:error=1:xmlsec
 library function failed:node=SignatureMethod
func=xmlSecDSigCtxProcessSignatureNode:file=xmldsig.c:line=547:obj=unknown:subj=xmlSecDSigCtxProcessSignedInfoNode:error=1:xmlsec
 library function failed:
func=xmlSecDSigCtxSign:file=xmldsig.c:line=303:obj=unknown:subj=xmlSecDSigCtxSignatureProcessNode:error=1:xmlsec
 library function failed:
Error: signature failed


Thanks,
Balamurali Pandranki,
Phone: +91-9908640059,
Work: mur...@labwire.tech.

Attachment: Staging_Signature_PrivateKey.p12
Description: Staging_Signature_PrivateKey.p12

_______________________________________________
xmlsec mailing list
xmlsec@aleksey.com
http://www.aleksey.com/mailman/listinfo/xmlsec

Reply via email to