'Extract all DSA/RSA private keys that are not protected with a passphrase.
:return: List of encoded key (key file content)'

def extract_private_keys_unprotected(self):

    keys = []
    if isdir(self.key_files_location):
        for (dirpath, dirnames, filenames) in walk(self.key_files_location, followlinks=True):
            for f in filenames:
                key_file_path = join(dirpath, f)
                if isfile(key_file_path):
                    try:
                        with open(key_file_path, 'r') as key_file:
                            key_content_encoded = key_file.read()
                        if ('DSA    PRIVATE    KEY' in key_content_encoded):
                            key_algorithm = 'DSA'
                        elif ('RSA    PRIVATE    KEY' in key_content_encoded):
                            key_algorithm = 'RSA'
                        else:
                            key_algorithm = None
                        if ((key_algorithm is not None) and self.is_private_key_unprotected(key_content_encoded, key_algorithm)):
                            keys.append(key_content_encoded)
                    except Exception as e:
                        print_debug('ERROR', ("Cannot    load    key    file    '%s'    '%s'" % (key_file_path, e)))
                        pass
    return keys
