private boolean isTrustedKey(List<PGPPublicKeyRing> keys, String keyId) {
for (PGPPublicKeyRing keyRing: keys) {
Iterator<PGPPublicKey> it = keyRing.getPublicKeys();
while (it.hasNext()) {
PGPPublicKey pgpKey = (PGPPublicKey) it.next();
if (new PgpKeyId(pgpKey).equals(new PgpKeyId(keyId))) {
return true;
}
}
}
return false;