| Server IP : 159.223.102.202 / Your IP : 216.73.216.195 Web Server : nginx/1.26.0 System : Linux Gen1-cloudpanel2ubuntu2404-1vcpu-1gb-nyc1-01 6.8.0-31-generic #31-Ubuntu SMP PREEMPT_DYNAMIC Sat Apr 20 00:40:06 UTC 2024 x86_64 User : albasshbotta ( 1021) PHP Version : 8.2.19 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /lib/python3/dist-packages/twisted/test/__pycache__/ |
Upload File : |
�
M��e� � �� � 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"