Revert "Read also unsigned index-meta"

This reverts commit 61ef5c3f8a.
This commit is contained in:
Juan RP 2020-01-06 14:50:32 +01:00
parent 8b2c62adfc
commit e04cb2fa24
No known key found for this signature in database
GPG Key ID: AF19F6CB482F9368

View File

@ -78,11 +78,11 @@ repo_get_dict(struct xbps_repo *repo)
return NULL;
}
dict = xbps_archive_get_dictionary(repo->ar, entry, &bytes);
if (verified != NULL &&
bytes != NULL &&
(digest = xbps_buffer_hash_raw(bytes, strlen(bytes))) != NULL &&
repo_verify_index(repo, digest))
*verified = true;
idxmeta = (repo->idxmeta != NULL) ? repo->idxmeta : dict;
if (verified != NULL && bytes != NULL) {
digest = xbps_buffer_hash_raw(bytes, strlen(bytes));
*verified = repo_verify_index(repo, idxmeta, digest);
}
free(digest);
free(bytes);
return dict;
@ -179,7 +179,6 @@ repo_open_local(struct xbps_repo *repo, const char *repofile)
repo->is_signed = true;
xbps_dictionary_make_immutable(repo->idxmeta);
}
repo->idxmeta = idxmeta;
return true;
}