diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2011-06-11 15:16:16 +1200 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2011-06-11 15:16:16 +1200 |
commit | 7d7803a4d9a21d95a005294f4eaca326bc076138 (patch) | |
tree | dcfe3cf51caae972525572d096f70268948574bf /test/test_utils.py | |
parent | 62f9864395fcb9933992257d5beabf84e532f85f (diff) | |
download | mitmproxy-7d7803a4d9a21d95a005294f4eaca326bc076138.tar.gz mitmproxy-7d7803a4d9a21d95a005294f4eaca326bc076138.tar.bz2 mitmproxy-7d7803a4d9a21d95a005294f4eaca326bc076138.zip |
Add a hideous kludge to fix not-yet-valid certificates.
- The OpenSSL x509 has no way to explicitly set the notBefore value on
certificates.
- If two systems have the same configured time, it's possible to return a
certificate before the validity start time has arrived.
- We "solve" this by waiting for one second when a certificate is first
generated before returning the cert. The alternative is to rewrite pretty much
all of our certificate generation, a thought too horrible to contemplate.
Diffstat (limited to 'test/test_utils.py')
-rw-r--r-- | test/test_utils.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/test_utils.py b/test/test_utils.py index 94523676..874b2c6f 100644 --- a/test/test_utils.py +++ b/test/test_utils.py @@ -2,6 +2,8 @@ import textwrap, cStringIO, os, time, re import libpry from libmproxy import utils +utils.CERT_SLEEP_TIME = 0 + class uformat_timestamp(libpry.AutoTree): def test_simple(self): |