Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/http/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
OpenSSL与SoapUI签名值_Openssl_Soapui_Ws Security_Hp Nonstop - Fatal编程技术网

OpenSSL与SoapUI签名值

OpenSSL与SoapUI签名值,openssl,soapui,ws-security,hp-nonstop,Openssl,Soapui,Ws Security,Hp Nonstop,我们在HP Nonstop上有一个openssl端口,需要发送一个SOAP请求,请求的安全头与SoapUI生成的安全头相同。到目前为止,我们已经能够得到一个匹配的摘要值(3长天)。现在,我完全无法在openssl中生成与SoapUI中相同的签名 我有两个输入:一个文件包含二进制摘要值,另一个文件包含base64摘要值 我有相同的.pfx密钥库,它加载在HP NSK上的SoapUI中,但我必须将其转换为.pem文件(openssl pkcs12-in-pfx-out-pem-nodes) 我发现了

我们在HP Nonstop上有一个openssl端口,需要发送一个SOAP请求,请求的安全头与SoapUI生成的安全头相同。到目前为止,我们已经能够得到一个匹配的摘要值(3长天)。现在,我完全无法在openssl中生成与SoapUI中相同的签名

我有两个输入:一个文件包含二进制摘要值,另一个文件包含base64摘要值

我有相同的.pfx密钥库,它加载在HP NSK上的SoapUI中,但我必须将其转换为.pem文件(openssl pkcs12-in-pfx-out-pem-nodes)

我发现了三个单独的openssl命令,它们将生成签名,但没有一个与相同摘要值的SoapUI签名相匹配:

openssldgst-sha1-rand randfile-sign pem dgst.txt | openssl enc-base64>sig

opensslrsautl-sign-inkey pem-in dgst.txt | openssl enc-base64>sig

opensslpkeyutl-inkey pem-in dgst.txt | openssl enc-base64>sig

几个openssl命令将允许您指定'-sha','-sha1'等。其中有十一个命令,我已经尝试过了。签名上没有匹配项

有什么帮助吗?在这里的第三天,我认为这是最简单的部分

下面是由SoapUI生成的安全标头。为了简洁起见,我已经删除了签名和任何客户身份信息。我主要展示这一点,以表明正在指定哪些算法等

    <wsse:Security xmlns:wsse="redacted" xmlns:wsu="redacted">
<ds:Signature Id="SIG-7175F72748C072A4761529013840614108" xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
    <ds:SignedInfo>
        <ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">
            <ec:InclusiveNamespaces PrefixList="soapenv v1 v11 v2" xmlns:ec="http://www.w3.org/2001/10/xml-exc-c14n#"/>
        </ds:CanonicalizationMethod>
        <ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
        <ds:Reference URI="#id-CE0A4571D7DB69D8CE152339585717529">
            <ds:Transforms>
                <ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">
                    <ec:InclusiveNamespaces PrefixList="v1 v11 v2" xmlns:ec="http://www.w3.org/2001/10/xml-exc-c14n#"/>
                </ds:Transform>
            </ds:Transforms>
            <ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
            <ds:DigestValue>redacted</ds:DigestValue>
        </ds:Reference>
    </ds:SignedInfo>
    <ds:SignatureValue>removed for brevity</ds:SignatureValue>
    <ds:KeyInfo Id="redacted">
        <wsse:SecurityTokenReference wsu:Id="redacted">
            <ds:X509Data>
                <ds:X509IssuerSerial>
                    <ds:X509IssuerName>CN=Symantec Class 3 Secure Server CA - G4,OU=Symantec Trust Network,O=Symantec Corporation,C=US</ds:X509IssuerName>
                    <ds:X509SerialNumber>redacted</ds:X509SerialNumber>
                </ds:X509IssuerSerial>
            </ds:X509Data>
        </wsse:SecurityTokenReference>
    </ds:KeyInfo>
</ds:Signature>

编辑
为简洁起见,请删除
CN=Symantec Class 3安全服务器CA-G4,OU=Symantec信任网络,O=Symantec Corporation,C=US
编辑

当您使用openssl手动创建签名时,您确定要使用规范化数据吗?正如Pras所说,数据需要规范化。有效负载正在规范化。我将规范化和同级移动到NSK框中,并从openssl获得相同的摘要值。这就是我在花了我们三天时间的帖子中的意思——试图获得正确的规范化。现在我们被卡在签名上了。