[openpgp] Save encryption details

This commit is contained in:
Philipp Hörist
2018-09-14 15:14:51 +02:00
parent 9b3e23befc
commit 7ad794daeb
4 changed files with 33 additions and 6 deletions

View File

@@ -29,6 +29,7 @@ from nbxmpp import Node
from gajim.common.modules.date_and_time import parse_datetime
ENCRYPTION_NAME = 'OpenPGP'
NS_OPENPGP = 'urn:xmpp:openpgp:0'
NS_OPENPGP_PUBLIC_KEYS = 'urn:xmpp:openpgp:0:public-keys'
NS_NOTIFY = NS_OPENPGP_PUBLIC_KEYS + '+notify'
@@ -206,6 +207,11 @@ def get_info_message():
return '[This message is *encrypted* with OpenPGP (See :XEP:`0373`]'
def add_additional_data(data, fingerprint, trust):
data['encrypted'] = {'name': ENCRYPTION_NAME,
'fingerprint': fingerprint}
class VerifyFailed(Exception):
pass