Populate the server's CertRep with CA certificates before verifying #131
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.
This PR is to solve issue #122.
Copying the issue description here to save readers' time.
The following is stated in RFC: PKCS #7: Cryptographic Message Syntax Version 1.5: SignedData type.
IIUC, this means that in SCEP context, it is valid that as a response to PKCSReq message, a SCEP server returns a PKIMessage without adding the CA certificate because there is an alternate means of obtaining necessary certirficates, which is using GetCaCert in this case.
If a SCEP server acted in this valid way, PKCS7 verification will fail in
scep/scep/scep.go
Line 218 in f3adbb7
The proposal here is not to remove verification, but to populate the certificates field with the CA certificate obtained by the GetCaCert call before verification.