mark
February 23, 2018, 12:45pm
1
I can't get a new crate on my Win 7 machine. rustup works fine (so the network's ok), but cargo check fails.
R:\rs\myapp>rustup update stable
info: syncing channel updates for 'stable-x86_64-pc-windows-msvc'
stable-x86_64-pc-windows-msvc unchanged - rustc 1.24.0 (4d90ac38c 2018-02-12)
R:\rs\myapp>cargo build --release
Updating registry `https://github.com/rust-lang/crates.io-index`
warning: spurious network error (2 tries remaining): unknown certificate check failure; class=Net (12); code=Certificate (-17
)
warning: spurious network error (1 tries remaining): unknown certificate check failure; class=Net (12); code=Certificate (-17
)
error: failed to load source for a dependency on `regex`
Caused by:
Unable to update registry `https://github.com/rust-lang/crates.io-index`
Caused by:
failed to fetch `https://github.com/rust-lang/crates.io-index`
Caused by:
unknown certificate check failure; class=Net (12); code=Certificate (-17)
Is this likely to be a temporary problem, or is there something I need to do (or can do) to fix it?
Thanks for the link. I installed the update but to do the registry change I had to update IE (which I don't use) since the "easy fix" button doesn't seem to work with Firefox. Anyway it works now.
Hm, it should be broken, may be github revert changes?
opened 09:01AM - 23 Feb 18 UTC
closed 03:45PM - 28 Feb 18 UTC
Issue was originally discovered in an unrelated issue: https://github.com/rust-l… ang/cargo/issues/5065
Due to a recent change on Github, TLS 1.0 and 1.1 are no longer supported: https://github.com/blog/2507-weak-cryptographic-standards-removed
Unfortunately Windows 7 WinHTTP by default only uses up to TLS 1.0, and because Cargo uses libgit2 which uses WinHTTP, this renders cargo effectively broken whenever it tries to fetch any git repo including the crates.io index.
```powershell
PS [00:51:51] C:\Users\Arnavion\Desktop> cargo install https://github.com/alexcrichton/wasm-gc
Updating registry `https://github.com/rust-lang/crates.io-index`
warning: spurious network error (2 tries remaining): unknown certificate check failure; class=Net (12); code=Certificate (-17)
warning: spurious network error (1 tries remaining): unknown certificate check failure; class=Net (12); code=Certificate (-17)
error: failed to fetch `https://github.com/rust-lang/crates.io-index`
Caused by:
unknown certificate check failure; class=Net (12); code=Certificate (-17)
```
Fortunately this issue can be fixed by the user by ensuring they have a certain update and also editing their registry appropriately, as described here: https://support.microsoft.com/en-us/help/3140245/update-to-enable-tls-1-1-and-tls-1-2-as-a-default-secure-protocols-in
However users are not going to magically know what the solution is when they run into this problem, so we need to tell them everywhere possible. We need to spread awareness on this issue through the Rust blog, TWiR, Reddit, Twitter, and anywhere else that Rust has a social media presence.
Additionally we need to implement checks in Cargo and Rustup for users that are using Windows 7 and don't have the fix applied, telling the user ***very*** **LOUDLY** that they need to apply that fix, along with providing detailed instructions on how to fix it.