我正在构建一个脚本来访问HTTPS / TLS TCP站点,该站点需要我作为.pfx文件的X.509证书。
我正在使用SOAPpy 0.12.5和Python 2.7,并开始使用以下代码,
import SOAPpy
url = "192.168.0.1:5001"
server = SOAPpy.SOAPProxy(url)
# I think I need to pass the cert to server here...
server.callSoapRPC(xxxx)
如果我尝试运行它,则会失败并显示以下消息
socket.error: [Errno 10061] No connection could be made because the target machine actively refused it
如何将.pfx证书绑定到SOAPproxy?
由于
答案 0 :(得分:1)
我设法这样做了:
import SOAPpy
SOAPpy.Config.SSL.cert_file = 'cert_file'
SOAPpy.Config.SSL.key_file = 'key_file'
server = SOAPpy.SOAPProxy(url, config=config)