%PDF- %PDF-
Mini Shell

Mini Shell

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

�

Ϫ�f�����dZddlmZddlmZddlmZddlmZddl	m
Z
ee
ejd��jd�j�ZGd	�d
ej �ZGd�d�Zy
)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.
�)�annotations)�SSL)�ssl)�nativeString)�FilePathzutf-8s
server.pemc��eZdZdZdZdd�Zy)�ClientTLSContextz:
    SSL Context Factory for client-side connections.
    �c�H�tjtj�S)z�
        Return an L{SSL.Context} to be use for client-side connections.

        Will not return a cached context.
        This is done to improve the test coverage as most implementation
        are caching the context.
        )r�Context�
SSLv23_METHOD)�selfs �:/usr/lib/python3/dist-packages/twisted/test/ssl_helpers.py�
getContextzClientTLSContext.getContexts���{�{�3�,�,�-�-�N��returnzSSL.Context)�__name__�
__module__�__qualname__�__doc__�isClientr�rrr	r	s����H�.rr	c�4�eZdZdZdZedf					dd�Zdd�Zy)�ServerTLSContextz:
    SSL Context Factory for server-side connections.
    rNc�D�||_|�tj}||_y)N)�filenamerr
�_method)rr�methods   r�__init__zServerTLSContext.__init__.s"��!��
��>��&�&�F���rc��tj|j�}|j|j�|j|j�|S)z�
        Return an L{SSL.Context} to be use for server-side connections.

        Will not return a cached context.
        This is done to improve the test coverage as most implementation
        are caching the context.
        )rrr�use_certificate_filer�use_privatekey_file)r�ctxs  rrzServerTLSContext.getContext7s?���k�k�$�,�,�'��� � ����/�����
�
�.��
r)rzstr | bytesrz
int | Noner�Noner)rrrrr�certPathr rrrrrr's7����H�'/�T��#��8B��	
��rrN)r�
__future__r�OpenSSLr�twisted.internetr�twisted.python.compatr�twisted.python.filepathr�__file__�encode�sibling�pathr&�ClientContextFactoryr	rrrr�<module>r1s`���#�� �.�,�������!9�:�B�B�=�Q�V�V�W��.�s�/�/�.�$�r

Zerion Mini Shell 1.0