Import PEM certificate with provider
        :param key_name: name of the key to import
        :param pem_file_path: path to the pem file
        :param password: optional password for the pem file

def __import_pem(self, key_name, pem_file_path, password):
        """
        Import PEM certificate with provider
        :param key_name: name of the key to import
        :param pem_file_path: path to the pem file
        :param password: optional password for the pem file
        """
        key_import = self.__get_function_or_ex_function('import_key_pair_from_file')
        pem_file = os.path.expandvars(os.path.expanduser(pem_file_path))
        try:
            pem = paramiko.RSAKey.from_private_key_file(pem_file, password)
        except SSHException:
            try:
                pem = paramiko.DSSKey.from_private_key_file(pem_file, password)
            except SSHException as e:
                raise KeypairError('could not import {f}, neither as RSA key nor as DSA key: {e}'
                                   .format(f=pem_file_path, e=e))
        if not pem:
            raise KeypairError('could not import {f}'.format(f=pem_file_path))
        else:
            with NamedTemporaryFile('w+t') as f:
                f.write('{n} {p}'.format(n=pem.get_name(), p=pem.get_base64()))
                key_import(name=key_name, key_file_path=f.name)