I'm designing a SOAP client using python and SOAP server I'm connecting to only allows TLSv1.2. I looked up in zeep
documentation but couldn't find any setting where I can force it to use only 'TLSv1.2'. If zeep doesn't have this feature, are there any other SOAP python libraries with this feature ?
Asked
Active
Viewed 1,305 times
0

dhruvvyas90
- 1,135
- 1
- 15
- 31
-
Isn't this automatic to TSL1.2 if the server supports it? – Allen King Jul 12 '17 at 00:22
-
It seems like it is. I was using the faulty wsdl it seems. – dhruvvyas90 Jul 12 '17 at 14:01
1 Answers
1
For default, zeep uses a TLS 1.2. But if you need to verify the TLS connection (in case you have a self-signed certificate for your host), the best way is to create a requests.Session
instance and add the information to that Session
, so it keeps persistent:
from requests import Session
from zeep import Client
from zeep.transports import Transport
session = Session()
session.verify = 'path/to/my/certificate.pem'
transport = Transport(session=session)
client = Client(
'http://my.own.sslhost.local/service?WSDL',
transport=transport)
Alternatively, instead of using session.verify
you can use session.cert if you just want to use an TLS client certificate.
More information in: https://python-zeep.readthedocs.io/en/master/transport.html

Lucas Torres
- 222
- 1
- 2
- 12