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

Permit trusted self-signed certificates #170

Closed
wants to merge 1 commit into from

Conversation

Ichbinjoe
Copy link

@Ichbinjoe Ichbinjoe commented Jan 9, 2021

Self-signed certificates are both an end-entity as well as a certificate
authority in the eyes of webpki - since we have ultimate trust in the
supplied trust anchors, a certificate supplied with the same subject as a
trust anchor and is directly signed by the same trust anchor should also
be valid, even though the certificate supplied might still be a CA.

Alternate to #127 and fixes #114. Unlike #127, this change has no public facing API change and doesn't require marking certain certificates as explicitly self-signed.

@codecov
Copy link

codecov bot commented Jan 9, 2021

Codecov Report

Merging #170 (04caeca) into master (28951a0) will increase coverage by 0.28%.
The diff coverage is 88.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #170      +/-   ##
==========================================
+ Coverage   73.91%   74.20%   +0.28%     
==========================================
  Files          14       14              
  Lines        1357     1380      +23     
==========================================
+ Hits         1003     1024      +21     
- Misses        354      356       +2     
Impacted Files Coverage Δ
src/verify_cert.rs 88.17% <76.92%> (-0.89%) ⬇️
tests/integration.rs 100.00% <100.00%> (ø)
src/calendar.rs 90.10% <0.00%> (+1.09%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 28951a0...04caeca. Read the comment docs.

@Ichbinjoe Ichbinjoe force-pushed the selfsigned branch 3 times, most recently from c382e92 to 6c4f081 Compare January 9, 2021 23:22
Self-signed certificates are both an end-entity as well as a certificate
authority in the eyes of webpki - since we have ultimate trust in the
supplied trust anchors, a certificate supplied with the same subject as a
trust anchor and is directly signed by the same trust anchor should also
be valid, even though the certificate supplied might still be a CA.
@Ichbinjoe Ichbinjoe marked this pull request as ready for review January 9, 2021 23:59
@briansmith
Copy link
Owner

Thank you. Please see #114 (comment) to understand why I'm closing this.

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.

Self-signed certificate rejected with WebPKIError(CAUsedAsEndEntity)
2 participants