在我的SignInfo节点中
<ds:Reference URI="#Id-132">...它指的是下面的节点:
<soapenv:Body xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="Id-132">命令:
xmlsec1 --sign --output request-signed.xml --privkey-pem privatekey.pem raw_message.xml我有一个错误:func=xmlSecXPathDataExecute:file=xpath.c:line=273:obj=unknown:subj=xmlXPtrEval:error=5:libxml2库函数failed:expr=xpointer(id('Id-132'))
发布于 2018-11-19 21:23:29
使用is引用进行签名是必要的--id-attr:参数。示例:
<ds:Reference URI="#Id-132">
<soapenv:Body xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="Id-132">命令:xmlsec1 --sign --output request-signed.xml --privkey-pem privatekey.pem --id-attr:Id raw_message.xml
更多信息:https://snippets.aktagon.com/snippets/758-how-to-sign-xml-documents-using-xmldsig-xml-signature-
https://stackoverflow.com/questions/47917261
复制相似问题