diff options
-rw-r--r-- | openpgp/NEWS | 5 | ||||
-rw-r--r-- | openpgp/src/types/key_flags.rs | 10 |
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) |