File: tlsconfig.py

package info (click to toggle)
python-podman 5.4.0.1-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,140 kB
  • sloc: python: 7,532; makefile: 82; sh: 75
file content (28 lines) | stat: -rw-r--r-- 894 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
"""Holds TLS configuration."""


class TLSConfig:
    """TLS configuration.

    Provided for compatibility, currently ignored.
    """

    # pylint: disable=too-few-public-methods

    def __init__(self, *args, **kwargs):
        """Initialize TLSConfig.

        Keywords may be delegated to the SSH client configuration.

        Keyword Args:
                client_cert (tuple of str): Path to client cert, path to client key.
                ca_cert (str): Path to CA cert file.
                verify (bool or str): This can be False, or a path to a CA cert file.
                ssl_version (int): Ignored.
                assert_hostname (bool): Verify the hostname of the server.
        """

    @staticmethod
    def configure_client(client) -> None:
        """Add TLS configuration to the client."""
        # TODO Somehow work this into SSHAdapter(), if/when someone complains.