如何在soap请求中也加密body,wssecurity

2024-10-02 22:23:50 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在使用名为[Zeep]:https://python-zeep.readthedocs.io/en/master/index.html

方法Signature()工作正常,问题是我还需要加密正文:

<Body>
<xenc:EncryptedData Id="bodyID">
<xenc:CipherData>
<xenc:CipherValue>...</xenc:CipherValue>
</xenc:CipherData>
</xenc:EncryptedData>
</Body>

我不知道怎么做。你知道吗

这就是我现在所拥有的:

client = Client(
    'http://test.wsdl',
    wsse=Signature("key.pem","cert.pem",))

client.service.Test()

我希望soap请求是签名的,并且主体是加密的。你知道吗


Tags: httpsiomasterclientreadthedocsbodypemen