Skip to content

Instantly share code, notes, and snippets.

@jlsherrill
Created March 3, 2016 21:23
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
#/usr/bin/python
# usage
# python not_after.py /path/to/cert
#!/bin/python
import sys
from rhsm import _certificate
cert = _certificate.load(sys.argv[1])
print "get_not_before():"
print cert.get_not_before()
print "get_not_after():"
print cert.get_not_after()
@jlsherrill
Copy link
Author

[root@abed ~]# ./not_after.py test.crt
get_not_before():
Feb 8 16:57:38 2016 GMT
get_not_after():
Bad time value

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment