changed message generation logic; some refactoring
authorAndrew Engelbrecht <sudoman@ninthfloor.org>
Sun, 9 Aug 2015 21:32:36 +0000 (17:32 -0400)
committerAndrew Engelbrecht <sudoman@ninthfloor.org>
Mon, 7 Dec 2015 18:29:55 +0000 (13:29 -0500)
now edward remains silent about not receiving a public key, unless we
are not given a key and need one for verifying a signature. some
refactoring was required.

edward now complains to the user about lack of of encryption and
signatures in received emails.

i also changed the handling of newlines in email responses.

21 files changed:
edward
lang/an.py
lang/de.py
lang/el.py
lang/en.py
lang/fr.py
lang/ja.py
lang/pt_br.py
lang/ro.py
lang/ru.py
lang/tr.py
tests/flatten-1.out
tests/flatten-2.out
tests/flatten-3.out
tests/flatten-4.out
tests/flatten-5.out
tests/flatten-6.out
tests/flatten-7.out
tests/flatten-8.out
tests/gpg-flatten-3.out
tests/gpg-flatten-5.out

diff --git a/edward b/edward
index 6bb1f966fdc4caec43884a84c49ca5ecd2d77973..9a4b3f609a4597e23a1ab020b6d19c88e31bce00 100755 (executable)
--- a/edward
+++ b/edward
@@ -146,7 +146,8 @@ class GPGData (object):
 
     'sigs' is a list of fingerprints of keys used to sign the data in plainobj.
 
-    'sig_failure' is a boolean noting whether any signatures failed to verify.
+    'sigkey_missing' is set to True if edward doesn't have the key it needs to
+    verify the signature on a block of text.
 
     'keys' is a list of fingerprints of keys obtained in public key blocks.
     """
@@ -155,7 +156,7 @@ class GPGData (object):
 
     plainobj                = None
     sigs                    = []
-    sig_failure             = False
+    sigkey_missing          = False
     keys                    = []
 
 
@@ -185,23 +186,20 @@ class ReplyInfo (object):
     part. This is to avoid making edward a service for decrypting other
     people's messages to edward.
 
-    'success_decrypt' is set to True if edward could decrypt part of the
+    'decrypt_success' is set to True if edward could decrypt part of the
     message.
 
-    'failed_decrypt' is set to True if edward failed to decrypt part of the
-    message.
-
-    'publick_key_received' is set to True if edward successfully imported a
-    public key.
-
-    'no_public_key' is set to True if edward doesn't have a key to encrypt to
-    when replying to the user.
-
     'sig_success' is set to True if edward could to some extent verify the
     signature of a signed part of the message to edward.
 
-    'sig_failure' is set to True if edward failed to some extent verify the
-    signature of a signed part of the message to edward.
+    'pubkey_success' is set to True if edward successfully imported a public
+    key.
+
+    'sigkey_missing' is set to True if edward doesn't have the public key
+    needed for signature verification.
+
+    'have_repy_key' is set to True if edward has a public key to encrypt its
+    reply to.
     """
 
     replies                 = None
@@ -211,12 +209,12 @@ class ReplyInfo (object):
     encrypt_to_key          = None
     msg_to_quote            = ""
 
-    success_decrypt         = False
-    failed_decrypt          = False
-    public_key_received     = False
-    no_public_key           = False
+    decrypt_success         = False
     sig_success             = False
-    sig_failure             = False
+    pubkey_success          = False
+
+    sigkey_missing          = False
+    have_reply_key          = False
 
 
 def main ():
@@ -586,25 +584,27 @@ def gpg_on_payloads (eddymsg_obj, gpgme_ctx, prev_parts=[]):
             pass
 
         elif piece.piece_type == TxtType.message:
-            (plaintext, sigs, sig_failure) = decrypt_block(piece.string, gpgme_ctx)
+            piece.gpg_data = GPGData()
+
+            (plaintext, sigs, sigkey_missing) = decrypt_block(piece.string, gpgme_ctx)
+
+            piece.gpg_data.sigkey_missing = sigkey_missing
 
             if plaintext:
-                piece.gpg_data = GPGData()
                 piece.gpg_data.decrypted = True
                 piece.gpg_data.sigs = sigs
-                piece.gpg_data.sig_failure = sig_failure
                 # recurse!
                 piece.gpg_data.plainobj = parse_pgp_mime(plaintext, gpgme_ctx)
                 continue
 
             # if not encrypted, check to see if this is an armored signature.
-            (plaintext, sigs, sig_failure) = verify_sig_message(piece.string, gpgme_ctx)
+            (plaintext, sigs,  sigkey_missing) = verify_sig_message(piece.string, gpgme_ctx)
+
+            piece.gpg_data.sigkey_missing = sigkey_missing
 
             if plaintext:
                 piece.piece_type = TxtType.signature
-                piece.gpg_data = GPGData()
                 piece.gpg_data.sigs = sigs
-                piece.gpg_data.sig_failure = sig_failure
                 # recurse!
                 piece.gpg_data.plainobj = parse_pgp_mime(plaintext, gpgme_ctx)
 
@@ -616,13 +616,15 @@ def gpg_on_payloads (eddymsg_obj, gpgme_ctx, prev_parts=[]):
                 piece.gpg_data.keys = key_fps
 
         elif piece.piece_type == TxtType.detachedsig:
+            piece.gpg_data = GPGData()
+
             for prev in prev_parts:
-                (sig_fps, sig_failure) = verify_detached_signature(piece.string, prev.payload_bytes, gpgme_ctx)
+                (sig_fps, sigkey_missing) = verify_detached_signature(piece.string, prev.payload_bytes, gpgme_ctx)
+
+                piece.gpg_data.sigkey_missing = sigkey_missing
 
                 if sig_fps != []:
-                    piece.gpg_data = GPGData()
                     piece.gpg_data.sigs = sig_fps
-                    piece.gpg_data.sig_failure = sig_failure
                     piece.gpg_data.plainobj = prev
                     break
 
@@ -706,7 +708,6 @@ def prepare_for_reply_message (piece, replyinfo_obj):
         piece: a PayloadPiece object.
         replyinfo_obj: object which gets updated with decryption status, etc.
 
-
     Returns:
         Nothing
 
@@ -714,15 +715,15 @@ def prepare_for_reply_message (piece, replyinfo_obj):
         the piece.payload_piece value should be TxtType.message.
 
     Post:
-        replyinfo_obj gets updated with decryption status, signing status and a
-        potential signing key.
+        replyinfo_obj gets updated with decryption status, signing status, a
+        potential signing key, and posession status of the public key for the
+        signature.
     """
 
-    if piece.gpg_data == None:
-        replyinfo_obj.failed_decrypt = True
+    if piece.gpg_data == None or piece.gpg_data.plainobj == None:
         return
 
-    replyinfo_obj.success_decrypt = True
+    replyinfo_obj.decrypt_success = True
 
     # we already have a key (and a message)
     if replyinfo_obj.target_key != None:
@@ -732,9 +733,10 @@ def prepare_for_reply_message (piece, replyinfo_obj):
         replyinfo_obj.target_key = piece.gpg_data.sigs[0]
         replyinfo_obj.sig_success = True
         get_signed_part = False
+
     else:
-        if piece.gpg_data.sig_failure == True:
-            replyinfo_obj.sig_failure = True
+        if piece.gpg_data.sigkey_missing == True:
+            replyinfo_obj.sigkey_missing = True
 
         # only include a signed message in the reply.
         get_signed_part = True
@@ -762,9 +764,9 @@ def prepare_for_reply_pubkey (piece, replyinfo_obj):
     """
 
     if piece.gpg_data == None or piece.gpg_data.keys == []:
