Changeset 134
- Timestamp:
- 10/24/17 12:20:54 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/bletchley/ssltls.py
r133 r134 31 31 sys.stderr.write(' # apt-get install python3-openssl\n') 32 32 sys.stderr.write('NOTE: pyOpenSSL version 0.14 or later is required!\n') 33 sys.exit(2)34 try:35 import cffi36 except:37 sys.stderr.write('ERROR: Could not locate cffi module. Under Debian-based systems, try:\n')38 sys.stderr.write(' # apt-get install python3-cffi\n')39 sys.stderr.write('NOTE: This is a requirement because pyOpenSSL does not provide '40 'certificate extension removal procedures. Consider lobbying for the '41 'implementation of this:\n https://github.com/pyca/pyopenssl/issues/152\n')42 33 sys.exit(2) 43 34 … … 216 207 from OpenSSL._util import lib as libssl 217 208 218 #ffi = cffi.FFI()219 #ffi.cdef('''void* X509_delete_ext(void* x, int loc);''')220 #ffi.cdef('''int X509_get_ext_count(const void* x);''')221 222 # Try to load libssl using several recent names because package223 # maintainers have the blinders on and don't have a universal224 # symlink to the most recent version.225 226 #libssl = None227 #for libname in ('libssl.so','libssl.so.1.0.2', 'libssl.so.1.0.1', 'libssl.so.1.0.0','libssl.so.0.9.8'):228 # try:229 # libssl = ffi.dlopen(libname)230 # break231 # except OSError as e:232 # pass233 234 209 #print(certificate._x509, index) 235 210 #print(libssl.X509_get_ext_count(certificate._x509))
Note: See TracChangeset
for help on using the changeset viewer.