+
    Dfj                        R t ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ RI	H
t
 ]! ]
! ]P                  R4      4      P                  R4      P                  4      t ! R R	]P                   4      t ! R
 R4      tR# )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)FilePathzutf-8s
   server.pemc                  *    ] tR t^tRt^tR R ltRtR# )ClientTLSContextz2
SSL Context Factory for client-side connections.
c                   V ^8  d   QhRR/#    returnzSSL.Context )formats   ":/usr/lib/python3/dist-packages/twisted/test/ssl_helpers.py__annotate__ClientTLSContext.__annotate__   s     . .K .    c                J    \         P                  ! \         P                  4      # )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   &r   
getContextClientTLSContext.getContext   s     {{3,,--r   r   N)__name__
__module____qualname____firstlineno____doc__isClientr   __static_attributes__r   r   r   r   r      s     H. .r   r   c                  >    ] tR t^'tRt^ t]R3R R lltR R ltRt	R# )ServerTLSContextz2
SSL Context Factory for server-side connections.
Nc               $    V ^8  d   QhRRRRRR/# )r   filenamezstr | bytesmethodz
int | Noner   Noner   )r   s   "r   r   ServerTLSContext.__annotate__.   s$      #8B	r   c                	F    Wn         Vf   \        P                  pW n        R # )N)r#   r   r   _method)r   r#   r$   s   &&&r   __init__ServerTLSContext.__init__.   s     !>&&Fr   c                   V ^8  d   QhRR/# r
   r   )r   s   "r   r   r&   7   s      K r   c                    \         P                  ! V P                  4      pVP                  V P                  4       VP                  V P                  4       V# )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.
)r   r   r(   use_certificate_filer#   use_privatekey_file)r   ctxs   & r   r   ServerTLSContext.getContext7   s?     kk$,,'  /.
r   )r(   r#   )
r   r   r   r   r   r   certPathr)   r   r   r   r   r   r!   r!   '   s$     H '/T r   r!   N)r   
__future__r   OpenSSLr   twisted.internetr   twisted.python.compatr   twisted.python.filepathr   __file__encodesiblingpathr1   ClientContextFactoryr   r!   r   r   r   <module>r<      s`    #    . ,!9:BB=QVVW.s// .$ r   