Skip to content
This repository has been archived by the owner on Aug 16, 2023. It is now read-only.

Don't consider powershell if it can't handle TLS v1.2. #128

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

Conversation

staticfloat
Copy link
Member

This should fix #127

@staticfloat
Copy link
Member Author

@simonbyrne can you try this out and make sure it gives a proper error message on your machine? I don't have easy access to any windows computers that are old enough for this to be relevant.

@codecov-io
Copy link

codecov-io commented Oct 10, 2018

Codecov Report

Merging #128 into master will increase coverage by 0.15%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #128      +/-   ##
==========================================
+ Coverage    88.4%   88.56%   +0.15%     
==========================================
  Files           8        8              
  Lines         647      647              
==========================================
+ Hits          572      573       +1     
+ Misses         75       74       -1
Impacted Files Coverage Δ
src/PlatformEngines.jl 72.72% <ø> (+0.6%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cb403e6...b278948. Read the comment docs.

@simonbyrne
Copy link
Contributor

I'm getting the following:

(v1.0) pkg> st
    Status `C:\Users\sbyrne\.julia\environments\v1.0\Project.toml`
  [b99e7846] BinaryProvider v0.5.1+ #sf/windows_management_framework (https://github.com/JuliaPackaging/BinaryProvider.j
l.git)
  [944b1d66] CodecZlib v0.5.0
  [a93c6f00] DataFrames v0.14.1
  [e7dc6d0d] DataValues v0.4.5
  [6deec6e2] IndexedTables v0.8.0
  [438e738f] PyCall v1.18.4

(v1.0) pkg> build CodecZlib
  Building CodecZlib → `C:\Users\sbyrne\.julia\packages\CodecZlib\wwgbh\deps\build.log`
┌ Error: Error building `CodecZlib`:
│ ┌ Warning: On Windows, creating file symlinks requires Administrator privileges
│ └ @ Base.Filesystem file.jl:789
│ ┌ Warning: platform_key() is deprecated, use platform_key_abi() from now on
│ │   caller = ip:0x0
│ └ @ Core :-1
│ [ Info: Downloading https://github.com/bicycle1885/ZlibBuilder/releases/download/v1.0.2/Zlib.v1.2.11.x86_64-w64-mingw3
2.tar.gz to C:\Users\sbyrne\.julia\packages\CodecZlib\wwgbh\deps\usr\downloads\Zlib.v1.2.11.x86_64-w64-mingw32.tar.gz...

│ ERROR: LoadError: Could not download https://github.com/bicycle1885/ZlibBuilder/releases/download/v1.0.2/Zlib.v1.2.11.
x86_64-w64-mingw32.tar.gz to C:\Users\sbyrne\.julia\packages\CodecZlib\wwgbh\deps\usr\downloads\Zlib.v1.2.11.x86_64-w64-
mingw32.tar.gz:
│ ErrorException("")
│ Stacktrace:
│  [1] error(::String) at .\error.jl:33
│  [2] macro expansion at .\logging.jl:313 [inlined]
│  [3] #download#93(::Bool, ::Function, ::String, ::String) at C:\Users\sbyrne\.julia\packages\BinaryProvider\NkvlY\src\
PlatformEngines.jl:493
│  [4] #download at .\none:0 [inlined]
│  [5] #download_verify#94(::Bool, ::Bool, ::Bool, ::Function, ::String, ::String, ::String) at C:\Users\sbyrne\.julia\p
ackages\BinaryProvider\NkvlY\src\PlatformEngines.jl:573
│  [6] #download_verify at .\none:0 [inlined]
│  [7] #install#133(::Prefix, ::String, ::Bool, ::Bool, ::Bool, ::Function, ::String, ::String) at C:\Users\sbyrne\.juli
a\packages\BinaryProvider\NkvlY\src\Prefix.jl:314
│  [8] (::getfield(BinaryProvider, Symbol("#kw##install")))(::NamedTuple{(:prefix, :force, :verbose),Tuple{Prefix,Bool,B
ool}}, ::typeof(install), ::String, ::String) at .\none:0
│  [9] top-level scope at C:\Users\sbyrne\.julia\packages\CodecZlib\wwgbh\deps\build.jl:88
│  [10] include at .\boot.jl:317 [inlined]
│  [11] include_relative(::Module, ::String) at .\loading.jl:1038
│  [12] include(::Module, ::String) at .\sysimg.jl:29
│  [13] include(::String) at .\client.jl:388
│  [14] top-level scope at none:0
│ in expression starting at C:\Users\sbyrne\.julia\packages\CodecZlib\wwgbh\deps\build.jl:81
│ Exception setting "SecurityProtocol": "Cannot convert null to type "System.Net.SecurityProtocolType" due to invalid en
u
│ meration values. Specify one of the following enumeration values and try again. The possible enumeration values are "S
s
│ l3, Tls"."
│ At line:1 char:35
│ + [System.Net.ServicePointManager]:: <<<< SecurityProtocol =
│     + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
│     + FullyQualifiedErrorId : PropertyAssignmentException
│
│ Exception calling "DownloadFile" with "2" argument(s): "The underlying connection was closed: An unexpected error occu
r
│ red on a send."
│ At line:5 char:24
│ + $webclient.DownloadFile <<<< ("https://github.com/bicycle1885/ZlibBuilder/releases/download/v1.0.2/Zlib.v1.2.11.x86_
6
│ 4-w64-mingw32.tar.gz", "C:\Users\sbyrne\.julia\packages\CodecZlib\wwgbh\deps\usr\downloads\Zlib.v1.2.11.x86_64-w64-min
g
│ w32.tar.gz")
│     + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
│     + FullyQualifiedErrorId : DotNetMethodException
│
└ @ Pkg.Operations C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.0\Pkg\src\
Operations.jl:1068

PowerShell accepts a -Version argument, and will throw a specific error code if that version is not supported (this is what Base.download does).

@simonbyrne
Copy link
Contributor

You can also download Win7 VMs from https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/.

visr pushed a commit to visr/BinaryProvider.jl that referenced this pull request May 10, 2019
We need to be more strict than the parent mount here. We could try to find out what those flags are, or we could just unconditionally be strict, since we don't need either of these options. The latter is simpler.
@o314
Copy link

o314 commented Apr 19, 2020

Recommandation about how to fix in windows is a bit short / misleading

One should

  • enable strong crypto @ regedit
  • configure tls protocols @ regedit
  • update dotnet
  • update wmf @ microsoft KB3191566

More info can be found there https://docs.microsoft.com/en-us/configmgr/core/plan-design/security/enable-tls-1-2-client

See also JuliaLang/julia#32804

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BinaryProvider.download not checking for Windows Management Framework
4 participants