@@ -82,14 +82,14 @@ def key_to_details(
82
82
key : ec .EllipticCurvePrivateKey | rsa .RSAPrivateKey ,
83
83
) -> v1 .PublicKeyDetails :
84
84
"""
85
- Converts a key to a PublicKeyDetails. Although, the key type is currently hardcoded to PKIX_ECDSA_P384_SHA_256 .
85
+ Converts a key to a PublicKeyDetails. Although, the key type is currently hardcoded to a single type .
86
86
"""
87
87
if isinstance (key , ec .EllipticCurvePrivateKey ) and isinstance (
88
88
key .curve , ec .SECP256R1
89
89
):
90
90
return v1 .PublicKeyDetails .PKIX_ECDSA_P384_SHA_256
91
91
else :
92
- raise Exception ("unsupported key type" )
92
+ raise Exception (f "unsupported key type { key } " )
93
93
94
94
95
95
class Signer :
@@ -300,22 +300,6 @@ def sign_artifact(
300
300
),
301
301
signature = artifact_signature ,
302
302
)
303
- proposed_entry = rekor_types .Hashedrekord (
304
- spec = rekor_types .hashedrekord .HashedrekordV001Schema (
305
- signature = rekor_types .hashedrekord .Signature (
306
- content = base64 .b64encode (artifact_signature ).decode (),
307
- public_key = rekor_types .hashedrekord .PublicKey (
308
- content = b64_cert .decode ()
309
- ),
310
- ),
311
- data = rekor_types .hashedrekord .Data (
312
- hash = rekor_types .hashedrekord .Hash (
313
- algorithm = hashed_input ._as_hashedrekord_algorithm (),
314
- value = hashed_input .digest .hex (),
315
- )
316
- ),
317
- ),
318
- )
319
303
320
304
# Create the proposed hashedrekord entry
321
305
if isinstance (self ._signing_ctx ._rekor , RekorV2Client ):
0 commit comments