atoti_query.client_certificate module

class atoti_query.ClientCertificate

A client certificate to open a atoti_query.QuerySession against a session configured with atoti.ClientCertificateConfig.

Example

>>> client_certificate = tt.ClientCertificate(
...     certificate=CERTIFICATES_DIRECTORY / "client.pem",
...     keyfile=CERTIFICATES_DIRECTORY / "client.key",
... )
>>> query_session = tt.QuerySession(
...     f"https://localhost:{session.port}",
...     certificate_authority=CERTIFICATES_DIRECTORY / "root-CA.crt",
...     client_certificate=client_certificate,
... )
certificate: Union[str, pathlib.Path]

Path to the .pem file containing the client certificate.

certificate_authority: Optional[Union[str, pathlib.Path]] = None

Deprecated in favor of Session() and QuerySession()’s parameter with the same name.

Path to the custom certificate authority to use to verify the HTTPS connection.

keyfile: Optional[Union[str, pathlib.Path]] = None

Path to the certificate .key file.

password: Optional[str] = None

The certificate password.