简体   繁体   中英

How to decode encrypted soap messages with PHP

I'm having massive problems with encrypted SOAP messages within PHP We're getting data like

<?xml version="1.0" ?>
<xenc:EncryptedData Type="http://www.w3.org/2001/04/xmlenc#Element" 
  xmlns:xenc="http://www.w3.org/2001/04/xmlenc#" 
  xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" 
  xmlns:dp="http://www.datapower.com/schemas/management">
 <dsig:KeyInfo xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
    <xenc:EncryptedKey Recipient="name:[NAME]">
        <xenc:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-1_5"/>
        <dsig:KeyInfo>
            <dsig:KeyName>[KEY_NAME]</dsig:KeyName>
        </dsig:KeyInfo>
        <xenc:CipherData>
            <xenc:CipherValue>[RSA_ENCRYPTED_PK]</xenc:CipherValue>
        </xenc:CipherData>
    </xenc:EncryptedKey>
 </dsig:KeyInfo>
 <xenc:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#tripledes-cbc"/>
 <xenc:CipherData>
    <xenc:CipherValue>[ENCRYPTED_DATA_HERE]</xenc:CipherValue>
 </xenc:CipherData>
</xenc:EncryptedData>

I can find the following information http://wso2.org/library/knowledge-base/how-does-soap-message-encryption-work but can't manage to decrypt the message

I have the correct private key

This is part of s SAML-2 iDP post

Does anyone know how / a PHP library which could help please?

Yours

Tim

尝试使用http://simplesamlphp.org/设置您的服务提供商。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM