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

workaround failure of get_url on python 2.7.6 hosts #23

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jonseymour
Copy link

This is an alternative resolution of #22 which would tolerate any specified URL, including those for older versions.

golang.org download URLs do not serve the correct TLS certificate
unless TLS SNI is used. The TLS client in Python 2.7.6 doesn't
support TLS SNI and so reports an certificate validation error.

Fortunately, the golang.org URL is actually a redirect to a
different URL which does export the correct certificate even
without SNI.

This change adjusts the specified download URL to take account of
which version of python is installed on the host by fallowing
the redirect with curl, defaulting to the original URL if
this process does not work for some reason.

Signed-off-by: Jon Seymour [email protected]

@jonseymour
Copy link
Author

@jlund I see you fixed the issue by manually following the redirect which is probably reasonable. I developed this before I saw your changes and offer it for your contemplation, but I think your solution solves the problem neatly too, so happy for you to close this without merging if you desire.

golang.org download URLs do not serve the correct TLS certificate
unless TLS SNI is used. The TLS client in Python 2.7.6 doesn't
support TLS SNI and so reports an certificate validation error.

Fortunately, the golang.org URL is actually a redirect to a
different URL which does export the correct certificate even
without SNI.

This change adjusts the specified download URL to take account of
which version of python is installed on the host by fallowing
the redirect with curl, defaulting to the original URL if
this process does not work for some reason.

Signed-off-by: Jon Seymour <[email protected]>
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.

1 participant