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

Certificate verification fails on Windows native build #61

Closed
LPardue opened this issue Jun 15, 2019 · 2 comments · Fixed by #75
Closed

Certificate verification fails on Windows native build #61

LPardue opened this issue Jun 15, 2019 · 2 comments · Fixed by #75

Comments

@LPardue
Copy link
Contributor

LPardue commented Jun 15, 2019

The http3-client fails certificate verification when built natively, e.g.

$ http3-client https://cloudflare-quic.com
snip...
[2019-06-15T11:43:24.931343300Z TRACE quiche::tls] error:1000007d:SSL routines:OPENSSL_internal:CERTIFICATE_VERIFY_FAILED
[2019-06-15T11:43:24.937788700Z ERROR http3_client] 88dab5f9b993280072028d5b4d34d30a4e3c recv failed: TlsFail

The cert for cloudflare-quic.com is trusted by my machine. So I suspect this is something related to building quiche in a way that properly imports my system trust store.

@LPardue
Copy link
Contributor Author

LPardue commented Jun 16, 2019

One path of research suggests this used to be a problem for rustup. They had a mini crate that could attempt to load certs manually from the platform store and then manually populate the store object used by SSL library. The code for windows is here, https://github.com/rust-lang/rustup.rs/blob/27fccd3500321ee66da77589d3f4a65fcc7bddfb/src/ca-loader/src/sys/windows.rs

Based on that example, you'd do something like below in quiche's tls.rs, which would require exposing a few new functions

let bundle = CertBundle::new();
let store = X509_STORE_new();
for cert in bundle {
    X509_STORE_add_cert(store, cert);
}

@LPardue
Copy link
Contributor Author

LPardue commented Jul 8, 2019

I have a working PoC for this. Needs some tidy up but I can create a PR soon.

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

Successfully merging a pull request may close this issue.

1 participant