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

ca_roots: use files mixing regular and OpenSSL-only certs #25

Merged
merged 1 commit into from
Sep 21, 2022

Conversation

StefanKarpinski
Copy link
Member

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.

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.
@codecov
Copy link

codecov bot commented Sep 20, 2022

Codecov Report

Merging #25 (4490e26) into master (4d3df64) will decrease coverage by 0.73%.
The diff coverage is 71.42%.

@@            Coverage Diff             @@
##           master      #25      +/-   ##
==========================================
- Coverage   97.63%   96.89%   -0.74%     
==========================================
  Files           4        4              
  Lines         127      129       +2     
==========================================
+ Hits          124      125       +1     
- Misses          3        4       +1     
Impacted Files Coverage Δ
src/ca_roots.jl 87.87% <71.42%> (-2.45%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@StefanKarpinski StefanKarpinski merged commit 8ce1e10 into master Sep 21, 2022
@StefanKarpinski StefanKarpinski deleted the sk/openssl-certs-fix branch September 21, 2022 13:31
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 this pull request may close these issues.

Incorrect detection of OpenSSL-specific TLS certificate files on NixOS
1 participant