If pkg signature verification files, remove pkg archive and its signature file.
This commit is contained in:
parent
92c07c126f
commit
87fcc7d6a8
@ -95,9 +95,16 @@ check_binpkgs(struct xbps_handle *xhp, xbps_object_iterator_t iter)
|
|||||||
"%s: verifying RSA signature...", pkgver);
|
"%s: verifying RSA signature...", pkgver);
|
||||||
|
|
||||||
if (!xbps_verify_file_signature(repo, binfile)) {
|
if (!xbps_verify_file_signature(repo, binfile)) {
|
||||||
|
char *sigfile;
|
||||||
rv = EPERM;
|
rv = EPERM;
|
||||||
xbps_set_cb_state(xhp, XBPS_STATE_VERIFY_FAIL, rv, pkgver,
|
xbps_set_cb_state(xhp, XBPS_STATE_VERIFY_FAIL, rv, pkgver,
|
||||||
"%s: the RSA signature is not valid!", pkgver);
|
"%s: the RSA signature is not valid!", pkgver);
|
||||||
|
xbps_set_cb_state(xhp, XBPS_STATE_VERIFY_FAIL, rv, pkgver,
|
||||||
|
"%s: removed pkg archive and its signature.", pkgver);
|
||||||
|
(void)remove(binfile);
|
||||||
|
sigfile = xbps_xasprintf("%s.sig", binfile);
|
||||||
|
(void)remove(sigfile);
|
||||||
|
free(sigfile);
|
||||||
free(binfile);
|
free(binfile);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user