Skip to content

Commit

Permalink
add comment
Browse files Browse the repository at this point in the history
Signed-off-by: Asra Ali <asraa@google.com>
  • Loading branch information
asraa committed Sep 7, 2022
1 parent 2db153d commit 1736e3c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/keys/ecdsa.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ import (
)

func init() {
VerifierMap.Store(data.KeyTypeECDSA_SHA2_P256, NewEcdsaVerifier)
// Note: we use LoadOrStore here to prevent accidentally overriding the
// an explicit deprecated ECDSA verifier.
// TODO: When deprecated ECDSA is removed, this can switch back to Store.
VerifierMap.LoadOrStore(data.KeyTypeECDSA_SHA2_P256, NewEcdsaVerifier)
SignerMap.Store(data.KeyTypeECDSA_SHA2_P256, newEcdsaSigner)
}

Expand Down

0 comments on commit 1736e3c

Please sign in to comment.