Your IP : 216.73.217.13


Current Path : /lib/python3/dist-packages/twisted/test/__pycache__/
Upload File :
Current File : //lib/python3/dist-packages/twisted/test/__pycache__/ssl_helpers.cpython-38.pyc

U


W[�@s�dZddlmZmZddlmZddlmZddlm	Z	ddl
mZee	e�
d���d�j�ZGd	d
�d
ej�ZGdd�d�Zd
S)z�
Helper classes for twisted.test.test_ssl.

They are in a separate module so they will not prevent test_ssl importing if
pyOpenSSL is unavailable.
�)�division�absolute_import)�nativeString)�ssl)�FilePath)�SSLzutf-8s
server.pemc@seZdZdZdd�ZdS)�ClientTLSContext�cCst�tj�S�N)r�Context�TLSv1_METHOD)�self�r�:/usr/lib/python3/dist-packages/twisted/test/ssl_helpers.py�
getContextszClientTLSContext.getContextN)�__name__�
__module__�__qualname__�isClientrrrrrrsrc@s(eZdZdZeejfdd�Zdd�ZdS)�ServerTLSContextrcCs||_||_dSr
)�filename�_method)r
r�methodrrr�__init__szServerTLSContext.__init__cCs(t�|j�}|�|j�|�|j�|Sr
)rrrZuse_certificate_filerZuse_privatekey_file)r
Zctxrrrr"szServerTLSContext.getContextN)	rrrr�certPathrrrrrrrrrsrN)�__doc__Z
__future__rrZtwisted.python.compatrZtwisted.internetrZtwisted.python.filepathrZOpenSSLr�__file__�encodeZsibling�pathrZClientContextFactoryrrrrrr�<module>s