ó
[³XMc           @   s`   d  d l  m Z d  d l m Z d  d l m Z d e j f d „  ƒ  YZ d d	 d „  ƒ  YZ d S(
   iÿÿÿÿ(   t   ssl(   t   sibpath(   t   SSLt   ClientTLSContextc           B   s   e  Z d  Z d „  Z RS(   i   c         C   s   t  j t  j ƒ S(   N(   R   t   Contextt   TLSv1_METHOD(   t   self(    (    s<   /usr/lib/python2.7/dist-packages/twisted/test/ssl_helpers.pyt
   getContext   s    (   t   __name__t
   __module__t   isClientR   (    (    (    s<   /usr/lib/python2.7/dist-packages/twisted/test/ssl_helpers.pyR      s   t   ServerTLSContextc           B   s,   e  Z d  Z e e d ƒ d „ Z d „  Z RS(   i    s
   server.pemc         C   s   | |  _  d  S(   N(   t   filename(   R   R   (    (    s<   /usr/lib/python2.7/dist-packages/twisted/test/ssl_helpers.pyt   __init__   s    c         C   s6   t  j t  j ƒ } | j |  j ƒ | j |  j ƒ | S(   N(   R   R   R   t   use_certificate_fileR   t   use_privatekey_file(   R   t   ctx(    (    s<   /usr/lib/python2.7/dist-packages/twisted/test/ssl_helpers.pyR      s    (   R   R	   R
   R   t   __file__R   R   (    (    (    s<   /usr/lib/python2.7/dist-packages/twisted/test/ssl_helpers.pyR      s   N(    (	   t   twisted.internetR    t   twisted.python.utilR   t   OpenSSLR   t   ClientContextFactoryR   R   (    (    (    s<   /usr/lib/python2.7/dist-packages/twisted/test/ssl_helpers.pyt   <module>   s   