diff options
author | Dominik Schürmann <dominik@dominikschuermann.de> | 2015-07-25 14:32:47 +0200 |
---|---|---|
committer | Dominik Schürmann <dominik@dominikschuermann.de> | 2015-08-09 21:49:56 +0200 |
commit | 57378be1c07893e2231e485d6289d53d522aa7d5 (patch) | |
tree | 294ff6ef9983441d0edacd2e85cb4bb7bccfb513 /OpenKeychain/src/test | |
parent | dc81e0254cc1ea91e8553c39e53489998fe079d9 (diff) | |
download | open-keychain-57378be1c07893e2231e485d6289d53d522aa7d5.tar.gz open-keychain-57378be1c07893e2231e485d6289d53d522aa7d5.tar.bz2 open-keychain-57378be1c07893e2231e485d6289d53d522aa7d5.zip |
Introduce constants in OpenPgpSignature and DecryptionResult for unsigned/unencrypted content, update API, introduce simple checks for insecure symmetric algos
Diffstat (limited to 'OpenKeychain/src/test')
-rw-r--r-- | OpenKeychain/src/test/java/org/sufficientlysecure/keychain/pgp/PgpEncryptDecryptTest.java | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/OpenKeychain/src/test/java/org/sufficientlysecure/keychain/pgp/PgpEncryptDecryptTest.java b/OpenKeychain/src/test/java/org/sufficientlysecure/keychain/pgp/PgpEncryptDecryptTest.java index edd7880fc..af00c068d 100644 --- a/OpenKeychain/src/test/java/org/sufficientlysecure/keychain/pgp/PgpEncryptDecryptTest.java +++ b/OpenKeychain/src/test/java/org/sufficientlysecure/keychain/pgp/PgpEncryptDecryptTest.java @@ -191,7 +191,7 @@ public class PgpEncryptDecryptTest { Assert.assertEquals("cached session keys must be empty", 0, cryptoInput.getCryptoData().size()); - OpenPgpMetadata metadata = result.getDecryptMetadata(); + OpenPgpMetadata metadata = result.getDecryptionMetadata(); Assert.assertEquals("filesize must be correct", out.toByteArray().length, metadata.getOriginalSize()); } @@ -297,7 +297,7 @@ public class PgpEncryptDecryptTest { Assert.assertEquals("must have one cached session key", 1, cryptoInput.getCryptoData().size()); - OpenPgpMetadata metadata = result.getDecryptMetadata(); + OpenPgpMetadata metadata = result.getDecryptionMetadata(); Assert.assertEquals("filesize must be correct", out.toByteArray().length, metadata.getOriginalSize()); @@ -486,7 +486,7 @@ public class PgpEncryptDecryptTest { out.toByteArray(), plaintext.getBytes()); Assert.assertNull("signature should be empty", result.getSignatureResult()); - OpenPgpMetadata metadata = result.getDecryptMetadata(); + OpenPgpMetadata metadata = result.getDecryptionMetadata(); Assert.assertEquals("filesize must be correct", out.toByteArray().length, metadata.getOriginalSize()); } @@ -604,9 +604,9 @@ public class PgpEncryptDecryptTest { Assert.assertArrayEquals("decrypted ciphertext with cached passphrase should equal plaintext", out.toByteArray(), plaintext.getBytes()); Assert.assertEquals("signature should be verified and certified", - OpenPgpSignatureResult.SIGNATURE_SUCCESS_CERTIFIED, result.getSignatureResult().getStatus()); + OpenPgpSignatureResult.RESULT_VALID_CONFIRMED, result.getSignatureResult().getResult()); - OpenPgpMetadata metadata = result.getDecryptMetadata(); + OpenPgpMetadata metadata = result.getDecryptionMetadata(); Assert.assertEquals("filesize must be correct", out.toByteArray().length, metadata.getOriginalSize()); } @@ -631,8 +631,8 @@ public class PgpEncryptDecryptTest { Assert.assertArrayEquals("decrypted ciphertext with cached passphrase should equal plaintext", out.toByteArray(), plaintext.getBytes()); Assert.assertEquals("signature key should be missing", - OpenPgpSignatureResult.SIGNATURE_KEY_MISSING, - result.getSignatureResult().getStatus()); + OpenPgpSignatureResult.RESULT_KEY_MISSING, + result.getSignatureResult().getResult()); } } |