atoti_query.client_certificate module

class atoti_query.client_certificate.ClientCertificate(certificate, certificate_authority=None, keyfile=None, password=None)

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

Example

>>> client_certificate = tt.ClientCertificate(
...     certificate=CERTIFICATES_DIRECTORY / "client.pem",
...     certificate_authority=CERTIFICATES_DIRECTORY / "root-CA.crt",
...     keyfile=CERTIFICATES_DIRECTORY / "client.key",
... )
>>> query_session = tt.QuerySession(
...     f"https://localhost:{session.port}",
...     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

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.