Changeset 134 for trunk/lib


Ignore:
Timestamp:
10/24/17 12:20:54 (7 years ago)
Author:
tim
Message:

cleanup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/bletchley/ssltls.py

    r133 r134  
    3131    sys.stderr.write('       # apt-get install python3-openssl\n')
    3232    sys.stderr.write('NOTE: pyOpenSSL version 0.14 or later is required!\n')
    33     sys.exit(2)
    34 try:
    35     import cffi
    36 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')
    4233    sys.exit(2)
    4334
     
    216207    from OpenSSL._util import lib as libssl
    217208
    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 package
    223     # maintainers have the blinders on and don't have a universal
    224     # symlink to the most recent version.
    225    
    226     #libssl = None
    227     #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     #        break
    231     #    except OSError as e:
    232     #        pass
    233 
    234209    #print(certificate._x509, index)
    235210    #print(libssl.X509_get_ext_count(certificate._x509))
Note: See TracChangeset for help on using the changeset viewer.