Skip to content

Commit 211b669

Browse files
committed
feat(keyboxchecker/__init__.py): print parent certificate sn
1 parent aca2cf1 commit 211b669

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

keyboxchecker/__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ def main(args):
6565
"Serial number",
6666
"Subject",
6767
"Certificate within validity period",
68+
"certificate chain",
6869
"Valid keychain",
6970
"Note",
7071
"Not found in Google's revoked keybox list",
@@ -135,6 +136,7 @@ def main(args):
135136
status = revoked_keybox_list.get(serial_number)
136137

137138
flag = True
139+
certificates = []
138140
for i in range(pem_number - 1):
139141
try:
140142
son_certificate = x509.load_pem_x509_certificate(
@@ -146,7 +148,6 @@ def main(args):
146148
except ValueError:
147149
rmjob.append(kb)
148150
break
149-
150151
if son_certificate.issuer != father_certificate.subject:
151152
flag = False
152153
break
@@ -199,9 +200,11 @@ def main(args):
199200
status = status or revoked_keybox_list.get(
200201
hex(father_certificate.serial_number)[2:]
201202
)
203+
certificates.append(father_certificate.serial_number)
202204
except Exception: # pylint: disable=W0718
203205
flag = False
204206
break
207+
values.append(" | ".join(map(str,certificates)))
205208
values.append("✅" if flag else "❌")
206209

207210
root_public_key = (

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "keyboxchecker"
3-
version = "1.2.4"
3+
version = "1.3.0"
44
description = ""
55
authors = ["Li Hua <[email protected]>"]
66
readme = "README.md"

0 commit comments

Comments
 (0)