aboutsummaryrefslogtreecommitdiffstats
path: root/netlib/certutils.py
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2015-02-17 00:10:10 +0100
committerMaximilian Hils <git@maximilianhils.com>2015-02-17 00:10:10 +0100
commit2a2402dfffc9f1a51869170793673eaf49207d0f (patch)
tree6d70d4a361099cc354f720338de490c0a81bbec8 /netlib/certutils.py
parent7e5bb74e7211dbe06b33847475854f54c56aa8d5 (diff)
downloadmitmproxy-2a2402dfffc9f1a51869170793673eaf49207d0f.tar.gz
mitmproxy-2a2402dfffc9f1a51869170793673eaf49207d0f.tar.bz2
mitmproxy-2a2402dfffc9f1a51869170793673eaf49207d0f.zip
...two years is not enough.
Diffstat (limited to 'netlib/certutils.py')
-rw-r--r--netlib/certutils.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/netlib/certutils.py b/netlib/certutils.py
index 3eb9846d..5d8a56b8 100644
--- a/netlib/certutils.py
+++ b/netlib/certutils.py
@@ -6,7 +6,7 @@ from pyasn1.codec.der.decoder import decode
from pyasn1.error import PyAsn1Error
import OpenSSL
-DEFAULT_EXP = 62208000 # =24 * 60 * 60 * 720
+DEFAULT_EXP = 157680000 # = 24 * 60 * 60 * 365 * 5
# Generated with "openssl dhparam". It's too slow to generate this on startup.
DEFAULT_DHPARAM = """-----BEGIN DH PARAMETERS-----
MIGHAoGBAOdPzMbYgoYfO3YBYauCLRlE8X1XypTiAjoeCFD0qWRx8YUsZ6Sj20W5
@@ -61,7 +61,7 @@ def dummy_cert(privkey, cacert, commonname, sans):
cert = OpenSSL.crypto.X509()
cert.gmtime_adj_notBefore(-3600*48)
- cert.gmtime_adj_notAfter(60 * 60 * 24 * 365 * 5)
+ cert.gmtime_adj_notAfter(DEFAULT_EXP)
cert.set_issuer(cacert.get_subject())
cert.get_subject().CN = commonname
cert.set_serial_number(int(time.time()*10000))