3030from pydantic import ValidationError
3131from rich .console import Console
3232from rich .logging import RichHandler
33- from sigstore_protobuf_specs .dev .sigstore .bundle .v1 import (
34- Bundle as RawBundle ,
35- )
36- from sigstore_protobuf_specs .dev .sigstore .common .v1 import HashAlgorithm
33+ from sigstore_models .bundle .v1 import Bundle as RawBundle
34+ from sigstore_models .common .v1 import HashAlgorithm
3735from typing_extensions import TypeAlias
3836
3937from sigstore import __version__ , dsse
@@ -670,7 +668,7 @@ def _sign_file_threaded(
670668 raise exp_certificate
671669
672670 _logger .info (
673- f"Transparency log entry created at index: { result .log_entry .log_index } "
671+ f"Transparency log entry created at index: { result .log_entry ._inner . log_index } "
674672 )
675673
676674 if outputs .signature is not None :
@@ -1236,7 +1234,7 @@ def _fix_bundle(args: argparse.Namespace) -> None:
12361234
12371235 rekor = RekorClient .staging () if args .staging else RekorClient .production ()
12381236
1239- raw_bundle = RawBundle .from_dict ( json . loads ( args .bundle .read_bytes () ))
1237+ raw_bundle = RawBundle .from_json ( args .bundle .read_bytes ())
12401238
12411239 if len (raw_bundle .verification_material .tlog_entries ) != 1 :
12421240 _fatal ("unfixable bundle: must have exactly one log entry" )
@@ -1249,8 +1247,8 @@ def _fix_bundle(args: argparse.Namespace) -> None:
12491247 inclusion_proof = tlog_entry .inclusion_proof
12501248 if not inclusion_proof .checkpoint :
12511249 _logger .info ("fixable: bundle's log entry is missing a checkpoint" )
1252- new_entry = rekor .log .entries .get (log_index = tlog_entry .log_index ). _to_rekor ()
1253- raw_bundle .verification_material .tlog_entries = [new_entry ]
1250+ new_entry = rekor .log .entries .get (log_index = tlog_entry .log_index )
1251+ raw_bundle .verification_material .tlog_entries = [new_entry . _inner ]
12541252
12551253 # Try to create our invariant-preserving Bundle from the any changes above.
12561254 try :
0 commit comments