Skip to content

Commit

Permalink
Fix loading peer certificates for corporate networks (#83)
Browse files Browse the repository at this point in the history
Currently when running SVM on a corporate style network that uses a peer
certificate you will get an error because it won't automatically be
recognised. The error looks like this

```
./svm list
Error: error sending request for url (https://github.com/roynalnaruto/solc-builds/raw/240988f6e5de44fd182a9d4446a838cb7b7166db/macosx/aarch64/list.json): error trying to connect: invalid peer certificate contents: invalid peer certificate: UnknownIssuer

Caused by:
    0: error trying to connect: invalid peer certificate contents: invalid peer certificate: UnknownIssuer
    1: invalid peer certificate contents: invalid peer certificate: UnknownIssuer
```

This PR includes the `rustls-tls-native-roots` feature in `reqwest` so
that peer certificates can be included which will prevent the error.

This is my first PR on this repo and I'm fairly new to rust so please
let me know if I've missed anything, thanks.

---------

Co-authored-by: evalir <[email protected]>
Co-authored-by: DaniPopes <[email protected]>
  • Loading branch information
3 people authored Feb 7, 2024
1 parent efd7d70 commit 4d33b7e
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 17 deletions.
45 changes: 29 additions & 16 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crates/svm-rs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ default = ["rustls", "cli", "solc"]

# lib
openssl = ["reqwest/native-tls"]
rustls = ["reqwest/rustls-tls"]
rustls = ["reqwest/rustls-tls", "reqwest/rustls-tls-native-roots"]
blocking = ["reqwest/blocking"]

# bin
Expand Down

0 comments on commit 4d33b7e

Please sign in to comment.