-        replyinfo_obj.no_public_key = True
+        pass
     else:
-        replyinfo_obj.public_key_received = True
+        replyinfo_obj.pubkey_success = True
 
         # prefer public key as a fallback for the encrypted reply
         replyinfo_obj.fallback_target_key = piece.gpg_data.keys[0]
@@ -788,13 +790,13 @@ def prepare_for_reply_sig (piece, replyinfo_obj):
     """
 
     if piece.gpg_data == None or piece.gpg_data.sigs == []:
-        replyinfo_obj.sig_failure = True
+
+        if piece.gpg_data.sigkey_missing == True:
+            replyinfo_obj.sigkey_missing = True
+
     else:
         replyinfo_obj.sig_success = True
 
-        if piece.gpg_data.sig_failure == True:
-            replyinfo_obj.sig_failure = True
-
         if replyinfo_obj.fallback_target_key == None:
             replyinfo_obj.fallback_target_key = piece.gpg_data.sigs[0]
 
@@ -842,7 +844,8 @@ def flatten_decrypted_payloads (eddymsg_obj, replyinfo_obj, get_signed_part):
         if (get_signed_part):
             if ((piece.piece_type == TxtType.detachedsig) \
                     or (piece.piece_type == TxtType.signature)) \
-                    and (piece.gpg_data != None):
+                    and (piece.gpg_data != None) \
+                    and (piece.gpg_data.plainobj != None):
                         flatten_decrypted_payloads(piece.gpg_data.plainobj, replyinfo_obj, False)
                         replyinfo_obj.target_key = piece.gpg_data.sigs[0]
                         break
@@ -882,13 +885,12 @@ def get_key_from_fp (replyinfo_obj, gpgme_ctx):
             try:
                 encrypt_to_key = gpgme_ctx.get_key(key)
                 replyinfo_obj.encrypt_to_key = encrypt_to_key
+                replyinfo_obj.have_reply_key = True
                 return
 
             except gpgme.GpgmeError:
                 pass
 
-    replyinfo_obj.no_public_key = True
-
 
 def write_reply (replyinfo_obj):
     """Write the reply email body about the GPG successes/failures.
@@ -910,38 +912,38 @@ def write_reply (replyinfo_obj):
 
     reply_plain = ""
 
-    if replyinfo_obj.success_decrypt == True:
+    if replyinfo_obj.decrypt_success == True:
         reply_plain += replyinfo_obj.replies['success_decrypt']
+        reply_plain += "\n\n"
 
-        if (replyinfo_obj.sig_success == True) and (replyinfo_obj.encrypt_to_key != None):
+        if (replyinfo_obj.sig_success == True) and (replyinfo_obj.have_reply_key == True):
             quoted_text = email_quote_text(replyinfo_obj.msg_to_quote)
             reply_plain += quoted_text
+            reply_plain += "\n\n"
 
-    elif replyinfo_obj.failed_decrypt == True:
+    else:
         reply_plain += replyinfo_obj.replies['failed_decrypt']
-
+        reply_plain += "\n\n"
 
     if replyinfo_obj.sig_success == True:
-        reply_plain += "\n\n"
         reply_plain += replyinfo_obj.replies['sig_success']
+        reply_plain += "\n\n"
 
     else:
-        reply_plain += "\n\n"
         reply_plain += replyinfo_obj.replies['sig_failure']
+        reply_plain += "\n\n"
 
-
-    if replyinfo_obj.no_public_key == True:
+    if (replyinfo_obj.pubkey_success == True):
+        reply_plain += replyinfo_obj.replies['public_key_received']
         reply_plain += "\n\n"
-        reply_plain += replyinfo_obj.replies['no_public_key']
 
-    elif replyinfo_obj.public_key_received == True:
+    elif (replyinfo_obj.sigkey_missing == True):
+        reply_plain += replyinfo_obj.replies['no_public_key']
         reply_plain += "\n\n"
