Radish alpha
H
HardenedBSD Package Manager
Radicle
Git (anonymous pull)
Log in to clone via SSH
Don't bother loading revoked certs if there are no trusted
Bryan Drewery committed 12 years ago
commit 3582be533b4ceb0e4ae4da944a45e8740d9de7c1
parent f4e298139e7cc2eaf4ca80758a2cdff14a860bb4
1 file changed +3 -3
modified libpkg/update.c
@@ -365,9 +365,6 @@ repo_archive_extract_file(int fd, const char *file, const char *dest, struct pkg
		snprintf(path, MAXPATHLEN, "%s/trusted", pkg_repo_fingerprints(repo));
		trusted = load_fingerprints(path);

-
		snprintf(path, MAXPATHLEN, "%s/revoked", pkg_repo_fingerprints(repo));
-
		revoked = load_fingerprints(path);
-

		if (HASH_COUNT(trusted) == 0) {
			pkg_emit_error("No trusted certificates");
			rc = EPKG_FATAL;
@@ -376,6 +373,9 @@ repo_archive_extract_file(int fd, const char *file, const char *dest, struct pkg
			goto cleanup;
		}

+
		snprintf(path, MAXPATHLEN, "%s/revoked", pkg_repo_fingerprints(repo));
+
		revoked = load_fingerprints(path);
+

		for (s = sc; s != NULL; s = s->hh.next) {
			if (s->sig == NULL || s->cert == NULL) {
				pkg_emit_error("Number of signatures and certificates "