forked from linuxboot/fiano
-
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.
NewSignatureData works with generic crypto signer. (linuxboot#420)
Casting the crypto.Signer into concrete crypto.PrivateKey implementations unnecessarily limits the use of the library to software implementations provided by the golang crypto libraries. This patch makes the detection of the algorithm based on the public key which is exposed through crypto.Signer.Public() and then uses the interface function Sign to perform the actual signing. This allow for hiding the implementation behind the crypto.Signer interface, e.g., for signing with an HSM backed key. Caveat: This patch does not add support for generic SM2 implementations. But this is not a regression. Signed-off-by: Janis Danisevskis <[email protected]> Co-authored-by: ron minnich <[email protected]>
- Loading branch information
Showing
1 changed file
with
15 additions
and
18 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