
    Rǻi                        d dl mZ ddlmZ ddlmZ ddlmZm	Z	m
Z
mZ ej                  r
d dlZddlmZ  G d d	e      Zy)
    )annotations   )_typing)	AsyncLock)ConfigTrustAllTrustCustomCAsTrustSystemCAsN)ClientCertificatec                       e Zd ZU dZdZdZdZdZdZdZ	dZ
 e       ZdZdZdZdZdZdZdZdZded	<   d
ed<   d fdZddZ xZS )AsyncPoolConfigzConnection pool configuration.i  Nd   g      >@FTssl.SSLContext | None_ssl_context_cacher   _ssl_context_cache_lockc                P    t        |   |i | d | _        t               | _        y )N)super__init__r   r   r   )selfargskwargs	__class__s      Q/opt/lhia/marcimex/agent/venv/lib/python3.12/site-packages/neo4j/_async/config.pyr   zAsyncPoolConfig.__init__o   s'    $)&)"&'0{$    c                  K   | j                   | j                   S | j                  sy d }| j                  4 d {    | j                  j| j                  | j                  cd d d       d {    S | j                  j                          d {   }|K| j                  cd d d       d {    S | j                  "| j                  j                          d {   }dd l} |j                  |j                        }|j                  j                  |_        t        | j                  t              rd|_        |j                   |_        nt        | j                  t$              rEd|_        |j&                  |_        | j                  j(                  D ]  }|j+                  |        n(d|_        |j&                  |_        |j-                          |2|j/                  |j0                  |j2                  |j4                         || _        |cd d d       d {    S 7 7 7 7 7 T7 # 1 d {  7  sw Y   y xY ww)Nr   FT)keyfilepassword)ssl_context	encryptedr   r   client_certificateget_certificatessl
SSLContextPROTOCOL_TLS_CLIENT
TLSVersionTLSv1_2minimum_version
isinstancetrusted_certificatesr   check_hostname	CERT_NONEverify_moder	   CERT_REQUIREDcertsload_verify_locationsload_default_certsload_cert_chaincertfiler   r   )r   client_certr"   r   certs        r   get_ssl_contextzAsyncPoolConfig.get_ssl_contextt   s    '###~~04 // ;	 ;	&&2**222;	 ;	 ;	 %)$;$;$K$K$MM&22;	 ;	 ;	 ((4$($;$;$K$K$MM )#..)@)@AK +...*@*@K'$33X>-2**---'D55~F-1**-*;*;' 55;; <D55d;<
 .2**-*;*;' ..0&++(('//(11 ,  '2D#w;	 ;	 ;	 ;	 N	;	 N;	 ;	 ;	 ;	s   8IH&I$H7"I.H)/I4H7H,H7#I/H/0I5)H7H2D5H7I H5!I)I,H7/I2H75I7I	=I >I	I)returnNone)r6   r   )__name__
__module____qualname____doc__max_connection_lifetimeliveness_check_timeoutmax_connection_pool_sizeconnection_timeoutconnection_write_timeoutresolverr   r
   r)   r    r   
user_agent
keep_aliveauthnotifications_min_severity&notifications_disabled_classificationstelemetry_disabled__annotations__r   r5   __classcell__)r   s   @r   r   r   #   s    ( # "  #
 
  $ H I
 *+  K J J D "& .2* --&&3
Er   r   )
__future__r    r   t_async_compat.concurrencyr   _confr   r   r	   r
   TYPE_CHECKINGr"   _auth_managementr   r    r   r   <module>rR      s7   " #  1  ??4Vf Vr   