-
Notifications
You must be signed in to change notification settings - Fork 128
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add API for using crypto.Signer with SigningContext
The main purpose of the pull request adds a `crypto.Signer` to `SigningContext` to enable signing by an HSM. This change also enables signing with ECDSA keypairs. * Added `NewSigningContext` to construct a `SigningContext` that holds a `crypto.Signer` and the certificate chain and is mutually exclusive with `X509KeyStore` * If the `SigningContext` has a non-nil `KeyStore`, it uses that instead to maintain backwards compatibility and not break existing code. * Use `x509.Certificate`'s `CheckSignature` method instead of the RSA public key to support validation of ECDSA signatures * Added constants and changed the maps slightly to support ECDSA signature methods. Co-authored-by: charredlot <charredlot@gmail.com>
- Loading branch information
1 parent
b317f5f
commit dcbd738
Showing
5 changed files
with
245 additions
and
57 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
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
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
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
Oops, something went wrong.