8000 Adding support for calling URL with invalid SSL cert by davidmoss · Pull Request #247 · sigmavirus24/github3.py · GitHub
[go: up one dir, main page]

Skip to content

Adding support for calling URL with invalid SSL cert #247

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

Merged
merged 1 commit into from
May 16, 2014

Conversation

davidmoss
Copy link

When hosting GitHubEnterprise internally there's a greater chance the SSL certificate could be self signed and thus you need to prevent the requests library from validating the SSL certificate. By passing the verify flag through you can control this validation check and prevent:

SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed

@sigmavirus24
Copy link
Owner

First, you've broken the tests. It's okay, your change can be modified without having to change the tests, please run them before committing anything else.

Secondly, the easy way to fix this is to do:

import github3

g = github3.GitHubEnterprise(
    # ...
)
g._session.verify = False

And this will work for everything. That said, I can see the benefit of this being a parameter that is passed during initialization of a GitHubEnterprise object. In that case, you only modify the __init__ for GitHubEnterprise and you take that value and set it on the session that is created in __init__.

@davidmoss
Copy link
Author

Ok my bad, let me spend a bit longer than the 2 mins I had to look at it. I ran the tests and had a lot of random failures that didn't look connected but let me have a closer look. Leave it with me :)

@sigmavirus24
Copy link
Owner

The best way to understand if the failing tests are your fault is to run them before you make any changes.

@davidmoss
Copy link
Author

True that - my bad

@sigmavirus24
Copy link
Owner

@davidmoss no worries. Sorry if I seemed angry, I wasn't and am not. I appreciate the work you did in this PR. Thanks for sending it! 🍰

sigmavirus24 added a commit that referenced this pull request May 16, 2014
Adding support for calling URL with invalid SSL cert
@sigmavirus24 sigmavirus24 merged commit 71a4eef into sigmavirus24:develop May 16, 2014
@davidmoss
Copy link
Author

It's fine, I read your contributors and README after and you had everything there so was my fault for rushing it out 😃 cheers!

@sigmavirus24
Copy link
Owner

:) I want to get a few more things in before I release the next version (0.10 or 0.9.1), so hopefully working from GitHub will be sufficient for you (for a short period of time).

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

Successfully merging this pull request may close these issues.

2 participants
0