<div dir="ltr"><div><div><div>Hi All,<br><br></div>I have written a code which will sign a particular element in a document using xpath node, And it is successfully signed the element, but while verifying the signed element it throws error.<br>
<br></div>Following is the code written<br><br> <br> dsigCtx = xmlSecDSigCtxCreate(NULL);<br> <br> dsigCtx->signKey = CreateHmacKey(keybuf, keysize);<br><br></div> /*signing */<br><div><br> xmlSecDSigCtxSign(dsigCtx, g_SignatureNode) ; //Signing is perfect and i am getting the signed document.<br>
<br> /* Verify signature */<br><br> xmlSecDSigCtxVerify(dsigCtx, g_SignatureNode) // Execution fails here.<br>
<br></div><div>and then trows error: <br></div><div> func=xmlSecDSigCtxProcessSignatureNode:file=xmldsig.c:line=463:obj=unknown:subj=dsigCtx->signValueNode == NULL:error=100:assertion:<br>func=xmlSecDSigCtxVerify:file=xmldsig.c:line=366:obj=unknown:subj=xmlSecDSigCtxSigantureProcessNode:error=1:xmlsec library function failed:<br>
<br></div><div>Please correct me , if i am doing anything wrong.<br><br></div><div>Thanks,<br></div><div>Venkat.<br></div><div><br></div></div>