我正在尝试为soapxml请求生成安全头,我可以计算摘要值和签名值。我需要在KeyInfo中填充URI的以下值-->;SecurityTokenReference-->;Reference
<wsse:Reference ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3" URI="#X509-623242F9C597DEB5EB1425871479922117"/>
下面是我计算其余值的方法:
signed_info = canonicalize(signed_info, c14n_exc)
#Sign the SHA1 digest of the signed xml using RSA cipher
pkey = RSA.load_key(private_key, lambda *args, **kwargs: password)
signature = pkey.sign(hashlib.sha1(signed_info).digest())
目前没有回答
相关问题 更多 >
编程相关推荐