aboutsummaryrefslogtreecommitdiff
path: root/src/mailman_pgp/pgp/mime.py
diff options
context:
space:
mode:
authorJ08nY2017-06-21 00:17:27 +0200
committerJ08nY2017-06-21 00:17:27 +0200
commit12da4324fe8cddd738c2b2bdb8b0fad81ef89f69 (patch)
treee0d8e088668304602c79f2001c343b5550e14ccf /src/mailman_pgp/pgp/mime.py
parent1c76a2e1b22298d7664f4a9f04f73b084113b92d (diff)
downloadmailman-pgp-12da4324fe8cddd738c2b2bdb8b0fad81ef89f69.tar.gz
mailman-pgp-12da4324fe8cddd738c2b2bdb8b0fad81ef89f69.tar.zst
mailman-pgp-12da4324fe8cddd738c2b2bdb8b0fad81ef89f69.zip
Diffstat (limited to 'src/mailman_pgp/pgp/mime.py')
-rw-r--r--src/mailman_pgp/pgp/mime.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mailman_pgp/pgp/mime.py b/src/mailman_pgp/pgp/mime.py
index a2742f1..5641a34 100644
--- a/src/mailman_pgp/pgp/mime.py
+++ b/src/mailman_pgp/pgp/mime.py
@@ -22,7 +22,7 @@ from email.utils import collapse_rfc2231_value
from pgpy import PGPKey, PGPMessage, PGPSignature
-class PGPMIMEWrapper:
+class MIMEWrapper:
_signed_subtype = 'application/pgp-signature'
_encrypted_subtype = 'application/pgp-encrypted'
@@ -47,9 +47,9 @@ class PGPMIMEWrapper:
content_subtype = self.msg.get_content_subtype()
return \
- second_type == PGPMIMEWrapper._signed_subtype and \
+ second_type == MIMEWrapper._signed_subtype and \
content_subtype == 'signed' and \
- protocol_param == PGPMIMEWrapper._signed_subtype
+ protocol_param == MIMEWrapper._signed_subtype
def is_encrypted(self):
"""
@@ -66,10 +66,10 @@ class PGPMIMEWrapper:
return \
'Version: 1' in first_part and \
- first_type == PGPMIMEWrapper._encrypted_subtype and \
+ first_type == MIMEWrapper._encrypted_subtype and \
second_type == 'application/octet-stream' and \
content_subtype == 'encrypted' and \
- protocol_param == PGPMIMEWrapper._encrypted_subtype
+ protocol_param == MIMEWrapper._encrypted_subtype
def verify(self, key: PGPKey):
"""