PsqClient: configure with system CA chain #3
+20
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
quiche doesn't automatically configure a set of CA certificates to use when enabling verification (as it doesn't enable verification by default either), so it was never possible to connect to an endpoint with a valid certificate, as the set of trusted root was empty.
Fix this, by calling
qconfig.load_verify_locations_from_{directory_file}with the results of aopenssl_probe::probe()call - the same that rustls-native-certs uses in the Linux case.It uses SSL_CERT_FILE / SSL_CERT_DIR env vars, with sane defaults.
I opted against using rustls-native-certs. It also supports reading from the system certificate store / keychain on Windows and MacOS, but as quiche only allows specifying a directory/file where it reads these on its own, and not from memory, and writing this kind of stuff to a temporary file before reading it back in sounds like a nightmare.
With this, I'm able to point psq-client to my server with a LE certificate, without having to specify
--ignore-cert.