diff options
author | Dominik Schürmann <dominik@dominikschuermann.de> | 2014-09-13 19:41:38 +0200 |
---|---|---|
committer | Dominik Schürmann <dominik@dominikschuermann.de> | 2014-09-13 19:41:38 +0200 |
commit | 0f88d5b024877d107cccdbfe8c4260e4ab3ec369 (patch) | |
tree | cb68fbb92a152d728c0dd5a0c2c102cf7d72caa8 | |
parent | 7475aae5e1ea39c67f378d8f39b78ca7f588ec31 (diff) | |
download | open-keychain-0f88d5b024877d107cccdbfe8c4260e4ab3ec369.tar.gz open-keychain-0f88d5b024877d107cccdbfe8c4260e4ab3ec369.tar.bz2 open-keychain-0f88d5b024877d107cccdbfe8c4260e4ab3ec369.zip |
Fix tests
2 files changed, 4 insertions, 2 deletions
diff --git a/OpenKeychain-Test/src/test/java/org/sufficientlysecure/keychain/pgp/UncachedKeyringCanonicalizeTest.java b/OpenKeychain-Test/src/test/java/org/sufficientlysecure/keychain/pgp/UncachedKeyringCanonicalizeTest.java index 2457eeb51..08dcacea5 100644 --- a/OpenKeychain-Test/src/test/java/org/sufficientlysecure/keychain/pgp/UncachedKeyringCanonicalizeTest.java +++ b/OpenKeychain-Test/src/test/java/org/sufficientlysecure/keychain/pgp/UncachedKeyringCanonicalizeTest.java @@ -44,6 +44,7 @@ import org.spongycastle.openpgp.operator.PGPContentSignerBuilder; import org.spongycastle.openpgp.operator.jcajce.JcaKeyFingerprintCalculator; import org.spongycastle.openpgp.operator.jcajce.JcaPGPContentSignerBuilder; import org.spongycastle.openpgp.operator.jcajce.JcePBESecretKeyDecryptorBuilder; +import org.spongycastle.util.Strings; import org.sufficientlysecure.keychain.Constants; import org.sufficientlysecure.keychain.service.results.OperationResultParcel; import org.sufficientlysecure.keychain.service.results.EditKeyResult; @@ -157,7 +158,7 @@ public class UncachedKeyringCanonicalizeTest { @Test public void testUidSignature() throws Exception { UncachedPublicKey masterKey = ring.getPublicKey(); - final WrappedSignature sig = masterKey.getSignaturesForId("twi").next(); + final WrappedSignature sig = masterKey.getSignaturesForRawId(Strings.toUTF8ByteArray("twi")).next(); byte[] raw = sig.getEncoded(); // destroy the signature diff --git a/OpenKeychain-Test/src/test/java/org/sufficientlysecure/keychain/pgp/UncachedKeyringMergeTest.java b/OpenKeychain-Test/src/test/java/org/sufficientlysecure/keychain/pgp/UncachedKeyringMergeTest.java index 3ffdb8262..8cfed42e4 100644 --- a/OpenKeychain-Test/src/test/java/org/sufficientlysecure/keychain/pgp/UncachedKeyringMergeTest.java +++ b/OpenKeychain-Test/src/test/java/org/sufficientlysecure/keychain/pgp/UncachedKeyringMergeTest.java @@ -31,6 +31,7 @@ import org.spongycastle.bcpg.S2K; import org.spongycastle.bcpg.SecretKeyPacket; import org.spongycastle.bcpg.sig.KeyFlags; import org.spongycastle.jce.provider.BouncyCastleProvider; +import org.spongycastle.util.Strings; import org.sufficientlysecure.keychain.service.results.OperationResultParcel; import org.sufficientlysecure.keychain.service.results.EditKeyResult; import org.sufficientlysecure.keychain.service.SaveKeyringParcel; @@ -296,7 +297,7 @@ public class UncachedKeyringMergeTest { { byte[] sig = KeyringTestingHelper.getNth( - modified.getPublicKey().getSignaturesForId("twi"), 1).getEncoded(); + modified.getPublicKey().getSignaturesForRawId(Strings.toUTF8ByteArray("twi")), 1).getEncoded(); // inject the (foreign!) signature into subkey signature position UncachedKeyRing moreModified = KeyringTestingHelper.injectPacket(modified, sig, 1); |