appveyor / secure-file

MIT License
26 stars 19 forks source link

Fixes "Could not create SSL/TLS secure channel." #5

Closed gpotter2 closed 6 years ago

gpotter2 commented 6 years ago

Hello!

I am having an issue with the PowerShell script: when run from Windows 10, because PowerShell uses by default TLS 1.0, the script will fail on the DownloadFile function

image

My custom translation:

Exception while calling «DownloadFile» with «2» argument(s): «The request was aborted: Could not create SSL/TLS secure channel.»

After looking a bit on the internet, I found out that this could be fixed by explicitly specifying a preference TLS order, such as in the following changes.

After the change: image

Disclaimer: this is not supported on Windows XP (i tested it), but so is Expand-Archive (two lines after), so this script isnt already working on it.

Calling @FeodorFitsner for review :)

gpotter2 commented 6 years ago

Cool, thanks !