aboutsummaryrefslogtreecommitdiff
path: root/src/mailman_pgp/pgp/wrapper.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/mailman_pgp/pgp/wrapper.py')
-rw-r--r--src/mailman_pgp/pgp/wrapper.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/mailman_pgp/pgp/wrapper.py b/src/mailman_pgp/pgp/wrapper.py
index f746229..fdb7eeb 100644
--- a/src/mailman_pgp/pgp/wrapper.py
+++ b/src/mailman_pgp/pgp/wrapper.py
@@ -112,6 +112,21 @@ class PGPWrapper(BaseWrapper):
elif self.inline.is_signed():
yield from self.inline.get_signature()
+ def strip_signature(self):
+ """
+
+ :return:
+ :rtype: PGPWrapper
+ """
+ result = None
+ if self.mime.is_signed():
+ result = self.mime.strip_signature()
+ elif self.multisig.is_signed():
+ result = self.multisig.strip_signature()
+ elif self.inline.is_signed():
+ result = self.inline.strip_signature()
+ return self._rewrap(result)
+
def sign(self, key, **kwargs):
"""
Sign a message with key.