Skip to content

For #46920, custom CA certs for file transfer#171

Merged
jfboismenu merged 5 commits into
masterfrom
46920_ca_certs_for_file_transfer
Mar 21, 2018
Merged

For #46920, custom CA certs for file transfer#171
jfboismenu merged 5 commits into
masterfrom
46920_ca_certs_for_file_transfer

Conversation

@jfboismenu

Copy link
Copy Markdown
Contributor

This allows to upload and download files from local Shotgun sites using HTTPS with a custom certificate authority certificate.

Comment thread shotgun_api3/shotgun.py
Build urllib2 opener with appropriate proxy handler.
"""
handlers = []
if self.__ca_certs and not NO_SSL_VALIDATION:

@jfboismenu jfboismenu Mar 21, 2018

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fix is only applied if __ca_certs is set, which makes it very safe as it doesn't impact any other usage of the API. The build_opener is strictly used for uploads/downloads.

In other words, if this fix has a bug somewhere inside it on certain conditions, it will only fail for people who are using SHOTGUN_API_CACERTS, who already can't download and upload at the moment anyway.

@jfboismenu jfboismenu requested a review from brandonvfx March 21, 2018 19:11

@brandonvfx brandonvfx left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it looks good.

@jfboismenu

Copy link
Copy Markdown
Contributor Author

All this has been tested with proxies and python 2.6

@jfboismenu jfboismenu merged commit 8c2584b into master Mar 21, 2018
@jfboismenu jfboismenu deleted the 46920_ca_certs_for_file_transfer branch April 5, 2018 00:08
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.

3 participants