-
-
Notifications
You must be signed in to change notification settings - Fork 454
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
SSLError raised while 'r.config._ssl_url = None' #934
Comments
The approach used then isn't going to work today. PRAW uses requests, which has support for disabling certificate validation via This use to be a first-class feature in PRAW3, but it looks like it didn't make it to PRAW4+, and you appear to be the first to ask for it. Perhaps you can figure out what changes need to be made to change the internal request session to disable verification? It might be as easy as something like |
@bboe Thanks for the helpful response. I'll try seeing if I can configure requests to disable SSL. Side note: There's a Stack Overflow question on this issue from 2014. |
Where does PRAW initialize Requests? There's a docstring referencing Lines 110 to 120 in 49f3315
|
It nested in prawcore: https://github.com/praw-dev/prawcore/blob/master/prawcore/requestor.py#L33 |
Note that |
@Stevoisiak I was able to use a custom requests Session using the following code: import requests
import praw
s = requests.Session()
s.verify = '/path/to/certfile'
reddit = praw.Reddit(requestor_kwargs={'session': s}) # and other params I believe this is what you need to do when using self-signed certificates (source: Requests documentation), but I don't have experience with that so I may be wrong. I hope this helps! |
@jarhill0 Specifying a
Alternatively, you can fully disable SSL with (Be warned that disabling SSL is strongly discouraged by the urllib3 documentation)
|
Perhaps someone can add a page to the documentation with this information? |
@bboe I have compiled this information as an answer on StackOverflow. |
I'll write it up for the docs, unless you'd like to @Stevoisiak. |
@jarhill0 You can write up the docs. Feel free to copy from my SO answer if you'd like. Thank you for your help on this issue! |
Issue Description
According to a comment on issue #202, you can disable SSL by adding
.config._ssl_url = None
to a script.However, even with SSL disabled, I am encountering multiple SSL Errors when trying to use PRAW on a company network that uses self-signed certificates.
Code
Traceback
System Information
The text was updated successfully, but these errors were encountered: