diff options
Diffstat (limited to 'scripts/rpki')
-rw-r--r-- | scripts/rpki/x509.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/rpki/x509.py b/scripts/rpki/x509.py index 0c3639b2..1952ab8a 100644 --- a/scripts/rpki/x509.py +++ b/scripts/rpki/x509.py @@ -188,6 +188,14 @@ class X509(DER_object): """Get the subject of this certificate.""" return self.get_POW().getSubject() + def getNotBefore(self): + """Get the inception time of this certificate.""" + return POW.pkix.utc2time(self.get_POW().getNotBefore()) + + def getNotAfter(self): + """Get the expiration time of this certificate.""" + return POW.pkix.utc2time(self.get_POW().getNotAfter()) + def _get_POW_extensions(self): """Parse extensions from the POW value of this certificate. |