mirror of
https://gitee.com/open-loongarch/buildroot-2024.08.git
synced 2026-10-28 22:17:12 +08:00
first commit: base 2024.08
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
from asn1crypto import pem, x509
|
||||
|
||||
|
||||
with open('/etc/ssl/certs/ISRG_Root_X2.pem', 'rb') as f:
|
||||
der_bytes = f.read()
|
||||
if pem.detect(der_bytes):
|
||||
type_name, headers, der_bytes = pem.unarmor(der_bytes)
|
||||
|
||||
cert = x509.Certificate.load(der_bytes)
|
||||
|
||||
assert cert.subject.native["common_name"] == "ISRG Root X2"
|
||||
Reference in New Issue
Block a user