Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSL Self signed certificate error #14

Closed
Kozubi opened this issue May 9, 2016 · 9 comments
Closed

SSL Self signed certificate error #14

Kozubi opened this issue May 9, 2016 · 9 comments

Comments

@Kozubi
Copy link

Kozubi commented May 9, 2016

Hello,
First thank for awesome library. Second is there possibility to turn off ssl signature verification?

Becasue I have this error:

Traceback (most recent call last):
File "", line 1, in
File "C:\Python34\lib\site-packages\zeep\client.py", line 45, in init
self.wsdl = WSDL(wsdl, self.transport)
File "C:\Python34\lib\site-packages\zeep\wsdl\wsdl.py", line 32, in init
document = self._load_content(location)
File "C:\Python34\lib\site-packages\zeep\wsdl\wsdl.py", line 79, in _load_content
location, self.transport, self._parser_context, self.location)
File "C:\Python34\lib\site-packages\zeep\parser.py", line 39, in load_external
response = transport.load(url)
File "C:\Python34\lib\site-packages\zeep\transports.py", line 19, in load
response = requests.get(url, timeout=self.timeout, verify=self.verify)
File "C:\Python34\lib\site-packages\requests\api.py", line 67, in get
return request('get', url, params=params, *_kwargs)
File "C:\Python34\lib\site-packages\requests\api.py", line 53, in request
return session.request(method=method, url=url, *_kwargs)
File "C:\Python34\lib\site-packages\requests\sessions.py", line 468, in request
resp = self.send(prep, *_send_kwargs)
File "C:\Python34\lib\site-packages\requests\sessions.py", line 576, in send
r = adapter.send(request, *_kwargs)
File "C:\Python34\lib\site-packages\requests\adapters.py", line 447, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:600)

@mvantellingen
Copy link
Owner

hi @Kozubi, that is possible since the last release (0.5). You can use the following:

from zeep import Client
from zeep.transport import Transport

transport = Transport(verify=False)
client = Client(wsdl, transport=transport)

@Kozubi
Copy link
Author

Kozubi commented May 10, 2016

Thanks is working, well almost im my case
Now when I try to connect with this url i have this:

C:\Python34\lib\site-packages\requests\packages\urllib3\connectionpool.py:791: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.org/en/latest/security.html
InsecureRequestWarning)
Traceback (most recent call last):
File "C:/Users/xxx/PycharmProjects/test/to_Delete.py", line 8, in
client = Client(url, transport=transport)
File "C:\Python34\lib\site-packages\zeep\client.py", line 48, in init
self.service = self.bind()
File "C:\Python34\lib\site-packages\zeep\client.py", line 63, in bind
service = list(self.wsdl.services.values())[0]
IndexError: list index out of range

@mvantellingen
Copy link
Owner

Is the wsdl publicly available?

@Kozubi
Copy link
Author

Kozubi commented May 10, 2016

No

@mvantellingen
Copy link
Owner

Ok, well it seems that the wsdl has no services defined. You can check that by loading it into soap-ui or open the file and look for a definition at the bottom.

@Kozubi
Copy link
Author

Kozubi commented May 10, 2016

Yes it could be so.. thanks :)

@onimisionipe
Copy link

please note that it is 'zeep.transports' and not 'zeep.transport'

@arash7
Copy link

arash7 commented Dec 17, 2016

What if I do have the crt file and I want to use the certificate to verify my connection?

@steers
Copy link

steers commented Jan 10, 2017

You should be able to provide a path to the certificate as a value for verify:
http://docs.python-requests.org/en/latest/user/advanced/#ssl-cert-verification

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants