diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2020-11-27 13:22:37 +0100 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2020-11-27 13:52:35 +0100 |
commit | dc50161c51d5b479a54d3dc912574f9ed208892a (patch) | |
tree | a1afa74a6ea92fa55225daaf0b39751a04af9a50 /store | |
parent | e59df6db99bc13a6b5b1d1f6ee9e622c60591c00 (diff) |
openpgp: Add Cert::merge_public and Cert::merge_public_and_secret.
- Secret key material is not authenticated by OpenPGP, so care must
be taken when merging certificates.
- Rename Cert::merge to Cert::merge_public_and_secret.
- Add new function Cert::merge_public. This function can be used to
merge certificates from untrusted sources as it ignores secret key
material that cannot be authenticated by OpenPGP.
- Fixes #584.
Diffstat (limited to 'store')
-rw-r--r-- | store/src/backend/mod.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/store/src/backend/mod.rs b/store/src/backend/mod.rs index 2a18f9a0..9947b28c 100644 --- a/store/src/backend/mod.rs +++ b/store/src/backend/mod.rs @@ -578,7 +578,7 @@ impl node::binding::Server for BindingServer { } if current.is_some() { - new = sry!(current.unwrap().merge(new)); + new = sry!(current.unwrap().merge_public(new)); } // Write key back to the database. @@ -774,7 +774,7 @@ impl KeyServer { return Err(node::Error::Conflict.into()); } - new = current.merge(new)?; + new = current.merge_public(new)?; } // Write key back to the database. |