Skip to content

Actually disable ssl when on windows (Cygwin) #46

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

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tools/get.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,13 @@ def get_tool(tool):
local_path = dist_dir + archive_name
url = tool['url']
#real_hash = tool['checksum'].split(':')[1]
if 'CYGWIN_NT' in sys_name:
if 'CYGWIN_NT' not in sys_name:
Copy link
Member

Choose a reason for hiding this comment

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

but this will disable SSL check on all other OSs. Maybe you need to install something to get it going?

Copy link
Author

Choose a reason for hiding this comment

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

Ah I missunderstood what was going on here, I assumed the starting state before 4865ed0 was "ssl is enabled" but I see now you are correct it was disabled beforehand and that commit made it disabled only for windows. My mistake, sorry.

Copy link
Author

Choose a reason for hiding this comment

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

Also as a datapoint while trying to determine how to get this script working for everyone. The script is broken on a clean install of "babun" (cygwin distro) on windows 10 but works if you follow the "not cygwin" path, i.e. with these changes.

ctx = ssl.create_default_context()
ctx.check_hostname = False
ctx.verify_mode = ssl.CERT_NONE
if not os.path.isfile(local_path):
print('Downloading ' + archive_name);
if 'CYGWIN_NT' in sys_name:
if 'CYGWIN_NT' not in sys_name:
urlretrieve(url, local_path, report_progress,context=ctx)
else:
urlretrieve(url, local_path, report_progress)
Expand Down