示例#1
0
 def get_not_after(self):
     """Get the 'not after' date field as seconds since the epoch."""
     validity = self.get_validity()
     not_after = validity['notAfter']
     return utils.asn1_time_to_timestamp(not_after)
示例#2
0
 def get_not_after(self):
     """Get the 'not after' date field as seconds since the epoch."""
     not_after = self._lib.X509_get_notAfter(self._certObj)
     return utils.asn1_time_to_timestamp(not_after)
示例#3
0
 def get_not_before(self):
     """Get the 'not before' date field as seconds since the epoch."""
     validity = self.get_validity()
     not_before = validity['notBefore']
     return utils.asn1_time_to_timestamp(not_before)
示例#4
0
 def get_not_after(self):
     """Get the 'not after' date field as seconds since the epoch."""
     not_after = self._lib.X509_get_notAfter(self._certObj)
     return utils.asn1_time_to_timestamp(not_after)
示例#5
0
 def get_not_before(self):
     """Get the 'not before' date field as seconds since the epoch."""
     not_before = self._lib.X509_get_notBefore(self._certObj)
     return utils.asn1_time_to_timestamp(not_before)
示例#6
0
 def get_not_before(self):
     """Get the 'not before' date field as seconds since the epoch."""
     not_before = self._lib.X509_get_notBefore(self._certObj)
     return utils.asn1_time_to_timestamp(not_before)
示例#7
0
 def get_not_after(self):
     """Get the 'not after' date field as seconds since the epoch."""
     validity = self.get_validity()
     not_after = validity['notAfter']
     return utils.asn1_time_to_timestamp(not_after)
示例#8
0
 def get_not_before(self):
     """Get the 'not before' date field as seconds since the epoch."""
     validity = self.get_validity()
     not_before = validity['notBefore']
     return utils.asn1_time_to_timestamp(not_before)
示例#9
0
 def test_post_2050(self):
     """Test date post 2050, which causes different encoding."""
     t = 2600000000
     asn1_time = utils.timestamp_to_asn1_time(t)
     res = utils.asn1_time_to_timestamp(asn1_time)
     self.assertEqual(t, res)
示例#10
0
 def test_round_check(self):
     t = 0
     asn1_time = utils.timestamp_to_asn1_time(t)
     res = utils.asn1_time_to_timestamp(asn1_time)
     self.assertEqual(t, res)