summaryrefslogtreecommitdiffstats
path: root/openpgp
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2020-09-25 15:35:46 +0200
committerJustus Winter <justus@sequoia-pgp.org>2020-09-25 15:35:46 +0200
commitfce43f6c517e6830ce6976b23007b079365e05ce (patch)
tree2761b23babf0af2c7bec650292374d09da03402c /openpgp
parent66e290c2e9550c6cd02efe895fb5e0b0220444d9 (diff)
openpgp: Adjust default algorithm preferences.
- Fixes #523.
Diffstat (limited to 'openpgp')
-rw-r--r--openpgp/src/cert/builder.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/openpgp/src/cert/builder.rs b/openpgp/src/cert/builder.rs
index c771c1ce..f48ff951 100644
--- a/openpgp/src/cert/builder.rs
+++ b/openpgp/src/cert/builder.rs
@@ -1088,10 +1088,12 @@ impl CertBuilder {
.set_signature_creation_time(creation_time)?
.set_key_validity_period(self.primary.validity)?
.set_preferred_hash_algorithms(vec![
- HashAlgorithm::SHA512
+ HashAlgorithm::SHA512,
+ HashAlgorithm::SHA256,
])?
.set_preferred_symmetric_algorithms(vec![
SymmetricAlgorithm::AES256,
+ SymmetricAlgorithm::AES128,
])?;
if let Some(ref revocation_keys) = self.revocation_keys {