def __init__(
            self,
            client_certificate_chain_path: str,
            client_key_path: str,
            client_key_type: OpenSslFileTypeEnum = OpenSslFileTypeEnum.PEM,
            client_key_password: str = ''
    ) -> None:
        """
        Args:
            client_certificate_chain_path: Path to the file containing the client's certificate.
            client_key_path: Path to the file containing the client's private key.
            client_key_type: The format of the key file.
            client_key_password: The password to decrypt the private key.
        """
        self.client_certificate_chain_path = client_certificate_chain_path
        if not os.path.isfile(self.client_certificate_chain_path):
            raise ValueError('Could not open the client certificate file')

        self.client_key_path = client_key_path
        if not os.path.isfile(self.client_key_path):
            raise ValueError('Could not open the client private key file')

        self.client_key_password = client_key_password

        self.client_key_type = client_key_type
        if self.client_key_type not in OpenSslFileTypeEnum:
            raise ValueError('Invalid certificate format specified')

        # Try to load the cert and key in OpenSSL; will raise an exception if something is wrong
        SslClient(
            client_certchain_file=self.client_certificate_chain_path,
            client_key_file=self.client_key_path,
            client_key_type=self.client_key_type,
            client_key_password=self.client_key_password
        )
def __init__ ( self , client_certificate_chain_path : str , client_key_path : str , client_key_type : OpenSslFileTypeEnum = OpenSslFileTypeEnum . PEM , client_key_password : str = '' ) -> None : self . client_certificate_chain_path = client_certificate_chain_path if not os . path . isfile ( self . client_certificate_chain_path ) : raise ValueError ( 'Could not open the client certificate file' ) self . client_key_path = client_key_path if not os . path . isfile ( self . client_key_path ) : raise ValueError ( 'Could not open the client private key file' ) self . client_key_password = client_key_password self . client_key_type = client_key_type if self . client_key_type not in OpenSslFileTypeEnum : raise ValueError ( 'Invalid certificate format specified' ) SslClient ( client_certchain_file = self . client_certificate_chain_path , client_key_file = self . client_key_path , client_key_type = self . client_key_type , client_key_password = self . client_key_password )
Args:
            client_certificate_chain_path: Path to the file containing the client's certificate.
            client_key_path: Path to the file containing the client's private key.
            client_key_type: The format of the key file.
            client_key_password: The password to decrypt the private key.