Grünwald, Stefan
2018-08-29 07:30:25 UTC
Hi,
I would like to sign specific parts of my SOAP message.
Therefore for example I added an Id attribute to my message body
<ns0:Body ns4:Id="id-d27b22e6-7bf5-46de-9d3c-66d04a209827">
I also create a reference element containing the xpointer as an URI.
xmlNodePtr refNode = xmlSecTmplSignatureAddReference(signNode,
xmlSecTransformSha256Id, NULL, reinterpret_cast<const
unsigned char *>("#id-d27b22e6-7bf5-46de-9d3c-66d04a209827"), NULL);
But I get this error:
func=xmlSecXPathDataExecute:file=xpath.c:line=247:obj=unknown:subj=xml
XPtrEval:error=5:libxml2
library function
failed:expr=xpointer(id('id-d27b22e6-7bf5-46de-9d3c-66d04a209827'));
xml
error: 0: NULL
Unfortunately I couldnât find any example for doing such a thing.
I also started debugging into libxmlsec1 and libxml2 to know a bit
more about that but coming into libxml2 it gets quite complicated.
I guess Iâm doing something wrong with the xpointer because I also
tried a simple xpointer example in libxml2 and couldnât get a proper result.
Maybe you have some advice for me what Iâm doing wrong or at least
what I should try next.
Thanks in advance!
Best regards,
Stefan
Mit freundlichen GrÃŒÃen / Best regards,
Stefan GrÃŒnwald
Teamleader Development Bold
CASHPOINT Agentur & IT-Service GmbH
Viktor Kaplan Str. 9, 2201 Gerasdorf, AUSTRIA
Phone +43 1 21772 1312
Fax +43 (1) 7347330
***@cashpoint.com<mailto:***@cashpoint.com>
www.cashpoint.com<https://www.cashpoint.com>
FN: 146190k, FB-Gericht: Landesgericht Korneuburg
I would like to sign specific parts of my SOAP message.
Therefore for example I added an Id attribute to my message body
<ns0:Body ns4:Id="id-d27b22e6-7bf5-46de-9d3c-66d04a209827">
I also create a reference element containing the xpointer as an URI.
xmlNodePtr refNode = xmlSecTmplSignatureAddReference(signNode,
xmlSecTransformSha256Id, NULL, reinterpret_cast<const
unsigned char *>("#id-d27b22e6-7bf5-46de-9d3c-66d04a209827"), NULL);
But I get this error:
func=xmlSecXPathDataExecute:file=xpath.c:line=247:obj=unknown:subj=xml
XPtrEval:error=5:libxml2
library function
failed:expr=xpointer(id('id-d27b22e6-7bf5-46de-9d3c-66d04a209827'));
xml
error: 0: NULL
Unfortunately I couldnât find any example for doing such a thing.
I also started debugging into libxmlsec1 and libxml2 to know a bit
more about that but coming into libxml2 it gets quite complicated.
I guess Iâm doing something wrong with the xpointer because I also
tried a simple xpointer example in libxml2 and couldnât get a proper result.
Maybe you have some advice for me what Iâm doing wrong or at least
what I should try next.
Thanks in advance!
Best regards,
Stefan
Mit freundlichen GrÃŒÃen / Best regards,
Stefan GrÃŒnwald
Teamleader Development Bold
CASHPOINT Agentur & IT-Service GmbH
Viktor Kaplan Str. 9, 2201 Gerasdorf, AUSTRIA
Phone +43 1 21772 1312
Fax +43 (1) 7347330
***@cashpoint.com<mailto:***@cashpoint.com>
www.cashpoint.com<https://www.cashpoint.com>
FN: 146190k, FB-Gericht: Landesgericht Korneuburg