diff options
author | Dominik Schürmann <dominik@dominikschuermann.de> | 2014-08-19 10:37:27 +0200 |
---|---|---|
committer | Dominik Schürmann <dominik@dominikschuermann.de> | 2014-08-19 10:37:27 +0200 |
commit | 2c8bcffff3d04a84e7fb51efac6b099a477a98f1 (patch) | |
tree | dd974f8d45b0b3af37a99fd7fc3bdf0b1fd3af02 /OpenKeychain/src | |
parent | a2b38245567ec314cbe1d428d8ad2082d1148134 (diff) | |
download | open-keychain-2c8bcffff3d04a84e7fb51efac6b099a477a98f1.tar.gz open-keychain-2c8bcffff3d04a84e7fb51efac6b099a477a98f1.tar.bz2 open-keychain-2c8bcffff3d04a84e7fb51efac6b099a477a98f1.zip |
add feature to key sig subpacket to indicate that we want MDC
Diffstat (limited to 'OpenKeychain/src')
-rw-r--r-- | OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpKeyOperation.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpKeyOperation.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpKeyOperation.java index c6c064a25..7dedcb242 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpKeyOperation.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpKeyOperation.java @@ -22,6 +22,7 @@ import org.spongycastle.bcpg.CompressionAlgorithmTags; import org.spongycastle.bcpg.HashAlgorithmTags; import org.spongycastle.bcpg.PublicKeyAlgorithmTags; import org.spongycastle.bcpg.SymmetricKeyAlgorithmTags; +import org.spongycastle.bcpg.sig.Features; import org.spongycastle.bcpg.sig.KeyFlags; import org.spongycastle.jce.spec.ElGamalParameterSpec; import org.spongycastle.openpgp.PGPEncryptedData; @@ -894,6 +895,8 @@ public class PgpKeyOperation { hashedPacketsGen.setPreferredSymmetricAlgorithms(true, PREFERRED_SYMMETRIC_ALGORITHMS); hashedPacketsGen.setPreferredHashAlgorithms(true, PREFERRED_HASH_ALGORITHMS); hashedPacketsGen.setPreferredCompressionAlgorithms(true, PREFERRED_COMPRESSION_ALGORITHMS); + // Request senders add additional checksums to the message (useful when verifying unsigned messages.) + hashedPacketsGen.setFeature(true, Features.FEATURE_MODIFICATION_DETECTION); hashedPacketsGen.setPrimaryUserID(false, primary); hashedPacketsGen.setKeyFlags(false, flags); if (expiry > 0) { |