Skip to content

Commit ba05137

Browse files
committed
verify: avoid modifying the cert list
We don't need to modify the list so let's avoid it to make it easier to review. Signed-off-by: Jussi Kukkonen <[email protected]>
1 parent 9b28d16 commit ba05137

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

sigstore/verify/verifier.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,10 +135,10 @@ def _verify_signed_timestamp(
135135

136136
builder = (
137137
VerifierBuilder()
138-
.tsa_certificate(certificates.pop(0))
139-
.add_root_certificate(certificates.pop())
138+
.tsa_certificate(certificates[0])
139+
.add_root_certificate(certificates[-1])
140140
)
141-
for certificate in certificates:
141+
for certificate in certificates[1, -1]:
142142
builder = builder.add_intermediate_certificate(certificate)
143143

144144
verifier = builder.build()

0 commit comments

Comments
 (0)