We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 324647c commit 68633d4Copy full SHA for 68633d4
sigstore/_internal/rekor/client_v2.py
@@ -20,6 +20,7 @@
20
21
import json
22
import logging
23
+from typing import cast
24
25
import rekor_types
26
import requests
@@ -106,7 +107,10 @@ def _get_key_details(certificate: Certificate) -> common_v1.PublicKeyDetails:
106
107
public_key = certificate.public_key()
108
if isinstance(public_key, EllipticCurvePublicKey):
109
if public_key.curve.name == "secp256r1":
- return common_v1.PublicKeyDetails.PKIX_ECDSA_P256_SHA_256
110
+ return cast(
111
+ common_v1.PublicKeyDetails,
112
+ common_v1.PublicKeyDetails.PKIX_ECDSA_P256_SHA_256,
113
+ )
114
raise ValueError(f"Unsupported EC curve: {public_key.curve.name}")
115
raise ValueError(f"Unsupported public key type: {type(public_key)}")
116
0 commit comments