':py:obj:`X509Type.has_expired` returns :py:obj:`True` if the certificate\'s not-after
time is in the past.'

def test_has_expired(self):

    cert = X509()
    cert.gmtime_adj_notAfter((-1))
    self.assertTrue(cert.has_expired())
