Skip to content

Commit

Permalink
Add missing signature algorithms to getHashFuncForSignatureAlgorithm
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Cameron <[email protected]>
  • Loading branch information
tetsuo-cpp committed Jan 28, 2024
1 parent ed2c983 commit a4c6e1f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pkg/server/grpc_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,14 @@ func (g *grpcaCAServer) Watch(_ *health.HealthCheckRequest, _ health.Health_Watc
func getHashFuncForSignatureAlgorithm(signatureAlgorithm x509.SignatureAlgorithm) (crypto.Hash, error) {
switch signatureAlgorithm {
case x509.ECDSAWithSHA256:
case x509.SHA256WithRSA:
return crypto.SHA256, nil
case x509.ECDSAWithSHA384:
case x509.SHA384WithRSA:
return crypto.SHA384, nil
case x509.ECDSAWithSHA512:
case x509.SHA512WithRSA:
return crypto.SHA512, nil
case x509.PureEd25519:
return crypto.Hash(0), nil
}
Expand Down

0 comments on commit a4c6e1f

Please sign in to comment.