Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
komuw committed Jun 18, 2024
1 parent a9fc019 commit 7c78dad
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions internal/acme/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,16 +93,16 @@ func jwkEncode(pub ecdsa.PublicKey) jwk {
// It returns ("", 0) if the key is not supported.
func jwsHasher(pub ecdsa.PublicKey) (string, crypto.Hash) {
switch pub.Params().Name {
default:
// This package only deals with `ecdsa.PublicKey`.
// So, if we get here, it must be a programmer error.
panic(fmt.Sprintf("ong/acme: unknown ecdsa.PublicKey param; %v", pub.Params().Name))
case "P-256":
return "ES256", crypto.SHA256
case "P-384":
return "ES384", crypto.SHA384
case "P-521":
return "ES512", crypto.SHA512
default:
// This package only deals with `ecdsa.PublicKey`.
// So, if we get here, it must be a programmer error.
panic(fmt.Sprintf("ong/acme: unknown ecdsa.PublicKey param; %v", pub.Params().Name))
}
}

Expand Down

0 comments on commit 7c78dad

Please sign in to comment.