Commit 7a60870
committed
workaround failure of get_url on python 2.7.6 hosts
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 <jon@wildducktheories.com>1 parent 3b47945 commit 7a60870
3 files changed
+20
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
2 | 6 | | |
3 | | - | |
| 7 | + | |
4 | 8 | | |
5 | 9 | | |
6 | 10 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
0 commit comments