[Python] Add ca_cert_data parameter (#20697)

* Add `ca_cert_data` parameter to Python client.

This lets a client validate a server's CA certificate chain using a
variable/constant containing PEM (`str`) or DER (`bytes`) data, rather than
needing to reference a file on disk.

* python: Fix `ca_cert_data` on Python 3.8
This commit is contained in:
micolous
2025-02-26 18:04:32 +10:00
committed by GitHub
parent 5757def39b
commit 30787a16fb
11 changed files with 53 additions and 12 deletions

View File

@@ -77,6 +77,7 @@ class RESTClientObject:
"ca_certs": configuration.ssl_ca_cert,
"cert_file": configuration.cert_file,
"key_file": configuration.key_file,
"ca_cert_data": configuration.ca_cert_data,
}
if configuration.assert_hostname is not None:
pool_args['assert_hostname'] = (