-        reply_plain += replyinfo_obj.replies['public_key_received']
 
 
-    reply_plain += "\n\n"
     reply_plain += replyinfo_obj.replies['signature']
-    reply_plain += "\n"
+    reply_plain += "\n\n"
 
     return reply_plain
 
@@ -995,9 +997,9 @@ def verify_sig_message (msg_block, gpgme_ctx):
     Returns:
         A tuple containing the plaintext of the signed part, the list of
         fingerprints of keys signing the data, and a boolean marking whether
-        there were any invalid signatures. If verification failed, perhaps
-        because the message was also encrypted, then empty results are
-        returned.
+        edward is missing all public keys for validating any of the signatures.
+        If verification failed, perhaps because the message was also encrypted,
+        then empty results are returned.
     """
 
     block_b = io.BytesIO(msg_block.encode('ascii'))
@@ -1006,19 +1008,22 @@ def verify_sig_message (msg_block, gpgme_ctx):
     try:
         sigs = gpgme_ctx.verify(block_b, None, plain_b)
     except gpgme.GpgmeError:
-        return ("",[],True)
+        return ("",[],False)
 
     plaintext = plain_b.getvalue().decode('utf-8')
 
-    sig_failure = False
+    sigkey_missing = False
     fingerprints = []
     for sig in sigs:
         if (sig.summary == 0) or (sig.summary & gpgme.SIGSUM_VALID != 0) or (sig.summary & gpgme.SIGSUM_GREEN != 0):
             fingerprints += [sig.fpr]
+            sigkey_missing = False
+            break
         else:
-            sig_failure = True
+            if (sig.summary & gpgme.SIGSUM_KEY_MISSING != 0):
+                sigkey_missing = True
 
-    return (plaintext, fingerprints, sig_failure)
+    return (plaintext, fingerprints, sigkey_missing)
 
 
 def verify_detached_signature (detached_sig, plaintext_bytes, gpgme_ctx):
@@ -1033,9 +1038,9 @@ def verify_detached_signature (detached_sig, plaintext_bytes, gpgme_ctx):
 
     Returns:
         A tuple containging a list of signing fingerprints if the signature
-        verification was sucessful, and a boolean noting whether there were any
-        failed signature validations. Otherwise, a tuple containing an empty
-        list and True are returned.
+        verification was sucessful, and a boolean marking whether edward is
+        missing all public keys for validating any of the signatures.
+        Otherwise, a tuple containing an empty list and True are returned.
     """
 
     detached_sig_fp = io.BytesIO(detached_sig.encode('ascii'))
@@ -1044,17 +1049,20 @@ def verify_detached_signature (detached_sig, plaintext_bytes, gpgme_ctx):
     try:
         result = gpgme_ctx.verify(detached_sig_fp, plaintext_fp, None)
     except gpgme.GpgmeError:
-        return ([],True)
+        return ([],False)
 
-    sig_failure = False
+    sigkey_missing = False
     sig_fingerprints = []
     for res_ in result:
         if (res_.summary == 0) or (res_.summary & gpgme.SIGSUM_VALID != 0) or (res_.summary & gpgme.SIGSUM_GREEN != 0):
             sig_fingerprints += [res_.fpr]
+            sigkey_missing = False
+            break
         else:
-            sig_failure = True
+            if (res_.summary & gpgme.SIGSUM_KEY_MISSING != 0):
+                sigkey_missing = True
 
-    return (sig_fingerprints, sig_failure)
+    return (sig_fingerprints, sigkey_missing)
 
 
 def decrypt_block (msg_block, gpgme_ctx):
@@ -1069,7 +1077,8 @@ def decrypt_block (msg_block, gpgme_ctx):
     Returns:
         A tuple containing plaintext, signatures (if the decryption and
         signature verification were successful, respectively), and a boolean
-        noting whether there were signatures that could not be validated.
+        marking whether edward is missing all public keys for validating any of
+        the signatures.
     """
 
     block_b = io.BytesIO(msg_block.encode('ascii'))
@@ -1078,19 +1087,22 @@ def decrypt_block (msg_block, gpgme_ctx):
     try:
         sigs = gpgme_ctx.decrypt_verify(block_b, plain_b)
     except gpgme.GpgmeError:
-        return ("",[],True)
+        return ("",[],False)
 
     plaintext = plain_b.getvalue().decode('utf-8')
 
-    sig_failure = False
+    sigkey_missing = False
     fingerprints = []
     for sig in sigs:
         if (sig.summary == 0) or (sig.summary & gpgme.SIGSUM_VALID != 0) or (sig.summary & gpgme.SIGSUM_GREEN != 0):
             fingerprints += [sig.fpr]
+            sigkey_missing = False
+            break
         else:
-            sig_failure = True
+            if (sig.summary & gpgme.SIGSUM_KEY_MISSING != 0):
+                sigkey_missing = True
 
-    return (plaintext, fingerprints, sig_failure)
+    return (plaintext, fingerprints, sigkey_missing)
 
 
 def email_to_from_subject (email_text):
index 2699642c1f67895d0559234207827b8bbb385901..a50e654a0a81cc2cf342007413d3945fe4ea17ab 100644 (file)
@@ -21,7 +21,7 @@
 *********************************************************************"""
 
 replies = {
-    'success_decrypt' : "\n\n",
+    'success_decrypt' : "",
     'public_key_received' : '',
     'failed_decrypt' : "",
     'no_public_key' : "",
index 427aa62c9aa73894ba93438a61b1078729dc7533..4f7ce364c8d253e786419bab2864738f1eef494b 100644 (file)
@@ -21,7 +21,7 @@
 *********************************************************************"""
 
 replies = {
-    'success_decrypt' : "Hallo, Ich bin Edward, der freundliche GnuPG Roboter. Ich deine E-Mail empfangen und entschlüsselt. Hier ist eine Kopie deiner Nachricht:\n\n",
+    'success_decrypt' : "Hallo, Ich bin Edward, der freundliche GnuPG Roboter. Ich deine E-Mail empfangen und entschlüsselt. Hier ist eine Kopie deiner Nachricht:",
     'public_key_received' : 'Ich habe deinen öffentlicher Schlüssel erhalten. Danke.',
     'failed_decrypt' : "Tut mir leid, ich konnte deine Nachricht nicht entschlüsseln. Bist du dir sicher, dass du sie mit meinem öffentlichen Schlüssel verschlüsselt hast?",
     '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?",
index 7bc400b8c3e434dd18b03aaa9b12b2d5f97f5d38..4df5bb220fefe6c7c1dbc467f8cfd0b8de946358 100644 (file)
@@ -21,7 +21,7 @@
 *********************************************************************"""
 
 replies = {
-    'success_decrypt' : "Γειά σου, είμαι ο Edward, το φιλικό ρομπότ του GnuPG. Έλαβα το μήνυμα σου και το αποκρυπτογράφησα. Δες ένα αντίγραφο του μηνύματος σου:\n\nx",
+    'success_decrypt' : "Γειά σου, είμαι ο Edward, το φιλικό ρομπότ του GnuPG. Έλαβα το μήνυμα σου και το αποκρυπτογράφησα. Δες ένα αντίγραφο του μηνύματος σου:",
     'public_key_received' : 'Έλαβα το δημόσιο κλειδί σου. Ευχαριστώ.',
     'failed_decrypt' : "Λυπάμαι, δε μπόρεσα να αποκρυπτογραφήσω το μήνυμα σου. Είσαι σίγουρος/η ότι το κρυπτογράφησες με το δημόσιο κλειδί μου;",
     'no_public_key' : "Δυστυχώς δε μπόρεσα να βρώ το δημόσιο κλειδί σου. Μήπως ξέχασες να το επισυνάψεις;",
index bed71d36860c2f14aeac8a3f507bc470ede2045c..582c1659f1c531e35f9c790db2556520f959590d 100644 (file)
@@ -21,7 +21,7 @@
 *********************************************************************"""
 
 replies = {
-    'success_decrypt' : "Hello, I am Edward, the friendly GnuPG bot. I received your message and decrypted it. Here's a copy of your message:\n\n",
+    'success_decrypt' : "Hello, I am Edward, the friendly GnuPG bot. I received your message and decrypted it. Here's a copy of your message:",
     'public_key_received' : 'I received your public key. Thanks.',
     'failed_decrypt' : "I'm sorry, I was not able to decrypt your message. Are you sure you encrypted it with my public key?",
     'no_public_key' : "I'm sorry, I was not able to find your public key. Did you remember to attach it?",
index 9c9f42e98f2378b61943f8ae08f02df5313b730a..686ae6590cb35a4c54331b9aabe843fbbce6865f 100644 (file)
@@ -21,7 +21,7 @@
 *********************************************************************"""
 
 replies = {
-    'success_decrypt': " Bonjour, je suis Edward, le gentil robot de GnuPG. J'ai bien reçu votre message et l'ai déchiffré. En voici une copie: \n\n",
+    'success_decrypt': " Bonjour, je suis Edward, le gentil robot de GnuPG. J'ai bien reçu votre message et l'ai déchiffré. En voici une copie:",
     'public_key_received' : "J'ai bien reçu votre clef publique. Merci.",
     'failed_decrypt' : "Je n'ai pas été en mesure de déchiffrer votre message, désolé. L'avez-vous bien chiffré avec ma clef publique ?",
     'no_public_key' : "Je n'ai pas pu trouver votre clef publique, désolé. Avez-vous oublié de la joindre ?",
index 915e67b518ea1e56d238caa4a9127ba84611228c..6cb9250260187a2e1091b9883bdb84dc8af76d3c 100644 (file)
@@ -21,7 +21,7 @@
 *********************************************************************"""
 
 replies = {
-    'success_decrypt' : "こんにちは! 私はGnuPGボットのEdwardです。あなたから送られたメールの暗号を解きました。確認のため、内容を返信します:\n\n",
+    'success_decrypt' : "こんにちは! 私はGnuPGボットのEdwardです。あなたから送られたメールの暗号を解きました。確認のため、内容を返信します:",
     'public_key_received' : 'あなたの公開鍵を受けとりました。',
     'failed_decrypt' : "あなたからのメッセージを解読できなくて、すみません。そちらでは暗号化のとき、私の公開鍵を使ってくださったでしょうか?",
     'no_public_key' : "ごめんなさい、あなたの公開鍵が見つからないのです。公開鍵を添付したメールを前に送ってくださいましたか?",
index 4c38683c3fc0c9f0c0065983b1bb1006ed1f7a19..43039b1a122134776fd0f41a51fe1e7c9e03608a 100644 (file)
@@ -21,7 +21,7 @@
 *********************************************************************"""
 
 replies = {
-    'success_decrypt' : "Olá, sou Edward, o amigo robô de GnuPG. Recebi e decifrei sua mensagem. Aqui vai uma cópia da sua mensagem:\n\n",
+    'success_decrypt' : "Olá, sou Edward, o amigo robô de GnuPG. Recebi e decifrei sua mensagem. Aqui vai uma cópia da sua mensagem:",
     'public_key_received' : 'Recebi sua chave pública. Muito agradecido.',
     'failed_decrypt' : "Perdão, não consegui decifrar sua mensagem. Você tem certeza que a cifrou usando minha chave pública?",
     'no_public_key' : "Perdão, não consegui encontrar sua chave pública. Você se lembrou de anexá-la?",
index 869f9e6c571472291739a739c00407a34c0aec70..539ea2c533c3df53a70432f205372f9f0b021666 100644 (file)
@@ -21,7 +21,7 @@
 *********************************************************************"""
 
 replies = {
-    'success_decrypt' : "Bună ziua, eu sunt Edward, robotul GnuPG cel prietenos. Am primit mesajul dumneavoastră și l-am decriptat. Iată o copie a mesajului dumneavoastră:\n\n",
+    'success_decrypt' : "Bună ziua, eu sunt Edward, robotul GnuPG cel prietenos. Am primit mesajul dumneavoastră și l-am decriptat. Iată o copie a mesajului dumneavoastră:",
     'public_key_received' : 'Am primit cheia dumneavoastră publică. Mulțumesc.',
     'failed_decrypt' : "Îmi pare rău, dar nu am putut decripta mesajul dumneavoastră. Sunteți sigur(ă) că l-ați criptat cu cheia mea publică?",
     '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?",
index 369ab335c3c139dbc00e3dcb7ffc4d5df68a97ea..c384839315f919b7aa98ac3ec97b23255f23db5e 100644 (file)
@@ -21,7 +21,7 @@
 *********************************************************************"""
 
 replies = {
-    'success_decrypt' : "Привет, я Эдвард, дружелюбный GnuPG бот. Я получил ваше сообщение и расшифровал его. Вот копия вашего сообщения:\n\n",
+    'success_decrypt' : "Привет, я Эдвард, дружелюбный GnuPG бот. Я получил ваше сообщение и расшифровал его. Вот копия вашего сообщения:",
     'public_key_received' : 'Я получил ваш открытый ключ. Спасибо.',
     'failed_decrypt' : "Прошу прощения, я не смог расшифровать ваше сообщение. Вы уверены, что зашифровали его при помощи моего открытого ключа?",
     'no_public_key' : "Прошу прощения, я не смог найти ваш открытый ключ. Вы не забыли вложить его в письмо?",
index 32b7096320d0fd44a15e6d734a0a54588f9fdb7d..2ca1fa7fda7e738d095f92255c852389cf62a9f6 100644 (file)
@@ -21,7 +21,7 @@
 *********************************************************************"""
 
 replies = {
-    'success_decrypt' : "Merhaba, Ben Edward, arkadaş canlısı GnuPG botu. Mesajınızı aldım ve şifresini çözerek düz metine çevirdim. Mesajınızın düz metin kopyası şudur:\n\n",
+    'success_decrypt' : "Merhaba, Ben Edward, arkadaş canlısı GnuPG botu. Mesajınızı aldım ve şifresini çözerek düz metine çevirdim. Mesajınızın düz metin kopyası şudur:",
     'public_key_received' : 'Açık anahtarınızı aldım. Teşekkürler.',
     'failed_decrypt' : "Özür dilerim, mesajınızı çözmeyi ve düz metine çevirmeyi başaramadım. Benim açık anahtarımla şifrelediğinize emin misiniz?",
     'no_public_key' : "Özür dilerim, açık anahtarınızı bulamadım. E-postaya eklemeyi unutmadınız, değil mi?",
index ec6843663fea8f2475adb022aba6e607301acf93..937480191b643b670d4fd94a8249074be7a0f967 100644 (file)
@@ -1,9 +1,7 @@
-
+I'm sorry, I was not able to decrypt your message. Are you sure you encrypted it with my public key?
 
 Your signature could not be verified.
 
-I'm sorry, I was not able to find your public key. Did you remember to attach it?
-
 - Edward, the friendly GnuPG bot
 The Free Software Foundation created me.
 
index a8bf99c711bfb73af9bd9ac2b4f38469c4dc6797..190652af242cc0649f543195ae650c3976bff24b 100644 (file)
@@ -1,11 +1,7 @@
 Hello, I am Edward, the friendly GnuPG bot. I received your message and decrypted it. Here's a copy of your message:
 
-
-
 Your signature could not be verified.
 
-I'm sorry, I was not able to find your public key. Did you remember to attach it?
-
 - Edward, the friendly GnuPG bot
 The Free Software Foundation created me.
 
index ec6843663fea8f2475adb022aba6e607301acf93..caecd47ad8e14d07c7cb0e1b72f0349b6a520d3e 100644 (file)
@@ -1,4 +1,4 @@
-
+I'm sorry, I was not able to decrypt your message. Are you sure you encrypted it with my public key?
 
 Your signature could not be verified.
 
index ec6843663fea8f2475adb022aba6e607301acf93..937480191b643b670d4fd94a8249074be7a0f967 100644 (file)
@@ -1,9 +1,7 @@
-
+I'm sorry, I was not able to decrypt your message. Are you sure you encrypted it with my public key?
 
 Your signature could not be verified.
 
-I'm sorry, I was not able to find your public key. Did you remember to attach it?
-
 - Edward, the friendly GnuPG bot
 The Free Software Foundation created me.
 
index caecd47ad8e14d07c7cb0e1b72f0349b6a520d3e..937480191b643b670d4fd94a8249074be7a0f967 100644 (file)
@@ -2,8 +2,6 @@ I'm sorry, I was not able to decrypt your message. Are you sure you encrypted it
 
 Your signature could not be verified.
 
-I'm sorry, I was not able to find your public key. Did you remember to attach it?
-
 - Edward, the friendly GnuPG bot
 The Free Software Foundation created me.
 
index ec6843663fea8f2475adb022aba6e607301acf93..937480191b643b670d4fd94a8249074be7a0f967 100644 (file)
@@ -1,9 +1,7 @@
-
+I'm sorry, I was not able to decrypt your message. Are you sure you encrypted it with my public key?
 
 Your signature could not be verified.
 
-I'm sorry, I was not able to find your public key. Did you remember to attach it?
-
 - Edward, the friendly GnuPG bot
 The Free Software Foundation created me.
 
index ec6843663fea8f2475adb022aba6e607301acf93..937480191b643b670d4fd94a8249074be7a0f967 100644 (file)
@@ -1,9 +1,7 @@
-
+I'm sorry, I was not able to decrypt your message. Are you sure you encrypted it with my public key?
 
 Your signature could not be verified.
 
-I'm sorry, I was not able to find your public key. Did you remember to attach it?
-
 - Edward, the friendly GnuPG bot
 The Free Software Foundation created me.
 
index 8f9437474daed3c2da17e1e72969e87eabd274fb..c82d1516df63d866af6ca33cc283c8046f796ea5 100644 (file)
@@ -1,9 +1,7 @@
-
+あなたからのメッセージを解読できなくて、すみません。そちらでは暗号化のとき、私の公開鍵を使ってくださったでしょうか?
 
 あなたの署名を認証できませんでした。
 
-ごめんなさい、あなたの公開鍵が見つからないのです。公開鍵を添付したメールを前に送ってくださいましたか?
-
 - GnuPGボットのEdward
 
 Free Software Foundationが私を制作しました。 Free Software Foundationに寄付しませんか。| https://www.fsf.org/donate
index f5eb59f90fd6bb5d4deb8f785e52ae20b8330d7d..864c0c51b8840e0cfd050cd6a58715051871f52c 100644 (file)
@@ -1,4 +1,4 @@
-
+I'm sorry, I was not able to decrypt your message. Are you sure you encrypted it with my public key?
 
 Your signature was verified.
 
index f5eb59f90fd6bb5d4deb8f785e52ae20b8330d7d..864c0c51b8840e0cfd050cd6a58715051871f52c 100644 (file)
@@ -1,4 +1,4 @@
-
+I'm sorry, I was not able to decrypt your message. Are you sure you encrypted it with my public key?
 
 Your signature was verified.