[xmlsec] Regarding error got when verifying the Hmac key signed document.
Aleksey Sanin
aleksey at aleksey.com
Fri Sep 27 14:53:11 PDT 2013
It's hard to say exactly what is the problem since not enough
information is provided, but from the code snippet, it looks
like you are re-using dsigCtx which is a bad idea.
Regardless, you have the code and debugger so you are in the best
position to figure it out.
Aleksey
On 9/27/13 4:09 AM, Venkataragavan Vijayakumar wrote:
> Hi All,
>
> 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.
>
> Following is the code written
>
>
> dsigCtx = xmlSecDSigCtxCreate(NULL);
>
> dsigCtx->signKey = CreateHmacKey(keybuf, keysize);
>
> /*signing */
>
> xmlSecDSigCtxSign(dsigCtx, g_SignatureNode) ; //Signing is perfect and
> i am getting the signed document.
>
> /* Verify signature */
>
> xmlSecDSigCtxVerify(dsigCtx, g_SignatureNode) // Execution fails here.
>
> and then trows error:
> func=xmlSecDSigCtxProcessSignatureNode:file=xmldsig.c:line=463:obj=unknown:subj=dsigCtx->signValueNode
> == NULL:error=100:assertion:
> func=xmlSecDSigCtxVerify:file=xmldsig.c:line=366:obj=unknown:subj=xmlSecDSigCtxSigantureProcessNode:error=1:xmlsec
> library function failed:
>
> Please correct me , if i am doing anything wrong.
>
> Thanks,
> Venkat.
>
>
>
> _______________________________________________
> xmlsec mailing list
> xmlsec at aleksey.com
> http://www.aleksey.com/mailman/listinfo/xmlsec
>
More information about the xmlsec
mailing list