%PDF- %PDF-
Direktori : /lib/python3/dist-packages/twisted/test/__pycache__/ |
Current File : //lib/python3/dist-packages/twisted/test/__pycache__/test_sslverify.cpython-312.pyc |
� Ϫ�fY� � �p � d Z ddlZddlZddlZddlmZ ddlmZ ddlm Z ddl mZmZm Z mZ ddlmZ ddlmZmZmZ dd lmZ dd lmZ ddlmZ ddlmZ dd lmZ ddlm Z ddl!m"Z" ddl#m$Z$ ddl%m&Z&m'Z'm(Z( dZ)dZ*dZ+dZ, ed� r�ddl-Z-ddl.m/Z/ ddl0m1Z1m2Z2m3Z3m4Z4m5Z5 ddl6m7Z7 ddl8m9Z9 ddl:m;Z; ddl<m=Z= ddl>m?Z?m@Z@mAZA ddlBmCZC ddl mDZD e/j� e/j� � ZGeGj� d� � e/j� e/j� � ZGeGj� d� � nd!Z)e)Z*e)Z+e)Z,e)sdd"l mLZM dd#lNmOZOmPZP dd$lQmRZR d%ZSd&ZT eeU� j� j� d'� j� � ZY ej� � fd(�Z[d)� Z\dpd*�Z]d+� Z^dqd,�Z_ drd-�Z`d.� Za G d/� d0e j� � Zc G d1� d2e j� � Zd G d3� d4� Ze G d5� d6e'� Zf G d7� d8� Zg G d9� d:� Zh G d;� d<ehe(� Zi G d=� d>ehe(� Zj G d?� d@e'� Zk G dA� dBe(� Zl G dC� dDe'� ZmdqdE�Zn G dF� dGe(� Zo G dH� dIe(� Zp G dJ� dKe(� Zq G dL� dM� Zr G dN� dO� Zs G dP� dQ� Zt G dR� dSe(� Zu G dT� dUe(� Zv G dV� dWe(� Zw G dX� dYe(� Zx G dZ� d[e(� Zy G d\� d]e(� Zz G d^� d_� Z{ G d`� da� Z| G db� dce(� Z} G dd� de� Z~ G df� dg� Z G dh� die'� Z� G dj� dke'� Z� G dl� dme(� Z� G dn� doe'� Z�y# eIeJf$ r dZ+Y ��*w xY w# eI$ r d Z,Y �� w xY w)sz+ Tests for L{twisted.internet._sslverify}. � N)�skipIf)�implementer)�Version)�defer� interfaces�protocol�reactor)� _idnaText)�CertificateError�ConnectionClosed�ConnectionLost)�Clock)�nativeString)�FilePath)� getModule)� requireModule)�connectedServerAndClient)�SetAsideModule)�util)�SkipTest�SynchronousTestCase�TestCase� �OpenSSL)�SSL)�FILETYPE_PEM�TYPE_RSA�X509�PKey�get_elliptic_curves)�x509)�default_backend)�hashes)�rsa)�Encoding�NoEncryption� PrivateFormat)�NameOID)�sslc � � y �N� ��cs �=/usr/lib/python3/dist-packages/twisted/test/test_sslverify.py�<lambda>r0 : � � � zINPN is deprecated (and OpenSSL 1.0.1 or greater required for NPN support)c � � y r+ r, r- s r/ r0 r0 C r1 r2 z2OpenSSL 1.0.2 or greater required for ALPN supportz"OpenSSL is required for SSL tests.)� _sslverify)�VerificationError� platformTrust)�TLSMemoryBIOFactorya� -----BEGIN CERTIFICATE----- MIIC2jCCAkMCAjA5MA0GCSqGSIb3DQEBBAUAMIG0MQswCQYDVQQGEwJVUzEiMCAG A1UEAxMZZXhhbXBsZS50d2lzdGVkbWF0cml4LmNvbTEPMA0GA1UEBxMGQm9zdG9u MRwwGgYDVQQKExNUd2lzdGVkIE1hdHJpeCBMYWJzMRYwFAYDVQQIEw1NYXNzYWNo dXNldHRzMScwJQYJKoZIhvcNAQkBFhhub2JvZHlAdHdpc3RlZG1hdHJpeC5jb20x ETAPBgNVBAsTCFNlY3VyaXR5MB4XDTA2MDgxNjAxMDEwOFoXDTA3MDgxNjAxMDEw OFowgbQxCzAJBgNVBAYTAlVTMSIwIAYDVQQDExlleGFtcGxlLnR3aXN0ZWRtYXRy aXguY29tMQ8wDQYDVQQHEwZCb3N0b24xHDAaBgNVBAoTE1R3aXN0ZWQgTWF0cml4 IExhYnMxFjAUBgNVBAgTDU1hc3NhY2h1c2V0dHMxJzAlBgkqhkiG9w0BCQEWGG5v Ym9keUB0d2lzdGVkbWF0cml4LmNvbTERMA8GA1UECxMIU2VjdXJpdHkwgZ8wDQYJ KoZIhvcNAQEBBQADgY0AMIGJAoGBAMzH8CDF/U91y/bdbdb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BjMcSh7OcvFXJZnUesBikGWE JE4V8Bjh+RmbJ1ZAlUPZ40bAkww0OpyIRAGMvKG+4yLFTO4WDxKmfDcrOb6ID8WJ e1u+i3XGkIf/5QIDAQABMA0GCSqGSIb3DQEBBAUAA4GBAD4Oukm3YYkhedUepBEA vvXIQhVDqL7mk6OqYdXmNj6R7ZMC8WWvGZxrzDI1bZuB+4aIxxd1FXC3UOHiR/xg i9cDl1y8P/qRp4aEBNF6rI0D4AxTbfnHQx4ERDAOShJdYZs/2zifPJ6va6YvrEyr yqDtGhklsWW3ZwBzEh5VEOUp -----END CERTIFICATE----- z server.pemc � � t | � S )zQ Each time we're called, return the next integer in the natural numbers. )�next)�counters r/ r: r: � s � � ��=�r2 c � � t � }|j t d� t � }|j d� |j d� |j � |j � fD ]0 }| j � D ] \ }}t ||t |� � � �2 |j t � � |j |� |j |d� ||fS )Ni r i�3��md5)r �generate_keyr r �gmtime_adj_notBefore�gmtime_adj_notAfter� get_issuer�get_subject�items�setattrr �set_serial_numberr: � set_pubkey�sign)�kw�keypair�certificate�xname�k�vs r/ �makeCertificaterM � s� � ��f�G�����4�(��&�K��$�$�Q�'��#�#�$6�7��'�'�)�;�+B�+B�+D�D� /���H�H�J� /�D�A�q��E�1�l�1�o�.� /�/� �!�!�'�)�,����7�#����W�e�$��K��r2 c � � t j t j t j d� g� }t j t j t j d� g� }t j ddd� }t j ddt � �� }|j � }t j � j |� j |� j t j j � |z � j! t j j � |z � j# t j$ � � j |� j'