5

I am building a script to access a HTTPS/TLS TCP site that requires a X.509 certifcate that I have as a .pfx file.

I am using SOAPpy 0.12.5 and Python 2.7 and have started off with code as below,

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)

If I try running this it fails with the following message

socket.error: [Errno 10061] No connection could be made because the target machine actively refused it

Any sugestions how to tie the .pfx certificate to the SOAPproxy?

Thanks

KermitG
  • 434
  • 5
  • 16

1 Answers1

1

I managed to do it this way:

import SOAPpy
SOAPpy.Config.SSL.cert_file = 'cert_file'
SOAPpy.Config.SSL.key_file = 'key_file'

server = SOAPpy.SOAPProxy(url, config=config)
Daniel Hartmann
  • 115
  • 1
  • 4
  • How did you create the cert file and key file? The documentation for the SOAP service I'm trying to connect to says "get a copy of the EAI system’s certificate. The certificate must be a signed X.509 certificate encoded using Privacy Enhanced Mail (PEM) Base64-encoding." – Greg Feb 27 '13 at 20:48
  • Weird, weird, why doesn't my SOAPpy has the `SOAPpy.Config.SSL` object? – fiatjaf Nov 20 '13 at 15:22
  • Giovanni P, try to `pip install -U soappy` – dvska Nov 27 '13 at 13:42