Redo how the repository keys are stored.
- Repository keys are now stored in a new directory on metadir (/var/db/xbps): <metadir>/key> - Repository keys are stored with the hex fingerprint of its RSA public key in a plist dictionary: <metadir>/keys/xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx.plist - Drop xbps-rkeys(8) and merge its functionality into xbps-install(8) and xbps-query(8). - xbps-query(8) -vL now shows some more details of remote repositories: 3134 http://localhost:8000 (RSA signed, verified) Signed-by: Void Linux 4096 60:ae:0c:d6:f0:95:17:80:bc:93:46:7a:89:af:a3:2d 16 http://localhost:8000/nonfree (RSA signed, verified) Signed-by: Void Linux 4096 60:ae:0c:d6:f0:95:17:80:bc:93:46:7a:89:af:a3:2d Bump XBPS_API_VERSION.
This commit is contained in:
11
lib/rpool.c
11
lib/rpool.c
@ -52,7 +52,6 @@ xbps_rpool_init(struct xbps_handle *xhp)
|
||||
{
|
||||
struct rpool *rp;
|
||||
const char *repouri;
|
||||
char *p;
|
||||
bool foundrepo = false;
|
||||
int retval, rv = 0;
|
||||
|
||||
@ -61,10 +60,6 @@ xbps_rpool_init(struct xbps_handle *xhp)
|
||||
if (xhp->rpool_initialized)
|
||||
return 0;
|
||||
|
||||
p = xbps_xasprintf("%s/%s", xhp->metadir, XBPS_REPOKEYS);
|
||||
xhp->repokeys = xbps_dictionary_internalize_from_file(p);
|
||||
free(p);
|
||||
|
||||
for (unsigned int i = 0; i < xbps_array_count(xhp->repositories); i++) {
|
||||
rp = malloc(sizeof(struct rpool));
|
||||
assert(rp);
|
||||
@ -89,10 +84,12 @@ xbps_rpool_init(struct xbps_handle *xhp)
|
||||
retval = xbps_repo_key_verify(rp->repo);
|
||||
if (retval == 0) {
|
||||
/* signed, verified */
|
||||
xbps_set_cb_state(xhp, XBPS_STATE_REPO_SIGVERIFIED, 0, NULL, NULL);
|
||||
xbps_set_cb_state(xhp, XBPS_STATE_REPO_SIGVERIFIED,
|
||||
0, repouri, NULL);
|
||||
} else if (retval == EPERM) {
|
||||
/* signed, unverified */
|
||||
xbps_set_cb_state(xhp, XBPS_STATE_REPO_SIGUNVERIFIED, 0, NULL, NULL);
|
||||
xbps_set_cb_state(xhp, XBPS_STATE_REPO_SIGUNVERIFIED,
|
||||
0, repouri, NULL);
|
||||
xbps_repo_invalidate(rp->repo);
|
||||
} else {
|
||||
/* any error */
|
||||
|
Reference in New Issue
Block a user