30
30
from pydantic import ValidationError
31
31
from rich .console import Console
32
32
from 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
37
35
from typing_extensions import TypeAlias
38
36
39
37
from sigstore import __version__ , dsse
@@ -670,7 +668,7 @@ def _sign_file_threaded(
670
668
raise exp_certificate
671
669
672
670
_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 } "
674
672
)
675
673
676
674
if outputs .signature is not None :
@@ -1236,7 +1234,7 @@ def _fix_bundle(args: argparse.Namespace) -> None:
1236
1234
1237
1235
rekor = RekorClient .staging () if args .staging else RekorClient .production ()
1238
1236
1239
- raw_bundle = RawBundle .from_dict ( json . loads ( args .bundle .read_bytes () ))
1237
+ raw_bundle = RawBundle .from_json ( args .bundle .read_bytes ())
1240
1238
1241
1239
if len (raw_bundle .verification_material .tlog_entries ) != 1 :
1242
1240
_fatal ("unfixable bundle: must have exactly one log entry" )
@@ -1249,8 +1247,8 @@ def _fix_bundle(args: argparse.Namespace) -> None:
1249
1247
inclusion_proof = tlog_entry .inclusion_proof
1250
1248
if not inclusion_proof .checkpoint :
1251
1249
_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 ]
1254
1252
1255
1253
# Try to create our invariant-preserving Bundle from the any changes above.
1256
1254
try :
0 commit comments