|
@@ -18,8 +18,8 @@ Reported-by: Chen Minqiang <[email protected]>
|
|
|
Reported-by: Shane Synan <[email protected]>
|
|
|
Signed-off-by: Christian Lamparter <[email protected]>
|
|
|
---
|
|
|
---- a/work/mozilla/certdata2pem.py
|
|
|
-+++ b/work/mozilla/certdata2pem.py
|
|
|
+--- a/mozilla/certdata2pem.py
|
|
|
++++ b/mozilla/certdata2pem.py
|
|
|
@@ -21,16 +21,12 @@
|
|
|
# USA.
|
|
|
|
|
@@ -42,8 +42,8 @@ Signed-off-by: Christian Lamparter <[email protected]>
|
|
|
if not obj['CKA_LABEL'] in trust or not trust[obj['CKA_LABEL']]:
|
|
|
continue
|
|
|
-
|
|
|
-- cert = x509.load_der_x509_certificate(obj['CKA_VALUE'])
|
|
|
-- if cert.not_valid_after < datetime.datetime.now():
|
|
|
+- cert = x509.load_der_x509_certificate(bytes(obj['CKA_VALUE']))
|
|
|
+- if cert.not_valid_after < datetime.datetime.utcnow():
|
|
|
- print('!'*74)
|
|
|
- print('Trusted but expired certificate found: %s' % obj['CKA_LABEL'])
|
|
|
- print('!'*74)
|