m2crypto test

This commit is contained in:
age 2007-07-11 14:04:06 +00:00
parent 86a5eea680
commit 3091f07d07
1 changed files with 8 additions and 2 deletions

View File

@ -29,7 +29,7 @@ __revision__ = "$Id$"
import cryptobox.plugins.base
import subprocess
import os
import os, sys
import cherrypy
CERT_FILENAME = 'cryptobox-ssl-certificate.pem'
@ -213,7 +213,13 @@ class encrypted_webinterface(cryptobox.plugins.base.CryptoBoxPlugin):
The code is mainly inspired by:
https://dev.tribler.org/browser/m2crypto/trunk/contrib/SimpleX509create.py
"""
import M2Crypto
## check if m2crypto is available
try:
import M2Crypto
except ImportError:
sys.stderr.write("Plugin encrypted_webinterface could not import M2Crypto module!\n")
sys.stderr.write("Try 'apt-get install python-m2crypto'.\n")
sys.exit(1)
import time
string_type = 0x1000 | 1 # see http://www.koders.com/python/..
# ../fid07A99E089F55187896A06CD4E0B6F21B9B8F5B0B.aspx?s=bavaria