Skip to content

Commit 3482068

Browse files
cleanup if-else
Signed-off-by: Ramon Petgrave <[email protected]>
1 parent 4bd34d7 commit 3482068

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

sigstore/_internal/key_details.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,7 @@ def _get_key_details(certificate: Certificate) -> v1.PublicKeyDetails:
4343
else:
4444
raise ValueError(f"Unsupported EC curve: {public_key.curve.name}")
4545
elif isinstance(public_key, rsa.RSAPublicKey):
46-
if public_key.key_size == 2048:
47-
raise ValueError("Unsupported RSA key size: 2048")
48-
elif public_key.key_size == 3072:
46+
if public_key.key_size == 3072:
4947
if isinstance(params, padding.PKCS1v15):
5048
key_details = v1.PublicKeyDetails.PKIX_RSA_PKCS1V15_3072_SHA256
5149
elif isinstance(params, padding.PSS):

0 commit comments

Comments
 (0)