%PDF- %PDF-
Direktori : /lib/python3/dist-packages/twisted/test/__pycache__/ |
Current File : //lib/python3/dist-packages/twisted/test/__pycache__/ssl_helpers.cpython-312.pyc |
� Ϫ�f� � �� � d Z ddlmZ ddlmZ ddlmZ ddlmZ ddl m Z e e ej d� � j d� j � Z G d � d ej � Z G d� 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 � � e Zd ZdZdZdd�Zy)�ClientTLSContextz: SSL Context Factory for client-side connections. � c �H � t j t j � 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.getContext s � � �{�{�3�,�,�-�-� N��returnzSSL.Context)�__name__� __module__�__qualname__�__doc__�isClientr � r r r r s � �� �H�.r r c �4 � e Zd ZdZdZedf dd�Zdd�Zy)�ServerTLSContextz: SSL Context Factory for server-side connections. r Nc �D � || _ |�t j }|| _ y )N)�filenamer r �_method)r r �methods r �__init__zServerTLSContext.__init__. s"