File tree 3 files changed +3
-12
lines changed 3 files changed +3
-12
lines changed Original file line number Diff line number Diff line change 27
27
28
28
from pydantic import BaseModel , Field , StrictStr
29
29
30
- from sigstore ._internal .trust import RekorKeyring
31
30
from sigstore ._utils import KeyID
32
31
from sigstore .errors import VerificationError
33
32
34
33
if typing .TYPE_CHECKING :
34
+ from sigstore ._internal .trust import RekorKeyring
35
35
from sigstore .models import LogEntry
36
36
37
37
Original file line number Diff line number Diff line change 37
37
38
38
from sigstore ._internal .trust import CTKeyring
39
39
from sigstore ._utils import (
40
- DERCert ,
41
40
KeyID ,
42
41
cert_is_ca ,
43
42
key_id ,
@@ -56,7 +55,7 @@ def _pack_signed_entry(
56
55
#
57
56
# [0]: opaque ASN.1Cert<1..2^24-1>
58
57
pack_format = "!BBB{cert_der_len}s"
59
- cert_der = DERCert ( cert .public_bytes (encoding = serialization .Encoding .DER ) )
58
+ cert_der = cert .public_bytes (encoding = serialization .Encoding .DER )
60
59
elif sct .entry_type == LogEntryType .PRE_CERTIFICATE :
61
60
if not issuer_key_id or len (issuer_key_id ) != 32 :
62
61
raise VerificationError ("API misuse: issuer key ID missing" )
@@ -68,7 +67,7 @@ def _pack_signed_entry(
68
67
pack_format = "!32sBBB{cert_der_len}s"
69
68
70
69
# Precertificates must have their SCT list extension filtered out.
71
- cert_der = DERCert ( cert .tbs_precertificate_bytes )
70
+ cert_der = cert .tbs_precertificate_bytes
72
71
fields .append (issuer_key_id )
73
72
else :
74
73
raise VerificationError (f"unknown SCT log entry type: { sct .entry_type !r} " )
Original file line number Diff line number Diff line change 56
56
"""
57
57
A newtype for `str` objects that contain base64 encoded strings.
58
58
"""
59
- PEMCert = NewType ("PEMCert" , str )
60
- """
61
- A newtype for `str` objects that contain PEM-encoded certificates.
62
- """
63
- DERCert = NewType ("DERCert" , bytes )
64
- """
65
- A newtype for `bytes` objects that contain DER-encoded certificates.
66
- """
67
59
KeyID = NewType ("KeyID" , bytes )
68
60
"""
69
61
A newtype for `bytes` objects that contain a key id.
You can’t perform that action at this time.
0 commit comments