summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2021-11-09 12:05:36 +0100
committerJustus Winter <justus@sequoia-pgp.org>2021-11-09 12:07:06 +0100
commitff903a69591c0dbd37c0ec69f837dceacc4d4a22 (patch)
treebb998260a7e85d521434eb94388f2930c6335c94
parentaeacd64d736bbdbc5a0072b57605dcde7a2f0e44 (diff)
openpgp: Fix documentation, add missing KeyFlags::clear_group_key.
-rw-r--r--openpgp/NEWS5
-rw-r--r--openpgp/src/types/key_flags.rs10
2 files changed, 11 insertions, 4 deletions
diff --git a/openpgp/NEWS b/openpgp/NEWS
index a8e62e11..39e163fd 100644
--- a/openpgp/NEWS
+++ b/openpgp/NEWS
@@ -6,12 +6,13 @@
** New functionality
- CertRevocationBuilder::add_notation
- CertRevocationBuilder::set_notation
+ - KeyFlags::clear_group_key
- SubkeyRevocationBuilder::add_notation
- SubkeyRevocationBuilder::set_notation
- - UserIDRevocationBuilder::add_notation
- - UserIDRevocationBuilder::set_notation
- UserAttributeRevocationBuilder::add_notation
- UserAttributeRevocationBuilder::set_notation
+ - UserIDRevocationBuilder::add_notation
+ - UserIDRevocationBuilder::set_notation
* Changes in 1.5.0
** Notable changes
- This crate is now licensed under the LGPL 2.0 or later.
diff --git a/openpgp/src/types/key_flags.rs b/openpgp/src/types/key_flags.rs
index 03bf9f1f..50f96f6a 100644
--- a/openpgp/src/types/key_flags.rs
+++ b/openpgp/src/types/key_flags.rs
@@ -364,12 +364,18 @@ impl KeyFlags {
self.get(KEY_FLAG_GROUP_KEY)
}
- /// Declares that the private component of this key should not be
- /// in possession of more than one person.
+ /// Declares that the private component of this key is in
+ /// possession of more than one person.
pub fn set_group_key(self) -> Self {
self.set(KEY_FLAG_GROUP_KEY)
}
+ /// Declares that the private component of this key should not be
+ /// in possession of more than one person.
+ pub fn clear_group_key(self) -> Self {
+ self.clear(KEY_FLAG_GROUP_KEY)
+ }
+
/// Returns whether no flags are set.
pub fn is_empty(&self) -> bool {
self.as_slice().iter().all(|b| *b == 0)