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

Can't set SSL verification to value ssl.CERT_NONE #379

Open
tkilpela opened this issue Oct 11, 2023 · 2 comments
Open

Can't set SSL verification to value ssl.CERT_NONE #379

tkilpela opened this issue Oct 11, 2023 · 2 comments

Comments

@tkilpela
Copy link

It seems that it's not possible to either set verify=ssl.CERT_NONE or IntEnum value 0 for requests.

${response}= request.HEAD ${url} verify=0

Test                                             | FAIL |
OSError: Could not find a suitable TLS CA certificate bundle, invalid path: 0

${response}= request.HEAD ${url} verify=ssl.CERT_NONE

Test                                             | FAIL |
OSError: Could not find a suitable TLS CA certificate bundle, invalid path: ssl.CERT_NONE

It would be good to have support for this, as verify=False is still trying to read some SSL response from server end.
There are cases where the server we are sending https requests to has something misconfigured and this is leading to a SSLError.

An example SSLError with verify=False
Caused by SSLError(SSLEOFError(8, '[SSL: UNEXPECTED_EOF_WHILE_READING] EOF occurred in violation of protocol (_ssl.c:1007)'))

This can be bypassed by setting a value of ssl.CERT_NONE to verify argument in python (https://docs.python.org/3/library/ssl.html#ssl.CERT_NONE), so it would be great to have support for this also in robotframework-requests.

@phinds1
Copy link

phinds1 commented Mar 4, 2024

I think this might be the same issue. PR here

#387

@PaulBrandUWV
Copy link
Contributor

PaulBrandUWV commented May 27, 2024

From the requests documentation it seems it's not possible to pass "ssl.CERT_NONE" to the verify argument of the request method:
https://docs.python-requests.org/en/latest/api/#requests.request
It accepts only bool or string (path to cert).

Can you provide an (python) example that shows the difference between passing False and ssl.CERT_NONE?

Your should be able to pass ${ssl.CERT_NONE} instead of ssl.CERT_NONE in Robot framework

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

3 participants