File: //opt/saltstack/salt/lib/python3.10/site-packages/libcloud/__pycache__/security.cpython-310.pyc
o
;j � @ s� d Z ddlZddgZdZej�dd�Zee��� dv ZdZ zddl
Z
W n ey. dZY nw dZer;er;e
�
� ZeZ e�d d�Zedur]ej�e�sQed
e ��ej�e�s[ed��eZ dZd
ZdS )z�
Security (SSL) Settings
Usage:
import libcloud.security
libcloud.security.VERIFY_SSL_CERT = True
# Optional.
libcloud.security.CA_CERTS_PATH = '/path/to/certfile'
� N�VERIFY_SSL_CERT�
CA_CERTS_PATHTZLIBCLOUD_SSL_USE_CERTIFI)�true�1F�
SSL_CERT_FILEz!Certificate file %s doesn't existz%Certificate file can't be a directoryz�No CA Certificates were found in CA_CERTS_PATH. For information on how to get required certificate files, please visit https://libcloud.readthedocs.org/en/latest/other/ssl-certificate-validation.htmlz�SSL certificate verification is disabled, this can pose a security risk. For more information how to enable the SSL certificate verification, please visit the libcloud documentation.)�__doc__�os�__all__r �environ�getZUSE_CERTIFI�str�lowerr Zcertifi�ImportErrorZhas_certifi�whereZcertifi_ca_bundle_path�getenvZenvironment_cert_file�path�exists�
ValueError�isfileZCA_CERTS_UNAVAILABLE_ERROR_MSGZVERIFY_SSL_DISABLED_MSG� r r �E/opt/saltstack/salt/lib/python3.10/site-packages/libcloud/security.py�<module> s6 ���