From 171f916df2bfc06abd7ed543118a41d2ad2a399b Mon Sep 17 00:00:00 2001 From: Paul Schaub Date: Mon, 29 Mar 2021 13:43:45 +0200 Subject: [PATCH] Hack: consider ikey_trusted keys as trusted --- .../java/org/jivesoftware/smackx/ox/OpenPgpContact.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/smack-openpgp/src/main/java/org/jivesoftware/smackx/ox/OpenPgpContact.java b/smack-openpgp/src/main/java/org/jivesoftware/smackx/ox/OpenPgpContact.java index b7ffa0e71..eeff6705a 100644 --- a/smack-openpgp/src/main/java/org/jivesoftware/smackx/ox/OpenPgpContact.java +++ b/smack-openpgp/src/main/java/org/jivesoftware/smackx/ox/OpenPgpContact.java @@ -152,8 +152,11 @@ public class OpenPgpContact { while (iterator.hasNext()) { PGPPublicKeyRing ring = iterator.next(); OpenPgpV4Fingerprint fingerprint = new OpenPgpV4Fingerprint(ring); - if (store.getTrust(getJid(), fingerprint) != trust) { - toRemove.add(ring); + if (trust == OpenPgpTrustStore.Trust.trusted) { + OpenPgpTrustStore.Trust fingerprintTrust = store.getTrust(getJid(), fingerprint); + if (fingerprintTrust != OpenPgpTrustStore.Trust.trusted && fingerprintTrust != OpenPgpTrustStore.Trust.ikey_trusted) { + toRemove.add(ring); + } } }