Conversation
Contributor
|
Nice improvement! I don't see anything substantive lacking here - what else are you wanting to get done before taking it out of draft status? |
Contributor
Author
|
Just waiting on green travis. Looks like I have one more integration test to fix (only shows up in config-next). |
rolandshoemaker
approved these changes
Jul 6, 2020
rolandshoemaker
approved these changes
Jul 6, 2020
jsha
approved these changes
Jul 6, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The
KeyPolicy.GoodKeymethod is used to validate both public keysused to sign JWK messages, and public keys contained inside CSR
messages.
According to RFC8555 section 6.7, validation failure in the former
case should result in
badPublicKey, while validation failure inthe latter case should result in
badCSR. In either case, a failuredue to reasons other than the key itself should result in
serverInternal.However, the GoodKey method returns a variety of different errors
which are not all applicable depending on the context in which it is
called. In addition, the
csr.VerifyCSRmethod passes these errorsthrough verbatim, resulting in ACME clients receiving confusing and
incorrect error message types.
This change causes the GoodKey method to always return either a
generic error or a KeyError. Calling methods should treat a
KeyErroras either a
badPublicKeyor abadCSRdepending on their context,and may treat a generic error however they choose (though likely as a
serverInternal error).
Fixes #4930