Trust Any Certificate
#
OverviewEnabling āTrust Any Certificateā in an integration disables certificate validation and uses less-hardened SSL standards.
#
Code usageWhen constructing the BaseClient
in your integrations, set verify=False
to disable SSL checks and allow legacy ciphers:
#
How it works#
_http_request()In the implementation of _http_request
, the verify parameter is passed to the underlying HTTP request from the BaseClient
:
When self._verify
is set to False, SSL certificate verification is disabled. This means the client will accept insecure certificates.
#
Skip Certificate VerificationWhen verify=False
is set, the following function is triggered to delete certificate environment variables.
This ensures that no extra CA bundles are loaded.
For requests versions earlier than 2.28, this step is necessary to fully disable certificate validation in addition to passing the self._verify
to the session.request.
#
Python 3.10+ & Custom SSLAdapterPython 3.10 increased OpenSSLās default security level to 2, which rejects many older cipher suites and breaks connections to legacy servers (see CPython PR #25778).
To mitigate this, BaseClient
mounts a custom SSL adapter when verify=False
:
#
SSLAdapterWhen verify=False
on Python 3.10+, SSLAdapter
creates a custom ssl.SSLContext
that:
Disables hostname checks:
Enabling Legacy TLS Renegotiation:
The OP_LEGACY_SERVER_CONNECT flag tells OpenSSL to allow legacy TLS renegotiation. Relevant when a server doesnāt support the secureārenegotiation extension (RFC 5746).
Lowers OpenSSL security level to 1 & Enables a cipher list
This configuration restores legacy ciphers (excluding null, MD5, DSS).