From 764b2783a70ccb4b3e3c6bcc95f0bcf7384eb966 Mon Sep 17 00:00:00 2001 From: Seth Schoen Date: Fri, 13 Jul 2012 14:49:34 -0700 Subject: [PATCH] explicitly require m3crypto inside ../m3/lib/python --- server-ca/CSR.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/server-ca/CSR.py b/server-ca/CSR.py index a771651c9..e62100923 100644 --- a/server-ca/CSR.py +++ b/server-ca/CSR.py @@ -2,8 +2,13 @@ # use OpenSSL to provide CSR-related operations +import site, os +assert os.path.exists("../m3/lib/python"), "\nPlease install m3crypto into ../m3/lib/python by running\nmkdir -p ../m3/lib/python; PYTHONPATH=../m3/lib/python python setup.py install --home=../m3\nfrom inside the m3crypto directory." +site.addsitedir("../m3/lib/python") import subprocess, tempfile, re import M2Crypto +from distutils.version import LooseVersion +assert LooseVersion(M2Crypto.version) >= LooseVersion("0.22") import hashlib # we can use tempfile.NamedTemporaryFile() to get tempfiles # to pass to OpenSSL subprocesses.