Skip to content

Commit ee94ba2

Browse files
committed
adding args checker for ct keys
Signed-off-by: Javan lacerda <javanlacerda@google.com>
1 parent 62a9fc9 commit ee94ba2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

sigstore/_internal/trustroot.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,10 @@ def ct_keyring(self) -> CTKeyring:
300300

301301
def _get_ctfe_keys(self) -> Keyring:
302302
"""Return the CTFE public keys contents."""
303-
ctfes: list[bytes] = list(self._get_tlog_keys(self.ctlogs, self.purpose))
303+
if self.args and self.args.ctfe_pem:
304+
ctfes = [self.args.ctfe_pem.read()]
305+
else:
306+
ctfes = list(self._get_tlog_keys(self.ctlogs, self.purpose))
304307
if not ctfes:
305308
raise MetadataError("CTFE keys not found in trusted root")
306309
return Keyring(ctfes)

0 commit comments

Comments
 (0)