From 7e75f2f50c1d70ca1c5e5af6ea922d498062554f Mon Sep 17 00:00:00 2001 From: Rob Austein Date: Mon, 24 Sep 2007 21:06:24 +0000 Subject: Extract timestamps from certificates svn path=/scripts/rpki/x509.py; revision=1017 --- scripts/rpki/x509.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'scripts/rpki/x509.py') 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. -- cgit v1.2.3