From 5936a48e592b3f45b83dc76feab8bb8b5df81da1 Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Fri, 22 Jul 2011 11:11:45 +1200 Subject: [PATCH] Drop cert expiry time to avoid a bug in some OpenSSL versions. --- libmproxy/utils.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libmproxy/utils.py b/libmproxy/utils.py index 04a145d52..4d8c7c41c 100644 --- a/libmproxy/utils.py +++ b/libmproxy/utils.py @@ -17,6 +17,7 @@ import time, functools, copy, cgi import json CERT_SLEEP_TIME = 1 +CERT_EXPIRY = str(365 * 3) def timestamp(): """ @@ -339,7 +340,7 @@ def dummy_ca(path): "-x509", "-config", data.path("resources/ca.cnf"), "-nodes", - "-days", "9999", + "-days", CERT_EXPIRY, "-out", path, "-newkey", "rsa:1024", "-keyout", path, @@ -434,7 +435,7 @@ def dummy_cert(certdir, ca, commonname): "x509", "-req", "-in", reqpath, - "-days", "9999", + "-days", CERT_EXPIRY, "-out", certpath, "-CA", ca, "-CAcreateserial", @@ -457,7 +458,7 @@ def dummy_cert(certdir, ca, commonname): "-x509", "-config", confpath, "-nodes", - "-days", "9999", + "-days", CERT_EXPIRY, "-out", certpath, "-newkey", "rsa:1024", "-keyout", certpath,