如何使用' wss4j'在收到的肥皂消息中使用公钥验证签名。我收到的肥皂信息如下

时间:2015-12-29 11:25:21

标签: web-services soap ws-security wss4j

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:csc="http://com/sfg/spcltymkts/webservices/csctxlife" xmlns:ns="http://schema.ACORD.csc.com/Standard/Life/2"> 
        <soapenv:Header>
        <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" soapenv:mustUnderstand="1">
        <ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#" Id="SIG-3">
        <ds:SignedInfo>
        <ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">
        <ec:InclusiveNamespaces xmlns:ec="http://www.w3.org/2001/10/xml-exc-c14n#" PrefixList="csc ns soapenv"/></ds:CanonicalizationMethod>
        <ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1"/>
        <ds:Reference URI="#id-2"><ds:Transforms>
        <ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">
        <ec:InclusiveNamespaces xmlns:ec="http://www.w3.org/2001/10/xml-exc-c14n#" PrefixList="csc ns"/>
        </ds:Transform>
        </ds:Transforms>
        <ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
        <ds:DigestValue>5EBPapVidyFzYbkXLeJm7OZzfQE=</ds:DigestValue>
        </ds:Reference>
        </ds:SignedInfo>      <ds:SignatureValue>elnCEO2gWvXeZ9w</ds:SignatureValue>
        <ds:KeyInfo Id="KI-2071A78B97169C85FC14508787848982">
        <wsse:SecurityTokenReference wsu:Id="ST071A78B97169C85FC14508787849003">
        <ds:X509Data><ds:X509IssuerSerial><ds:X509IssuerName>CN=Mayank</ds:X509IssuerName>
        <ds:X509SerialNumber>1508378441</ds:X509SerialNumber>
        </ds:X509IssuerSerial></ds:X509Data>
        </wsse:SecurityTokenReference></ds:KeyInfo>
        </ds:Signature>
        <wsu:Timestamp wsu:Id="TS-1">
        <wsu:Created>2015-12-23T13:53:04.820Z</wsu:Created>
        </wsu:Timestamp></wsse:Security>
        </soapenv:Header>
        </soapenv:Body></soapenv:Envelope>

我需要根据w3c的核心验证来验证SignatureValue标记的值。 http://www.w3.org/TR/xmldsig-core/#sec-CoreValidation

0 个答案:

没有答案