diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/rpmts.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/rpmts.c b/lib/rpmts.c index 765384482..a34edf9a0 100644 --- a/lib/rpmts.c +++ b/lib/rpmts.c @@ -451,9 +451,15 @@ rpmRC rpmtsImportPubkey(const rpmts ts, const unsigned char * pkt, size_t pktlen Header h = NULL; rpmRC rc = RPMRC_FAIL; /* assume failure */ rpmPubkey pubkey = NULL; - rpmKeyring keyring = rpmtsGetKeyring(ts, 1); + rpmVSFlags oflags = rpmtsVSFlags(ts); + rpmKeyring keyring; int krc; + /* XXX keyring wont load if sigcheck disabled, force it temporarily */ + rpmtsSetVSFlags(ts, (oflags & ~_RPMVSF_NOSIGNATURES)); + keyring = rpmtsGetKeyring(ts, 1); + rpmtsSetVSFlags(ts, oflags); + if ((pubkey = rpmPubkeyNew(pkt, pktlen)) == NULL) goto exit; krc = rpmKeyringAddKey(keyring, pubkey); |