check for fingerprint of any subkey (arguable?)

This commit is contained in:
Vincent Breitmoser
2015-05-06 11:25:29 +02:00
parent a45aaa2277
commit 91d500b20d
2 changed files with 18 additions and 6 deletions

View File

@@ -215,6 +215,17 @@ public class UncachedKeyRing {
}
public boolean containsSubkey(String expectedFingerprint) {
Iterator<PGPPublicKey> it = mRing.getPublicKeys();
while (it.hasNext()) {
if (KeyFormattingUtils.convertFingerprintToHex(
it.next().getFingerprint()).equals(expectedFingerprint)) {
return true;
}
}
return false;
}
public interface IteratorWithIOThrow<E> {
public boolean hasNext() throws IOException;
public E next() throws IOException;