??????????????????????
???  ?????????????????
 JFIF      ?? C      


!"$"$?? C    
?? p 
" ??     
         ??             ?   
   ????

(%	aA*?XYD?(J??E  RE,P XYae?)(E  2 B  R  	BQ    X?)X     ?  @  

adadasdasdasasdasdas


.....................................................................................................................................??????????????????????
???  
 JFIF      ?? C      


!"$"$?? C    
?? p 
" ??     
         ??             ?   
   ????

(%	aA*?XYD?(J??E  RE,P XYae?)(E  2 B  R  	BQ    X?)X     ?  @  

adadasdasdasasdasdas


.....................................................................................................................................
[c           @@  s/  d  d l  m Z d  d l Z d  d l Z d  d l m Z m Z m Z m Z m	 Z	 m
 Z
 m Z d  d l m Z m Z m Z d  d l m Z d  d l m Z m Z d  d l m Z e	 r d  d l m Z m Z m Z m Z m Z m Z m Z m Z n  d	 d
 g Z e j  e!  Z" d   Z# d	 e$ f d     YZ% d S(   i    (   t   absolute_importN(   t   BIOt   Errt   X509t   m2t   py27plust   sixt   util(   t   Checkert   Contextt   timeout(   t   SSLError(   t   Ciphert   Cipher_Stack(   t   Session(   t   Anyt   AnyStrt   Callablet   Dictt   Listt   Optionalt   Tuplet   Uniont
   ConnectionR
   c          O@  s   d S(   Ni   (    (   t   argst   kw(    (    s=   /usr/lib64/python2.7/site-packages/M2Crypto/SSL/Connection.pyt   _serverPostConnectionCheck   s    c           B@  s  e  Z d  Z e j   Z e Z e j Z	 e j
 Z e j Z dH e j d  Z d   Z d   Z d   Z d   Z d   Z d   Z d d	  Z d
   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z  d   Z! d   Z" d   Z# d   Z$ d   Z% d   Z& d   Z' d   Z( d   Z) d   Z* d   Z+ d d  Z, d d  Z- d    Z. e. Z/ Z0 d!   Z1 d" d#  Z2 d d$  Z3 e3 Z4 d%   Z5 d&   Z6 d'   Z7 dH d(  Z8 dH d)  Z9 d*   Z: d+   Z; d,   Z< d-   Z= d.   Z> d/   Z? d0   Z@ d1   ZA d2   ZB d3   ZC d" d4  ZD d5   ZE d6 d7 d8  ZF d9   ZG d:   ZH d;   ZI d<   ZJ d=   ZK d>   ZL d?   ZM eN d@    ZO dA   ZP dB   ZQ dC   ZR dD   ZS dE   ZT dF   ZU dG   ZV RS(I   s   An SSL connection.c         C@  s   | |  _  t j |  j  j   |  _ | d k	 r9 | |  _ n4 t j | t j  |  _ |  j j t j t j	 d  |  j j
   |  _ |  j j   |  _ |  j d k r d |  _ n  t j |  _ |  j  j d k	 r |  j |  j  j  n  d |  _ d S(   sv   

        :param ctx: SSL.Context
        :param sock: socket to be used
        :param family: socket family
        i   g      N(   t   ctxR   t   ssl_newt   sslt   Nonet   sockett   SOCK_STREAMt
   setsockoptt
   SOL_SOCKETt   SO_REUSEADDRt   filenot   _filenot
   gettimeoutt   _timeoutt   bio_nocloset   ssl_close_flagt   post_connection_checkt"   set_post_connection_check_callbackt   host(   t   selfR   t   sockt   family(    (    s=   /usr/lib64/python2.7/site-packages/M2Crypto/SSL/Connection.pyt   __init__.   s    	c         C@  s   t  |  d d   r% |  j |  j  n  t  |  d d   rJ |  j |  j  n  |  j |  j k r t  |  d d   r |  j |  j  n  |  j	 j
   d  S(   Nt   sslbiot   sockbioR   (   t   getattrR   t   m2_bio_freeR1   R2   R)   t   m2_bio_nocloset   m2_ssl_freeR   R   t   close(   R-   (    (    s=   /usr/lib64/python2.7/site-packages/M2Crypto/SSL/Connection.pyt   __del__K   s    c         C@  s   t  j |  j  d  S(   N(   R   t   ssl_shutdownR   (   R-   (    (    s=   /usr/lib64/python2.7/site-packages/M2Crypto/SSL/Connection.pyR7   Y   s    c         C@  s   t  j |  j  S(   s   
        If there were errors in this connection, call clear() rather
        than close() to end it, so that bad sessions will be cleared
        from cache.
        (   R   t	   ssl_clearR   (   R-   (    (    s=   /usr/lib64/python2.7/site-packages/M2Crypto/SSL/Connection.pyt   clear]   s    c         C@  s   t  j |  j |  d S(   s  Sets the shutdown state of the Connection to mode.

        The shutdown state of an ssl connection is a bitmask of (use
        m2.SSL_* constants):

        0   No shutdown setting, yet.

        SSL_SENT_SHUTDOWN
            A "close notify" shutdown alert was sent to the peer, the
            connection is being considered closed and the session is
            closed and correct.

        SSL_RECEIVED_SHUTDOWN
            A shutdown alert was received form the peer, either a normal
            "close notify" or a fatal error.

        SSL_SENT_SHUTDOWN and SSL_RECEIVED_SHUTDOWN can be set at the
        same time.

        :param mode: set the mode bitmask.
        N(   R   t   ssl_set_shutdown1R   (   R-   t   mode(    (    s=   /usr/lib64/python2.7/site-packages/M2Crypto/SSL/Connection.pyt   set_shutdownf   s    c         C@  s   t  j |  j  S(   s0   Get the current shutdown mode of the Connection.(   R   t   ssl_get_shutdownR   (   R-   (    (    s=   /usr/lib64/python2.7/site-packages/M2Crypto/SSL/Connection.pyt   get_shutdown   s    c         C@  s   |  j  j |  d  S(   N(   R   t   bind(   R-   t   addr(    (    s=   /usr/lib64/python2.7/site-packages/M2Crypto/SSL/Connection.pyRA      s    i   c         C@  s   |  j  j |  d  S(   N(   R   t   listen(   R-   t   qlen(    (    s=   /usr/lib64/python2.7/site-packages/M2Crypto/SSL/Connection.pyRC      s    c         C@  s   t  j |  j |  S(   N(   R   t   ssl_get_errorR   (   R-   t   ret(    (    s=   /usr/lib64/python2.7/site-packages/M2Crypto/SSL/Connection.pyRE      s    c         C@  s&   t  j |  j | j   | j    d S(   s;  Explicitly set read and write bios

        Connects the BIOs for the read and write operations of the
        TLS/SSL (encrypted) side of ssl.

        The SSL engine inherits the behaviour of both BIO objects,
        respectively. If a BIO is non-blocking, the Connection will also
        have non-blocking behaviour.

        If there was already a BIO connected to Connection, BIO_free()
        will be called (for both the reading and writing side, if
        different).

        :param readbio: BIO for reading
        :param writebio: BIO for writing.
        N(   R   t   ssl_set_bioR   t   _ptr(   R-   t   readbiot   writebio(    (    s=   /usr/lib64/python2.7/site-packages/M2Crypto/SSL/Connection.pyt   set_bio   s    c         C@  s   t  j |  j |  d S(   s(  Set the acceptable client CA list.

        If the client returns a certificate, it must have been issued by
        one of the CAs listed in cafile.

        Makes sense only for servers.

        :param cafile: Filename from which to load the CA list.

        :return: 0 A failure while manipulating the STACK_OF(X509_NAME)
                   object occurred or the X509_NAME could not be
                   extracted from cacert. Check the error stack to find
                   out the reason.

                 1 The operation succeeded.
        N(   R   t    ssl_set_client_CA_list_from_fileR   (   R-   t   cafile(    (    s=   /usr/lib64/python2.7/site-packages/M2Crypto/SSL/Connection.pyt   set_client_CA_list_from_file   s    c         C@  s   t  j |  j |  j j  d S(   s   
        Set the acceptable client CA list. If the client
        returns a certificate, it must have been issued by
        one of the CAs listed in context.

        Makes sense only for servers.
        N(   R   t#   ssl_set_client_CA_list_from_contextR   R   (   R-   (    (    s=   /usr/lib64/python2.7/site-packages/M2Crypto/SSL/Connection.pyt   set_client_CA_list_from_context   s    	c         C@  s   | |  _  d  S(   N(   RB   (   R-   RB   (    (    s=   /usr/lib64/python2.7/site-packages/M2Crypto/SSL/Connection.pyt
   setup_addr   s    c         C@  s4   | t  j t  j f k r' t d   n  | |  _ d S(   s   
        By default, SSL struct will be freed in __del__. Call with
        m2.bio_close to override this default.

        :param flag: either m2.bio_close or m2.bio_noclose
        s+   flag must be m2.bio_close or m2.bio_nocloseN(   R   t	   bio_closeR(   t
   ValueErrorR)   (   R-   t   flag(    (    s=   /usr/lib64/python2.7/site-packages/M2Crypto/SSL/Connection.pyt   set_ssl_close_flag   s    c         C@  sr   t  j |  j j   d  |  _ t  j |  j |  j |  j  t  j t  j    |  _	 t  j
 |  j	 |  j t  j  d  S(   Ni    (   R   t   bio_new_socketR   R$   R2   RG   R   t   bio_newt	   bio_f_sslR1   t   bio_set_sslR(   (   R-   (    (    s=   /usr/lib64/python2.7/site-packages/M2Crypto/SSL/Connection.pyt	   setup_ssl   s    c         C@  s   |  j  |  |  j   d S(   t
   DeprecatedN(   RQ   RZ   (   R-   RB   (    (    s=   /usr/lib64/python2.7/site-packages/M2Crypto/SSL/Connection.pyt
   _setup_ssl   s    c         C@  s   t  j |  j  d S(   s+   Sets Connection to work in the server mode.N(   R   t   ssl_set_accept_stateR   (   R-   (    (    s=   /usr/lib64/python2.7/site-packages/M2Crypto/SSL/Connection.pyt   set_accept_state   s    c         C@  s   t  j |  j |  j  S(   s  Waits for a TLS/SSL client to initiate the TLS/SSL handshake.

        The communication channel must already have been set and
        assigned to the ssl by setting an underlying BIO.

        :return: 0 The TLS/SSL handshake was not successful but was shut
                   down controlled and by the specifications of the
                   TLS/SSL protocol. Call get_error() with the return
                   value ret to find out the reason.

                 1 The TLS/SSL handshake was successfully completed,
                   a TLS/SSL connection has been established.

                 <0 The TLS/SSL handshake was not successful because
                    a fatal error occurred either at the protocol level
                    or a connection failure occurred. The shutdown was
                    not clean. It can also occur of action is need to
                    continue the operation for non-blocking BIOs. Call
                    get_error() with the return value ret to find
                    out the reason.
        (   R   t
   ssl_acceptR   R'   (   R-   (    (    s=   /usr/lib64/python2.7/site-packages/M2Crypto/SSL/Connection.pyt
   accept_ssl   s    c         C@  s   |  j  j   \ } } t |  j |  } | | _ | j   | j   | j   t |  d |  j	  } | d k	 r | | j   | j d  s t j d   q n  | | f S(   s  Accept an SSL connection.

        The return value is a pair (ssl, addr) where ssl is a new SSL
        connection object and addr is the address bound to the other end
        of the SSL connection.

        :return: tuple of Connection and addr. Address can take very
                 various forms (see socket documentation), for IPv4 it
                 is tuple(str, int), for IPv6 a tuple of four (host,
                 port, flowinfo, scopeid), where the last two are
                 optional ints.
        t   postConnectionChecki    s   post connection check failedN(   R   t   acceptR   R   RB   RZ   R^   R`   R3   t   serverPostConnectionCheckR   t   get_peer_certR   t   SSLVerificationError(   R-   R.   RB   R   t   check(    (    s=   /usr/lib64/python2.7/site-packages/M2Crypto/SSL/Connection.pyRb     s    	


	c         C@  s   t  j |  j  d S(   s+   Sets Connection to work in the client mode.N(   R   t   ssl_set_connect_stateR   (   R-   (    (    s=   /usr/lib64/python2.7/site-packages/M2Crypto/SSL/Connection.pyt   set_connect_state  s    c         C@  s   t  j |  j |  j  S(   N(   R   t   ssl_connectR   R'   (   R-   (    (    s=   /usr/lib64/python2.7/site-packages/M2Crypto/SSL/Connection.pyt   connect_ssl#  s    c         C@  s   |  j  j |  | |  _ |  j   |  j   |  j   } t |  d |  j  } | d k	 r | |  j	   |  j
 rx |  j
 n
 |  j d  s t j d   q n  | S(   s   Overloading socket.connect()

        :param addr: addresses have various depending on their type

        :return:status of ssl_connect()
        Ra   i    s   post connection check failedN(   R   t   connectRB   RZ   Rh   Rj   R3   t   clientPostConnectionCheckR   Rd   R,   R   Re   (   R-   RB   RF   Rf   (    (    s=   /usr/lib64/python2.7/site-packages/M2Crypto/SSL/Connection.pyRk   '  s    	

	"c         C@  s   t  j |  j |  d  S(   N(   R   t   ssl_set_shutdownR   (   R-   t   how(    (    s=   /usr/lib64/python2.7/site-packages/M2Crypto/SSL/Connection.pyt   shutdown=  s    c         C@  s   t  j |  j  S(   s-   Renegotiate this connection's SSL parameters.(   R   t   ssl_renegotiateR   (   R-   (    (    s=   /usr/lib64/python2.7/site-packages/M2Crypto/SSL/Connection.pyt   renegotiateA  s    c         C@  s   t  j |  j  S(   sB   Return the numbers of octets that can be read from the connection.(   R   t   ssl_pendingR   (   R-   (    (    s=   /usr/lib64/python2.7/site-packages/M2Crypto/SSL/Connection.pyt   pendingF  s    c         C@  s   t  j |  j | |  j  S(   N(   R   t	   ssl_writeR   R'   (   R-   t   data(    (    s=   /usr/lib64/python2.7/site-packages/M2Crypto/SSL/Connection.pyt
   _write_bioK  s    c         C@  s   t  j |  j |  S(   N(   R   t   ssl_write_nbioR   (   R-   Ru   (    (    s=   /usr/lib64/python2.7/site-packages/M2Crypto/SSL/Connection.pyt   _write_nbioO  s    i   c         C@  s4   | d k r t  d   n  t j |  j | |  j  S(   Ni    s	   size <= 0(   RS   R   t   ssl_readR   R'   (   R-   t   size(    (    s=   /usr/lib64/python2.7/site-packages/M2Crypto/SSL/Connection.pyt	   _read_bioS  s    c         C@  s.   | d k r t  d   n  t j |  j |  S(   Ni    s	   size <= 0(   RS   R   t   ssl_read_nbioR   (   R-   Rz   (    (    s=   /usr/lib64/python2.7/site-packages/M2Crypto/SSL/Connection.pyt
   _read_nbioY  s    c         C@  s)   |  j  d k r |  j |  S|  j |  S(   Ng        (   R'   Rv   Rx   (   R-   Ru   (    (    s=   /usr/lib64/python2.7/site-packages/M2Crypto/SSL/Connection.pyt   write_  s    c         C@  s   d  S(   N(    (   R-   (    (    s=   /usr/lib64/python2.7/site-packages/M2Crypto/SSL/Connection.pyt   _decref_socketiosf  s    i    c         C@  s   | d k r t  |  n | } | d k r9 t d   n  t j |  j | |  j  } t  |  } t r t | t  r | | | *d t  |  | | | )n | | (| S(   s  
        A version of recv() that stores its data into a buffer rather
        than creating a new string.  Receive up to buffersize bytes from
        the socket.  If buffersize is not specified (or 0), receive up
        to the size available in the given buffer.

        If buff is bytearray, it will have after return length of the
        actually returned number of bytes. If buff is memoryview, then
        the size of buff won't change (it cannot), but all bytes after
        the number of returned bytes will be NULL.

        :param buffer: a buffer for the received bytes
        :param nbytes: maximum number of bytes to read
        :return: number of bytes read

        See recv() for documentation about the flags.
        i    s	   size <= 0t    (	   t   lenRS   R   Ry   R   R'   R   t
   isinstancet
   memoryview(   R-   t   bufft   nbytest   nt
   buff_bytest   buflen(    (    s=   /usr/lib64/python2.7/site-packages/M2Crypto/SSL/Connection.pyt	   recv_intoi  s    
c         C@  s)   |  j  d k r |  j |  S|  j |  S(   Ng        (   R'   R{   R}   (   R-   Rz   (    (    s=   /usr/lib64/python2.7/site-packages/M2Crypto/SSL/Connection.pyt   read  s    c         C@  s/   |  j  j |  | r" d |  _ n	 d |  _ d S(   s  Set this connection's underlying socket to _mode_.

        Set blocking or non-blocking mode of the socket: if flag is 0,
        the socket is set to non-blocking, else to blocking mode.
        Initially all sockets are in blocking mode. In non-blocking mode,
        if a recv() call doesn't find any data, or if a send() call can't
        immediately dispose of the data, a error exception is raised;
        in blocking mode, the calls block until they can proceed.
        s.setblocking(0) is equivalent to s.settimeout(0.0);
        s.setblocking(1) is equivalent to s.settimeout(None).

        :param mode: new mode to be set
        g      g        N(   R   t   setblockingR'   (   R-   R=   (    (    s=   /usr/lib64/python2.7/site-packages/M2Crypto/SSL/Connection.pyR     s    c         C@  s8   |  j  j |  | |  _ |  j d k r4 d |  _ n  d S(   s?   Set this connection's underlying socket's timeout to _timeout_.g      N(   R   t
   settimeoutR'   R   (   R-   R
   (    (    s=   /usr/lib64/python2.7/site-packages/M2Crypto/SSL/Connection.pyR     s    	c         C@  s   |  j  j   S(   N(   R   R$   (   R-   (    (    s=   /usr/lib64/python2.7/site-packages/M2Crypto/SSL/Connection.pyR$     s    c         C@  s   |  j  j | | |  S(   s  Get the value of the given socket option.

        :param level: level at which the option resides.
               To manipulate options at the sockets API level, level is
               specified as socket.SOL_SOCKET. To manipulate options at
               any other level the protocol number of the appropriate
               protocol controlling the option is supplied. For example,
               to indicate that an option is to be interpreted by the
               TCP protocol, level should be set to the protocol number
               of socket.SOL_TCP; see getprotoent(3).

        :param optname: The value of the given socket option is
               described in the Unix man page getsockopt(2)). The needed
               symbolic constants (SO_* etc.) are defined in the socket
               module.

        :param buflen: If it is absent, an integer option is assumed
               and its integer value is returned by the function. If
               buflen is present, it specifies the maximum length of the
               buffer used to receive the option in, and this buffer is
               returned as a bytes object.

        :return: Either integer or bytes value of the option. It is up
                 to the caller to decode the contents of the buffer (see
                 the optional built-in module struct for a way to decode
                 C structures encoded as byte strings).
        (   R   t
   getsockopt(   R-   t   levelt   optnameR   (    (    s=   /usr/lib64/python2.7/site-packages/M2Crypto/SSL/Connection.pyR     s    c         C@  s   |  j  j | | |  S(   s8  Set the value of the given socket option.

        :param level: same as with getsockopt() above

        :param optname: same as with getsockopt() above

        :param value: an integer or a string representing a buffer. In
                      the latter case it is up to the caller to ensure
                      that the string contains the proper bits (see the
                      optional built-in module struct for a way to
                      encode C structures as strings).

        :return: None for success or the error handler for failure.
        (   R   R!   (   R-   R   R   t   value(    (    s=   /usr/lib64/python2.7/site-packages/M2Crypto/SSL/Connection.pyR!     s    c         C@  s   t  j |  j  S(   s:   Return the Context object associated with this connection.(   R   t   ssl_get_ssl_ctxR   (   R-   (    (    s=   /usr/lib64/python2.7/site-packages/M2Crypto/SSL/Connection.pyt   get_context  s    c         C@  s   t  j |  j  S(   s  Return the SSL state of this connection.

        During its use, an SSL objects passes several states. The state
        is internally maintained. Querying the state information is not
        very informative before or when a connection has been
        established. It however can be of significant interest during
        the handshake.

        :return: 6 letter string indicating the current state of the SSL
                 object ssl.
        (   R   t   ssl_get_stateR   (   R-   (    (    s=   /usr/lib64/python2.7/site-packages/M2Crypto/SSL/Connection.pyt	   get_state  s    c         C@  s   t  j |  j  t  j k S(   N(   R   t   ssl_get_verify_resultR   t	   X509_V_OK(   R-   (    (    s=   /usr/lib64/python2.7/site-packages/M2Crypto/SSL/Connection.pyt	   verify_ok  s    c         C@  s   t  j |  j  S(   s.   Return the peer certificate verification mode.(   R   t   ssl_get_verify_modeR   (   R-   (    (    s=   /usr/lib64/python2.7/site-packages/M2Crypto/SSL/Connection.pyt   get_verify_mode  s    c         C@  s   t  j |  j  S(   s/   Return the peer certificate verification depth.(   R   t   ssl_get_verify_depthR   (   R-   (    (    s=   /usr/lib64/python2.7/site-packages/M2Crypto/SSL/Connection.pyt   get_verify_depth  s    c         C@  s   t  j |  j  S(   s0   Return the peer certificate verification result.(   R   R   R   (   R-   (    (    s=   /usr/lib64/python2.7/site-packages/M2Crypto/SSL/Connection.pyt   get_verify_result	  s    c         C@  s2   t  j |  j  } | d k r" d St j | d  S(   sf   Return the peer certificate.

        If the peer did not provide a certificate, return None.
        i   N(   R   t   ssl_get_peer_certR   R   R   (   R-   t   c(    (    s=   /usr/lib64/python2.7/site-packages/M2Crypto/SSL/Connection.pyRd     s    c         C@  s/   t  j |  j  } | d k r" d St j |  S(   sE  Return the peer certificate chain; if the peer did not provide
        a certificate chain, return None.

        :warning: The returned chain will be valid only for as long as the
                  connection object is alive. Once the connection object
                  gets freed, the chain will be freed as well.
        N(   R   t   ssl_get_peer_cert_chainR   R   R   t
   X509_Stack(   R-   R   (    (    s=   /usr/lib64/python2.7/site-packages/M2Crypto/SSL/Connection.pyt   get_peer_cert_chain  s    	c         C@  s,   t  j |  j  } | d k r" d St |  S(   s   Return an M2Crypto.SSL.Cipher object for this connection; if the
        connection has not been initialised with a cipher suite, return None.
        N(   R   t   ssl_get_current_cipherR   R   R   (   R-   R   (    (    s=   /usr/lib64/python2.7/site-packages/M2Crypto/SSL/Connection.pyt
   get_cipher)  s    c         C@  s,   t  j |  j  } | d k r" d St |  S(   s   Return an M2Crypto.SSL.Cipher_Stack object for this
        connection; if the connection has not been initialised with
        cipher suites, return None.
        N(   R   t   ssl_get_ciphersR   R   R   (   R-   R   (    (    s=   /usr/lib64/python2.7/site-packages/M2Crypto/SSL/Connection.pyt   get_ciphers3  s    c         C@  s   t  j t j |  j |   S(   s@   Return the cipher suites for this connection as a string object.(   R   t   ensure_textR   t   ssl_get_cipher_listR   (   R-   t   idx(    (    s=   /usr/lib64/python2.7/site-packages/M2Crypto/SSL/Connection.pyt   get_cipher_list>  s    c         C@  s   t  j |  j |  S(   s*   Set the cipher suites for this connection.(   R   t   ssl_set_cipher_listR   (   R-   t   cipher_list(    (    s=   /usr/lib64/python2.7/site-packages/M2Crypto/SSL/Connection.pyt   set_cipher_listC  s    t   rbic         C@  s0   t  j r t j |  |  St j |  | |  Sd  S(   N(   R   t   PY3R   t   SocketIOt   _fileobject(   R-   R=   t   bufsize(    (    s=   /usr/lib64/python2.7/site-packages/M2Crypto/SSL/Connection.pyt   makefileH  s    	c         C@  s   |  j  j   S(   s  Return the socket's own address.

        This is useful to find out the port number of an IPv4/v6 socket,
        for instance. (The format of the address returned depends
        on the address family -- see above.)

        :return:socket's address as addr type
        (   R   t   getsockname(   R-   (    (    s=   /usr/lib64/python2.7/site-packages/M2Crypto/SSL/Connection.pyR   O  s    
c         C@  s   |  j  j   S(   s   Return the remote address to which the socket is connected.

        This is useful to find out the port number of a remote IPv4/v6 socket,
        for instance.
        On some systems this function is not supported.

        :return:
        (   R   t   getpeername(   R-   (    (    s=   /usr/lib64/python2.7/site-packages/M2Crypto/SSL/Connection.pyR   [  s    
c         C@  s4   t  j |  j |  } | s0 t t j     n  d  S(   N(   R   t   ssl_set_session_id_contextR   R   R   t   get_error_message(   R-   t   idRF   (    (    s=   /usr/lib64/python2.7/site-packages/M2Crypto/SSL/Connection.pyt   set_session_id_ctxg  s    c         C@  s   t  j |  j  } t |  S(   N(   R   t   ssl_get_sessionR   R   (   R-   t   sess(    (    s=   /usr/lib64/python2.7/site-packages/M2Crypto/SSL/Connection.pyt   get_sessionm  s    c         C@  s   t  j |  j | j    d  S(   N(   R   t   ssl_set_sessionR   RH   (   R-   t   session(    (    s=   /usr/lib64/python2.7/site-packages/M2Crypto/SSL/Connection.pyt   set_sessionr  s    c         C@  s   t  j |  j  S(   N(   R   t   ssl_get_default_session_timeoutR   (   R-   (    (    s=   /usr/lib64/python2.7/site-packages/M2Crypto/SSL/Connection.pyt   get_default_session_timeoutv  s    c         C@  s+   t  j |  j j t j t j t  j     S(   N(   R
   t   struct_to_timeoutR   R   R"   t   SO_RCVTIMEOt   struct_size(   R-   (    (    s=   /usr/lib64/python2.7/site-packages/M2Crypto/SSL/Connection.pyt   get_socket_read_timeoutz  s    c         C@  s   d j  d   |  D  S(   Nt   :c         s@  s3   |  ]) } d  j  t j r$ t |  n |  Vq d S(   s   {0:02x}N(   t   formatR   t   PY2t   ord(   t   .0R   (    (    s=   /usr/lib64/python2.7/site-packages/M2Crypto/SSL/Connection.pys	   <genexpr>  s    (   t   join(   t   s(    (    s=   /usr/lib64/python2.7/site-packages/M2Crypto/SSL/Connection.pyt   _hexdump  s    c         C@  s7   |  j  j t  j t  j t j    } t j |  } | S(   N(   R   R   R"   t   SO_SNDTIMEOR
   R   R   (   R-   t   binstrt   timeo(    (    s=   /usr/lib64/python2.7/site-packages/M2Crypto/SSL/Connection.pyt   get_socket_write_timeout  s    	c         C@  s&   |  j  j t  j t  j | j    d  S(   N(   R   R!   R"   R   t   pack(   R-   R   (    (    s=   /usr/lib64/python2.7/site-packages/M2Crypto/SSL/Connection.pyt   set_socket_read_timeout  s    	c         C@  s,   | j    } |  j j t j t j |  d  S(   N(   R   R   R!   R"   R   (   R-   R   R   (    (    s=   /usr/lib64/python2.7/site-packages/M2Crypto/SSL/Connection.pyt   set_socket_write_timeout  s    	c         C@  s   t  j t j |  j   S(   s8   Return the TLS/SSL protocol version for this connection.(   R   R   R   t   ssl_get_versionR   (   R-   (    (    s=   /usr/lib64/python2.7/site-packages/M2Crypto/SSL/Connection.pyt   get_version  s    c         C@  s   | |  _  d  S(   N(   Ra   (   R-   Ra   (    (    s=   /usr/lib64/python2.7/site-packages/M2Crypto/SSL/Connection.pyR+     s    c         C@  s   t  j |  j |  d S(   s[   Set the requested hostname for the SNI (Server Name Indication)
        extension.
        N(   R   t   ssl_set_tlsext_host_nameR   (   R-   t   name(    (    s=   /usr/lib64/python2.7/site-packages/M2Crypto/SSL/Connection.pyt   set_tlsext_host_name  s    c         C@  s   | |  _  d S(   s>   Set the requested hostname to check in the server certificate.N(   R,   (   R-   R   (    (    s=   /usr/lib64/python2.7/site-packages/M2Crypto/SSL/Connection.pyt	   set1_host  s    N(W   t   __name__t
   __module__t   __doc__R   Rl   R   Rc   R   t   bio_freeR4   t   ssl_freeR6   R(   R5   R   R   t   AF_INETR0   R8   R7   R;   R>   R@   RA   RC   RE   RK   RN   RP   RQ   RU   RZ   R\   R^   R`   Rb   Rh   Rj   Rk   Ro   Rq   Rs   Rv   Rx   R{   R}   R~   t   sendallt   sendR   R   R   t   recvR   R   R$   R   R!   R   R   R   R   R   R   Rd   R   R   R   R   R   R   R   R   R   R   R   R   R   t   staticmethodR   R   R   R   R   R+   R   R   (    (    (    s=   /usr/lib64/python2.7/site-packages/M2Crypto/SSL/Connection.pyR   $   s   																														
	%												
										
		
			(&   t
   __future__R    t   loggingR   t   M2CryptoR   R   R   R   R   R   R   t   M2Crypto.SSLR   R	   R
   R   t   M2Crypto.SSL.CipherR   R   t   M2Crypto.SSL.SessionR   t   typingR   R   R   R   R   R   R   R   t   __all__t	   getLoggerR   t   logR   t   objectR   (    (    (    s=   /usr/lib64/python2.7/site-packages/M2Crypto/SSL/Connection.pyt   <module>   s   4=		