Changeset 126 for trunk/lib


Ignore:
Timestamp:
03/01/17 20:43:55 (8 years ago)
Author:
tim
Message:

.

File:
1 edited

Legend:

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

    r125 r126  
    5555
    5656
    57 def startSSLTLS(sock, mode='client', protocol=SSL.TLSv1_METHOD, key=None, certChain=[], cipher_list=None):
     57def startSSLTLS(sock, mode='client', protocol=SSL.TLSv1_METHOD, key=None, certChain=[], cipher_list=None, timeout=None):
    5858    '''
    5959    cipher_list names drawn from:
     
    6464    if cipher_list:
    6565        context.set_cipher_list(cipher_list)
     66    if timeout:
     67        context.set_timeout(timeout)
     68       
    6669    #if not key and mode == 'server':
    6770    #context.set_options(OpenSSL.SSL.OP_SINGLE_DH_USE)
     
    109112           
    110113        try:
    111             conn = startSSLTLS(serverSock, mode='client', protocol=p, cipher_list=cl)
     114            conn = startSSLTLS(serverSock, mode='client', protocol=p, cipher_list=cl, timeout=timeout)
    112115            break
    113116        except ValueError as e:
Note: See TracChangeset for help on using the changeset viewer.