简体   繁体   English

如何使用PHP解码加密的Soap消息

[英]How to decode encrypted soap messages with PHP

I'm having massive problems with encrypted SOAP messages within PHP We're getting data like 我在PHP中使用加密的SOAP消息遇到了很多问题,我们正在获取类似的数据

<?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 我可以在http://wso2.org/library/knowledge-base/how-does-soap-message-encryption-work中找到以下信息,但无法对消息进行解密

I have the correct private key 我有正确的私钥

This is part of s SAML-2 iDP post 这是SAML-2 iDP帖子的一部分

Does anyone know how / a PHP library which could help please? 有谁知道/ PHP库可以为您提供帮助吗?

Yours 你的

Tim 提姆

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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