token-import: use entire fingerprint for promote operation

This commit is contained in:
Vincent Breitmoser
2017-09-11 14:54:06 +02:00
parent 10eeb5672b
commit 863651918e
11 changed files with 80 additions and 89 deletions

View File

@@ -20,6 +20,7 @@ package org.sufficientlysecure.keychain.operations;
import java.io.PrintStream;
import java.security.Security;
import java.util.Arrays;
import java.util.Iterator;
import org.bouncycastle.bcpg.sig.KeyFlags;
@@ -164,9 +165,8 @@ public class PromoteKeyOperationTest {
long keyId = KeyringTestingHelper.getSubkeyId(mStaticRing, 1);
PromoteKeyResult result = op.execute(
PromoteKeyringParcel.createPromoteKeyringParcel(mStaticRing.getMasterKeyId(), aid, new long[] {
keyId
}), null);
PromoteKeyringParcel.createPromoteKeyringParcel(mStaticRing.getMasterKeyId(), aid,
Arrays.asList(mStaticRing.getPublicKey(keyId).getFingerprint())), null);
Assert.assertTrue("promotion must succeed", result.success());