diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2014-01-08 14:46:55 +1300 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2014-01-08 14:46:55 +1300 |
commit | ac1a700fa16e2ae2146425844823bff70cc86f4b (patch) | |
tree | 8c13d6833b555c1bc0c764c6f2d20c707c53843e /netlib/certutils.py | |
parent | 1c6f71419373f437e1bbf7c03227fd559cb6e829 (diff) | |
download | mitmproxy-ac1a700fa16e2ae2146425844823bff70cc86f4b.tar.gz mitmproxy-ac1a700fa16e2ae2146425844823bff70cc86f4b.tar.bz2 mitmproxy-ac1a700fa16e2ae2146425844823bff70cc86f4b.zip |
Make certificate not-before time 48 hours.
Fixes #200
Diffstat (limited to 'netlib/certutils.py')
-rw-r--r-- | netlib/certutils.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/netlib/certutils.py b/netlib/certutils.py index d9b8ce57..0349bec7 100644 --- a/netlib/certutils.py +++ b/netlib/certutils.py @@ -96,7 +96,7 @@ def dummy_cert(ca, commonname, sans): key = OpenSSL.crypto.load_privatekey(OpenSSL.crypto.FILETYPE_PEM, raw) cert = OpenSSL.crypto.X509() - cert.gmtime_adj_notBefore(-3600) + cert.gmtime_adj_notBefore(-3600*48) cert.gmtime_adj_notAfter(60 * 60 * 24 * 30) cert.set_issuer(ca.get_subject()) cert.get_subject().CN = commonname |