Skip to content

Commit

Permalink
Modify key details with correct values
Browse files Browse the repository at this point in the history
Co-authored-by: Fredrik Skogman <[email protected]>
Signed-off-by: Cody Soyland <[email protected]>
  • Loading branch information
codysoyland and kommendorkapten authored Mar 28, 2024
1 parent 266c96f commit 51aaec7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/apis/config/sigstore_keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -233,11 +233,11 @@ func DeserializePublicKey(publicKey []byte) (*pbcommon.PublicKey, crypto.PublicK
case *rsa.PublicKey:
switch k.Size() {
case 2048:
keyDetails = pbcommon.PublicKeyDetails_PKIX_RSA_PSS_2048_SHA256
keyDetails = pbcommon.PublicKeyDetails_PKIX_RSA_PKCS1V15_2048_SHA256
case 3072:
keyDetails = pbcommon.PublicKeyDetails_PKIX_RSA_PSS_3072_SHA256
keyDetails = pbcommon.PublicKeyDetails_PKIX_RSA_PKCS1V15_3072_SHA256
case 4096:
keyDetails = pbcommon.PublicKeyDetails_PKIX_RSA_PSS_4096_SHA256
keyDetails = pbcommon.PublicKeyDetails_PKIX_RSA_PKCS1V15_4096_SHA256
default:
keyDetails = pbcommon.PublicKeyDetails_PUBLIC_KEY_DETAILS_UNSPECIFIED

Check warning on line 242 in pkg/apis/config/sigstore_keys.go

View check run for this annotation

Codecov / codecov/patch

pkg/apis/config/sigstore_keys.go#L233-L242

Added lines #L233 - L242 were not covered by tests
}
Expand Down

0 comments on commit 51aaec7

Please sign in to comment.