Skip to content

Conversation

@jfboismenu
Copy link
Contributor

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

Build urllib2 opener with appropriate proxy handler.
"""
handlers = []
if self.__ca_certs and not NO_SSL_VALIDATION:
Copy link
ContributorAuthor

@jfboismenujfboismenuMar 21, 2018

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.

Copy link
Contributor

@brandonvfxbrandonvfx left a comment

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
ContributorAuthor

All this has been tested with proxies and python 2.6

@jfboismenujfboismenu merged commit 8c2584b into masterMar 21, 2018
This was referenced Mar 22, 2018
@jfboismenujfboismenu deleted the 46920_ca_certs_for_file_transfer branch April 5, 2018 00:08
Sign up for freeto 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.

4 participants

@jfboismenu@brandonvfx@ogranada