mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-11-27 11:12:15 -05:00
Merge branch 'certify' into certs
Conflicts: OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpKeyOperation.java OpenPGP-Keychain/src/main/res/values/strings.xml
This commit is contained in:
commit
5e4239a7b9
@ -432,7 +432,7 @@ public class PgpKeyOperation {
|
||||
// TODO: this only takes care of user id certificates, what about others?
|
||||
PGPPublicKey pubkey = publicKeyRing.getPublicKey();
|
||||
for(String uid : new IterableIterator<String>(pubkey.getUserIDs())) {
|
||||
for(PGPSignature sig : new IterableIterator<PGPSignature>(oldPublicKey.getSignaturesForID(uid))) {
|
||||
for(PGPSignature sig : new IterableIterator<PGPSignature>(oldPublicKey.getSignaturesForID(uid), true)) {
|
||||
// but skip self certificates
|
||||
if(sig.getKeyID() == pubkey.getKeyID())
|
||||
continue;
|
||||
|
@ -16,13 +16,21 @@
|
||||
|
||||
package org.sufficientlysecure.keychain.util;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
|
||||
public class IterableIterator<T> implements Iterable<T> {
|
||||
private Iterator<T> mIter;
|
||||
|
||||
public IterableIterator(Iterator<T> iter) {
|
||||
public IterableIterator(Iterator<T> iter, boolean failsafe) {
|
||||
mIter = iter;
|
||||
if(failsafe && mIter == null) {
|
||||
// is there a better way?
|
||||
mIter = new ArrayList<T>().iterator();
|
||||
}
|
||||
}
|
||||
public IterableIterator(Iterator<T> iter) {
|
||||
this(iter, false);
|
||||
}
|
||||
|
||||
public Iterator<T> iterator() {
|
||||
|
Loading…
Reference in New Issue
Block a user