m2crypto test
This commit is contained in:
parent
86a5eea680
commit
3091f07d07
|
@ -29,7 +29,7 @@ __revision__ = "$Id$"
|
||||||
|
|
||||||
import cryptobox.plugins.base
|
import cryptobox.plugins.base
|
||||||
import subprocess
|
import subprocess
|
||||||
import os
|
import os, sys
|
||||||
import cherrypy
|
import cherrypy
|
||||||
|
|
||||||
CERT_FILENAME = 'cryptobox-ssl-certificate.pem'
|
CERT_FILENAME = 'cryptobox-ssl-certificate.pem'
|
||||||
|
@ -213,7 +213,13 @@ class encrypted_webinterface(cryptobox.plugins.base.CryptoBoxPlugin):
|
||||||
The code is mainly inspired by:
|
The code is mainly inspired by:
|
||||||
https://dev.tribler.org/browser/m2crypto/trunk/contrib/SimpleX509create.py
|
https://dev.tribler.org/browser/m2crypto/trunk/contrib/SimpleX509create.py
|
||||||
"""
|
"""
|
||||||
|
## check if m2crypto is available
|
||||||
|
try:
|
||||||
import M2Crypto
|
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
|
import time
|
||||||
string_type = 0x1000 | 1 # see http://www.koders.com/python/..
|
string_type = 0x1000 | 1 # see http://www.koders.com/python/..
|
||||||
# ../fid07A99E089F55187896A06CD4E0B6F21B9B8F5B0B.aspx?s=bavaria
|
# ../fid07A99E089F55187896A06CD4E0B6F21B9B8F5B0B.aspx?s=bavaria
|
||||||
|
|
Loading…
Reference in a new issue