Skip to content
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

Could not load platform certs: "The Trust Settings Record was corrupted." #44

Open
trevyn opened this issue Feb 22, 2021 · 4 comments
Open
Labels
bug Something isn't working

Comments

@trevyn
Copy link

trevyn commented Feb 22, 2021

$ sw_vers
ProductName:	Mac OS X
ProductVersion:	10.14.6
BuildVersion:	18G8022
$ rustc --version
rustc 1.50.0 (cb75ad5db 2021-02-10)
$ cargo install cargo-supply-chain
[...]
   Installed package `cargo-supply-chain v0.1.1` (executable `cargo-supply-chain`)
$ cargo supply-chain update
Note: this will download large amounts of data (approximately 250Mb).
On a slow network this will take a while.
thread 'main' panicked at 'Could not load patform certs: (None, Custom { kind: Other, error: Error { code: -25262, message: "The Trust Settings Record was corrupted." } })', /Users/eden/.cargo/registry/src/github.com-1ecc6299db9ec823/ureq-2.0.2/src/stream.rs:320:50
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
$ RUST_BACKTRACE=1 cargo supply-chain update
Note: this will download large amounts of data (approximately 250Mb).
On a slow network this will take a while.
thread 'main' panicked at 'Could not load patform certs: (None, Custom { kind: Other, error: Error { code: -25262, message: "The Trust Settings Record was corrupted." } })', /Users/eden/.cargo/registry/src/github.com-1ecc6299db9ec823/ureq-2.0.2/src/stream.rs:320:50
stack backtrace:
   0: rust_begin_unwind
             at /rustc/152f6609246558be5e2582e67376194815e6ba0d/library/std/src/panicking.rs:493:5
   1: core::panicking::panic_fmt
             at /rustc/152f6609246558be5e2582e67376194815e6ba0d/library/core/src/panicking.rs:92:14
   2: core::option::expect_none_failed
             at /rustc/152f6609246558be5e2582e67376194815e6ba0d/library/core/src/option.rs:1300:5
   3: core::ops::function::FnOnce::call_once
   4: once_cell::imp::OnceCell<T>::initialize::{{closure}}
   5: once_cell::imp::initialize_inner
   6: once_cell::imp::OnceCell<T>::initialize
   7: ureq::stream::connect_https
   8: ureq::unit::connect_socket
   9: ureq::unit::connect_inner
  10: ureq::unit::connect
  11: ureq::request::Request::do_call
  12: ureq::request::Request::call
  13: cargo_supply_chain::crates_cache::CratesCache::download
  14: cargo_supply_chain::subcommands::update::update
  15: cargo_supply_chain::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

publishers and crates commands report the same.

@Shnatsel
Copy link
Member

Thank you for the report!

For a start, could you clone the repository locally, drop the "native-certs", part from this line in Cargo.toml, and see if it works then?

ureq = { version = "2.0.1", default-features=false, features = ["tls", "native-certs", "json"] }

You can invoke it via target/release/cargo-supply-chain when built from source. This should produce a functional build.

@Shnatsel
Copy link
Member

I suspect this is an issue with https://github.com/ctz/rustls-native-certs; if the above steps resolve it, we'll need to report the issue to the maintainers of rustls-native-certs.

@trevyn
Copy link
Author

trevyn commented Feb 23, 2021

could you clone the repository locally, drop the "native-certs", part from this line in Cargo.toml, and see if it works then?

Yep, this works, thanks!

(Also, I did cargo install --path ., which worked great)

@Shnatsel
Copy link
Member

Looks like https://github.com/ctz/rustls-native-certs is the culprit, could you report this issue to them as well?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants