diff options
author | Rob Austein <sra@hactrn.net> | 2007-09-24 21:06:24 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2007-09-24 21:06:24 +0000 |
commit | 7e75f2f50c1d70ca1c5e5af6ea922d498062554f (patch) | |
tree | c9bb00125ad74dc6900b11860d6b01ab8c57df43 /scripts/rpki | |
parent | 08303a726509e6a3f0375496fc4b2acc6ee4f215 (diff) |
Extract timestamps from certificates
svn path=/scripts/rpki/x509.py; revision=1017
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. |