check in feature window if pyopenssl >= 0.12 and if pyasn1 is available

This commit is contained in:
Yann Leboulanger 2012-01-05 13:50:15 +01:00
parent d0a23f3200
commit bae57a600a
1 changed files with 5 additions and 0 deletions

View File

@ -169,6 +169,11 @@ class FeaturesWindow:
try:
import OpenSSL.SSL
import OpenSSL.crypto
ver = OpenSSL.__version__
ver_l = [int(i) for i in ver.split('.')]
if ver_l < [0, 12]:
raise ImportError
import pyasn1
except Exception:
return False
return True