[xmlsec] xmlsec having problem finding element with Id=

G. Ken Holman gkholman at CraneSoftwrights.com
Sat Nov 27 10:44:10 PST 2010


Hi folks!

Today I'm working on countersignatures, and I'm having a problem with 
xmlsec not finding an element with Id= that is cited in the URI= of a 
<ds:Reference>:

func=xmlSecXPathDataExecute:file=..\src\xpath.c:line=273:obj=unknown:subj=xmlXPtrEval:error=5:libxml2 
library function failed:expr=xpointer(id('addedSigVal'))
func=xmlSecXPathDataListExecute:file=..\src\xpath.c:line=356:obj=unknown:subj=xmlSecXPathDataExecute:error=1:xmlsec 
library function failed:
func=xmlSecTransformXPathExecute:file=..\src\xpath.c:line=466:obj=xpointer:subj=xmlSecXPathDataExecute:error=1:xmlsec 
library function failed:
func=xmlSecTransformDefaultPushXml:file=..\src\transforms.c:line=2395:obj=xpointer:subj=xmlSecTransformExecute:error=1:xmlsec 
library function failed:
func=xmlSecTransformCtxXmlExecute:file=..\src\transforms.c:line=1226:obj=unknown:subj=xmlSecTransformPushXml:error=1:xmlsec 
library function failed:transform=xpointer
func=xmlSecTransformCtxExecute:file=..\src\transforms.c:line=1286:obj=unknown:subj=xmlSecTransformCtxXmlExecute:error=1:xmlsec 
library function failed:
func=xmlSecDSigReferenceCtxProcessNode:file=..\src\xmldsig.c:line=1571:obj=unknown:subj=xmlSecTransformCtxExecute:error=1:xmlsec 
library function failed:
func=xmlSecDSigCtxProcessSignedInfoNode:file=..\src\xmldsig.c:line=804:obj=unknown:subj=xmlSecDSigReferenceCtxProcessNode:error=1:xmlsec 
library function failed:node=Reference
func=xmlSecDSigCtxProcessSignatureNode:file=..\src\xmldsig.c:line=547:obj=unknown:subj=xmlSecDSigCtxProcessSignedInfoNode:error=1:xmlsec 
library function failed:
func=xmlSecDSigCtxSign:file=..\src\xmldsig.c:line=303:obj=unknown:subj=xmlSecDSigCtxSigantureProcessNode:error=1:xmlsec 
library function failed:
Error: signature failed
Error: failed to sign file "extSigned2.xml.raw"


The extSigned2.xml.raw file is found in the attached ZIP file, named 
".zzz" to get past mail filters.

That file was successfully signed with a <ds:Signature> that has a 
<ds:SignatureValue Id="addedSigVal"> signature value.

To again sign the document and this time also countersign that first 
signature, I'm adding a second <ds:Signature> that has two 
<ds:Reference> elements:  the first one points to the document using 
URI="", and the second one points to the signature value of the first 
signature using URI="#addedSigVal".

The first line of the error message above indicates that the element 
with the id "addedSigVal" cannot be found.

I get the same message if I try to point to the first <ds:Signature> 
using URI="#addedSig".

Is this enough information to determine if the software is wrong or 
if I'm asking too much?

Thanks!

. . . . . . . . . Ken
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gkholman-missid-20101127-1840z.zzz
Type: application/octet-stream
Size: 6177 bytes
Desc: not available
URL: <http://www.aleksey.com/pipermail/xmlsec/attachments/20101127/d0e2b7d8/attachment.obj>
-------------- next part --------------

--
Contact us for world-wide XML consulting & instructor-led training
Crane Softwrights Ltd.          http://www.CraneSoftwrights.com/z/
G. Ken Holman                 mailto:gkholman at CraneSoftwrights.com
Legal business disclaimers:  http://www.CraneSoftwrights.com/legal


More information about the xmlsec mailing list