+
    i+                     J    R t ^ RIHt ^ RIHt ^ RIHt R	R ltR tR t	R t
R# )
zUtilites for mutual TLS.)getenv)
exceptions)_mtls_helperc                   V '       d*   \         P                  ! \         P                  4       e   R# \         P                  ! \         P                  4       e   R# \	        R4      pV'       d   \         P                  ! V4      e   R# R# )a  Check if default client SSL credentials exists on the device.

Args:
   include_context_aware (bool): include_context_aware indicates if context_aware
   path location will be checked or should it be skipped.

Returns:
    bool: indicating if the default client cert source exists.
TGOOGLE_API_CERTIFICATE_CONFIGF)r   _check_config_pathCONTEXT_AWARE_METADATA_PATH&CERTIFICATE_CONFIGURATION_DEFAULT_PATHr   )include_context_awarecert_config_paths   & m/Users/igloo/.openclaw/workspace/scratch/fb_ad_env/lib/python3.14/site-packages/google/auth/transport/mtls.pyhas_default_client_cert_sourcer      su     	++L,T,TU ''??	
 	
 =>++,<=I    c                 \    \        RR7      '       g   \        P                  ! R4      hR p V # )al  Get a callback which returns the default client SSL credentials.

Returns:
    Callable[[], [bytes, bytes]]: A callback which returns the default
        client certificate bytes and private key bytes, both in PEM format.

Raises:
    google.auth.exceptions.DefaultClientCertSourceError: If the default
        client SSL credentials don't exist or are malformed.
Tr
   z(Default client cert source doesn't existc                       \         P                  ! 4       w  rpW3#   \        \        \        3 d   p\
        P                  ! T4      pYChR p?ii ; i)N)r   get_client_cert_and_keyOSErrorRuntimeError
ValueErrorr   MutualTLSChannelError)_
cert_bytes	key_bytes
caught_excnew_excs        r   callback,default_client_cert_source.<locals>.callbackG   sT    	*'3'K'K'M$A9
 $$	 z2 	* 66zBG)	*s    AAAr   r   r   )r   s    r   default_client_cert_sourcer   7   s1     *EE..6
 	
% Or   c                h   a a \        RR7      '       g   \        P                  ! R4      hV V3R lpV# )a<  Get a callback which returns the default encrpyted client SSL credentials.

Args:
    cert_path (str): The cert file path. The default client certificate will
        be written to this file when the returned callback is called.
    key_path (str): The key file path. The default encrypted client key will
        be written to this file when the returned callback is called.

Returns:
    Callable[[], [str, str, bytes]]: A callback which generates the default
        client certificate, encrpyted private key and passphrase. It writes
        the certificate and private key into the cert_path and key_path, and
        returns the cert_path, key_path and passphrase bytes.

Raises:
    google.auth.exceptions.DefaultClientCertSourceError: If any problem
        occurs when loading or saving the client certificate and key.
Tr   z2Default client encrypted cert source doesn't existc                    <  \         P                  ! R R7      w  p ppp\        SR4      ;_uu_ 4       pVP                  V4       RRR4       \        S	R4      ;_uu_ 4       pVP                  V4       RRR4       SS	T3#   + '       g   i     LC; i  + '       g   i     L(; i  \        P
                  \        3 d   p\        P                  ! T4      pYvhRp?ii ; i)T)generate_encrypted_keywbN)r   get_client_ssl_credentialsopenwriter   ClientCertErrorr   r   )
r   r   r   passphrase_bytes	cert_filekey_filer   r   	cert_pathkey_paths
           r   r   6default_client_encrypted_cert_source.<locals>.callbackk   s    	* 77tT i&&)
+ 'h%%y) & ($444 '&%%**G4 	* 66zBG)	*sL   0B& B B& !B3B&  B	B& B#	B& #B& &CCCr   )r+   r,   r   s   ff r   $default_client_encrypted_cert_sourcer.   S   s2    & *EE..@
 	
5$ Or   c                 ,    \         P                  ! 4       # )a<  Returns boolean for whether the client certificate should be used for mTLS.

This is a wrapper around _mtls_helper.check_use_client_cert().
If GOOGLE_API_USE_CLIENT_CERTIFICATE is set to true or false, a corresponding
bool value will be returned
If GOOGLE_API_USE_CLIENT_CERTIFICATE is unset, the value will be inferred by
reading a file pointed at by GOOGLE_API_CERTIFICATE_CONFIG, and verifying it
contains a "workload" section. If so, the function will return True,
otherwise False.

Returns:
   bool: indicating whether the client certificate should be used for mTLS.
)r   check_use_client_cert r   r   should_use_client_certr2      s     --//r   N)T)__doc__osr   google.authr   google.auth.transportr   r   r   r.   r2   r1   r   r   <module>r7      s)      " .@8*Z0r   