-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor self-signed signature handling
These changes are borrowed from the atc0005/check-cert project where work is underway towards implementing upcoming chain order validation support. - add new helper functions - `certs.verifySignature` - `certs.verifySignatureMD5WithRSA` - `certs.verifySignatureSHA1WithRSA` - `certs.verifySignatureECDSAWithSHA1` - remove `certs.isSelfSignedMD5WithRSA helper func - refactor `certs.isSelfSigned` to drop use of that func and use `certs.verifySignature` helper func directly - add `certs.verifySignature` func to act as entry point for all signature verification work calling out to algorithm-specific helper functions as needed - update/add `nolint:gosec` directives NOTE: I have *not* tested the `certs.verifySignatureECDSAWithSHA1` function as I do not have a certificate with signature algorithm of `ECDSAWithSHA1` to test with.
- Loading branch information
Showing
1 changed file
with
228 additions
and
48 deletions.
There are no files selected for viewing
This file contains 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