pubkey = 2
detachedsig = 3
signature = 4
+ clearsig = 5
match_pairs = [(TxtType.message,
(TxtType.pubkey,
'-----BEGIN PGP PUBLIC KEY BLOCK-----.*?-----END PGP PUBLIC KEY BLOCK-----'),
(TxtType.detachedsig,
- '-----BEGIN PGP SIGNATURE-----.*?-----END PGP SIGNATURE-----')]
+ '-----BEGIN PGP SIGNATURE-----.*?-----END PGP SIGNATURE-----'),
+ (TxtType.clearsig,
+ '-----BEGIN PGP SIGNED MESSAGE-----')]
"""This list of tuples matches query names with re.search() queries used
to find GPG data for edward to process."""
sig_failure = False
sigkey_missing = False
key_cannot_encrypt = False
+ using_clearsig = False
have_reply_key = False
# don't transform the plaintext.
pass
+ if piece.piece_type == TxtType.clearsig:
+ # edward doesn't handle clear sigs
+ pass
+
elif piece.piece_type == TxtType.message:
piece.gpg_data = GPGData()
or (piece.piece_type == TxtType.signature):
prepare_for_reply_sig(piece, replyinfo_obj)
+ elif (piece.piece_type == TxtType.clearsig):
+ prepare_for_reply_clearsig(piece, replyinfo_obj)
+
def prepare_for_reply_message (piece, replyinfo_obj):
"""Helper function for prepare_for_reply()
prepare_for_reply(piece.gpg_data.plainobj, replyinfo_obj)
+def prepare_for_reply_clearsig (piece, replyinfo_obj):
+ """Helper function for prepare_for_reply(). Marks clear sig use status.
+
+ Marks replyinfo_obj with clear signature use status.
+
+ Args:
+ piece: a PayloadPiece object
+ replyinfo_obj: a ReplyInfo object
+
+ Pre:
+ piece.piece_type should be set to TxtType.clearsig
+
+ Post:
+ replyinfo_obj has its fields updated with the using_clearsig property
+ set to True
+ """
+
+ replyinfo_obj.using_clearsig = True
+
+
def flatten_decrypted_payloads (eddymsg_obj, replyinfo_obj, get_signed_part):
"""For creating a string representation of a signed, encrypted part.
reply_plain += "\n\n"
- if replyinfo_obj.sig_success == True:
+ if replyinfo_obj.using_clearsig == True:
+ debug('clear signature')
+ reply_plain += replyinfo_obj.replies['sig_failure']
+ reply_plain += "\n\n"
+ reply_plain += replyinfo_obj.replies['clearsig']
+ reply_plain += "\n\n"
+
+ elif replyinfo_obj.sig_success == True:
debug('signature success')
reply_plain += replyinfo_obj.replies['sig_success']
reply_plain += "\n\n"
if (replyinfo_obj.decrypt_success == True) \
and (replyinfo_obj.sig_success == True) \
+ and (replyinfo_obj.using_clearsig == False) \
and (replyinfo_obj.have_reply_key == True):
debug('message quoted')
reply_plain += replyinfo_obj.replies['quote_follows']
'no_public_key' : "Tut mir leid, Ich konnte deinen öffentlicher Schlüssel nicht finden. Hast du daran gedacht ihn an die E-Mail anzuhängen?",
'sig_failure' : 'Deine Signatur konnte nicht verifiziert werden.',
'sig_success' : 'Deine Signatur wurde erfolgreich verifiziert.',
+ 'clearsig' : 'Sorry, I don\'t know how to verify clear signatures. I do understand PGP/MIME, which Enigmail produces by default.',
'signature' : '- Edward, der freundliche GnuPG Roboter\nnDie Free Software Foundation hat mich erstellt. Kannst du etwas spenden, um ihre Arbeit zu unterstützung? | https://www.fsf.org/donate',
'space' : " "
}
'no_public_key' : "Δυστυχώς δε μπόρεσα να βρώ το δημόσιο κλειδί σου. Μήπως ξέχασες να το επισυνάψεις;",
'sig_failure' : 'Δε μπόρεσα να επαληθεύσω την υπογραφή σου.',
'sig_success' : 'nΕπαλήθευσα την υπογραφή σου.',
+ 'clearsig' : 'Sorry, I don\'t know how to verify clear signatures. I do understand PGP/MIME, which Enigmail produces by default.',
'signature' : '- Edward, το φιλικό ρομπότ του GnuPG\n\nΜε δημιούργησε η Free Software Foundation. Μπορείς να υποστηρίξεις το έργο τους με μια δωρεά; | https://www.fsf.org/donate',
'space' : " "
}
'no_public_key' : "I'm sorry, I was not able to find your public key. Did you remember to attach it?",
'sig_failure' : 'Your signature could not be verified.',
'sig_success' : 'Your signature was verified.',
+ 'clearsig' : 'Sorry, I don\'t know how to verify clear signatures. I do understand PGP/MIME, which Enigmail produces by default.',
'signature' : '- Edward, the friendly GnuPG bot\nThe Free Software Foundation created me.\n\nCan you donate to support their work?\nhttps://www.fsf.org/donate',
'space' : " "
}
'no_public_key' : "Lo siento, no he podido encontrar tu clave pública. ¿Te acordaste de adjuntarla?",
'sig_failure' : 'No he podido verificar tu firma criptográfica.',
'sig_success' : 'He verificado con éxito tu firma criptográfica.',
+ 'clearsig' : 'Sorry, I don\'t know how to verify clear signatures. I do understand PGP/MIME, which Enigmail produces by default.',
'signature' : '- Edward, el simpático robot GnuPG\n\nMe creó la Free Software Foundation. ¿Puedes hacer una donación para apoyar su trabajo? | https://www.fsf.org/donate',
'space' : " "
}
'no_public_key' : "Je n'ai pas pu trouver votre clef publique, désolé. Avez-vous oublié de la joindre ?",
'sig_failure' : "Votre signature n'a pas pu être vérifiée.",
'sig_success' : 'Votre signature a été vérifiée.',
+ 'clearsig' : 'Sorry, I don\'t know how to verify clear signatures. I do understand PGP/MIME, which Enigmail produces by default.',
'signature' : "- Edward, le gentil robot de GnuPGn\nLa Free Software Foundation m'a créé. Pourriez-vous faire un don pour soutenir leur travail ? | https://www.fsf.org/donate",
'space' : " "
}
'no_public_key' : "Mi dispiace, non ho trovato la tua chiave pubblica. Ti sei ricordato di allegarla?",
'sig_failure' : 'La tua firma non può essere verificata.',
'sig_success' : 'La tua firma è stata verificata.',
+ 'clearsig' : 'Sorry, I don\'t know how to verify clear signatures. I do understand PGP/MIME, which Enigmail produces by default.',
'signature' : "- Edward, l'amichevole bot GnuPG\n\nLa Free Software Foundation mi ha creato. Potresti fare una donazione per supportare il loro lavoro? | https://www.fsf.org/donate",
'space' : " "
}
'no_public_key' : "ごめんなさい、あなたの公開鍵が見つからないのです。公開鍵を添付したメールを前に送ってくださいましたか?",
'sig_failure' : 'あなたの署名を認証できませんでした。',
'sig_success' : 'あなたの署名を確認できました。',
+ 'clearsig' : 'Sorry, I don\'t know how to verify clear signatures. I do understand PGP/MIME, which Enigmail produces by default.',
'signature' : '- GnuPGボットのEdward\n\nFree Software Foundationが私を制作しました。 Free Software Foundationに寄付しませんか。| https://www.fsf.org/donate',
'space' : ""
}
'no_public_key' : "Perdão, não consegui encontrar sua chave pública. Você se lembrou de anexá-la?",
'sig_failure' : 'Sua assinatura não pôde ser verificada.',
'sig_success' : 'Sua assinatura foi verificada.',
+ 'clearsig' : 'Sorry, I don\'t know how to verify clear signatures. I do understand PGP/MIME, which Enigmail produces by default.',
'signature' : '- Edward, o amigo robô de GnuPG\n\nA Free Software Foundation me criou. Você pode fazer uma doação para apoiar o trabalho dela? | https://www.fsf.org/donate',
'space' : " "
}
'no_public_key' : "Îmi pare rău, dar nu am putut găsi cheia dumneavoastră publică. V-ați amintit să o atașați?",
'sig_failure' : 'Semnătura dumneavoastră nu a putut fi verificată.',
'sig_success' : 'Semnătura dumneavoastră a fost verificată.',
+ 'clearsig' : 'Sorry, I don\'t know how to verify clear signatures. I do understand PGP/MIME, which Enigmail produces by default.',
'signature' : '- Edward, robotul GnuPG cel prietenos.\n\nFundația pentru Software Liber m-a creat. Puteți dona ca să le susțineți munca? | https://www.fsf.org/donate',
'space' : " "
}
'no_public_key' : "Прошу прощения, я не смог найти ваш открытый ключ. Вы не забыли вложить его в письмо?",
'sig_failure' : 'Мне не удалось проверить вашу подпись.',
'sig_success' : 'Ваша подпись была успешно проверена.',
+ 'clearsig' : 'Sorry, I don\'t know how to verify clear signatures. I do understand PGP/MIME, which Enigmail produces by default.',
'signature' : '- Эдвард, дружелюбный GnuPG бот\nЯ был создан Фондом свободного программного обеспечения. Вы можете сделать пожертвование в поддержку их работы? | https://www.fsf.org/donate',
'space' : " "
}
'no_public_key' : "Özür dilerim, açık anahtarınızı bulamadım. E-postaya eklemeyi unutmadınız, değil mi?",
'sig_failure' : 'İmzanız doğrulanamadı.',
'sig_success' : 'İmzanız doğrulandı.',
+ 'clearsig' : 'Sorry, I don\'t know how to verify clear signatures. I do understand PGP/MIME, which Enigmail produces by default.',
'signature' : '- Edward, arkadaş canlısı GnuPG botu\n\nÖzgür Yazılım Vakfı tarafından yaratıldım. Çalışmalarını desteklemek için bağışta bulunur musunuz? | https://www.fsf.org/donate',
'space' : " "
}
Your signature could not be verified.
+Sorry, I don't know how to verify clear signatures. I do understand PGP/MIME, which Enigmail produces by default.
+
- Edward, the friendly GnuPG bot
The Free Software Foundation created me.
Your signature could not be verified.
+Sorry, I don't know how to verify clear signatures. I do understand PGP/MIME, which Enigmail produces by default.
+
- Edward, the friendly GnuPG bot
The Free Software Foundation created me.