-
-
Notifications
You must be signed in to change notification settings - Fork 16
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
Incorrect detection of OpenSSL-specific TLS certificate files on NixOS #24
Comments
13 tasks
Thanks for the report and analysis. I'll see if I can fix the logic here. |
StefanKarpinski
added a commit
that referenced
this issue
Sep 20, 2022
Fix #24. PR #18 changed the logic for searching for CA root cert files to skip files containing OpenSSL-only "BEGIN TRUSTED CERTIFICATE" certificates since MbedTLS cannot use these certificates. This was a bit too aggressive: regular certs and OpenSSL-only certs can coexist in the same file, so we should use any file that has some regular cert in it, even if it also has OpenSSL-only certs. We should only emit a warning if we (1) found no files with regular certs and (2) found files with OpenSSL-only certs.
StefanKarpinski
added a commit
that referenced
this issue
Sep 21, 2022
Fix #24. PR #18 changed the logic for searching for CA root cert files to skip files containing OpenSSL-only "BEGIN TRUSTED CERTIFICATE" certificates since MbedTLS cannot use these certificates. This was a bit too aggressive: regular certs and OpenSSL-only certs can coexist in the same file, so we should use any file that has some regular cert in it, even if it also has OpenSSL-only certs. We should only emit a warning if we (1) found no files with regular certs and (2) found files with OpenSSL-only certs.
Is there a simple way to silence this warning on julia 1.8? |
I don't think so. |
The change that fixed this could be backported to 1.8 since it's arguably a bugfix. |
It'd be truly amazing to have it backported. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Julia on the NixOS distribution complains about "NetworkOptions could only find OpenSSL-specific TLS certificate files which cannot be used by MbedTLS", which seems to be incorrect.
NixOS provides
/etc/ssl/certs/ca-bundle.crt
, which contains both certificate variants:-----BEGIN CERTIFICATE-----
as well as-----BEGIN TRUSTED CERTIFICATE-----
. An excerpt from the file is shown below.It seems MbedTLS understands this file, which can be confirmed with the following code:
Without setting the environment variable, the warning is printed and
ca_roots()
returns the bundled_ca_roots():I suppose, that the warning should be shown only when the number of
BEGIN CERTIFICATE
lines is zero and not if the number ofBEGIN TRUSTED CERTIFICATE
lines is greater than zero.Excerpt from
/etc/ssl/certs/ca-bundle.crt
on NixOS:The text was updated successfully, but these errors were encountered: