From: Andrew Engelbrecht <sudoman@ninthfloor.org> Date: Wed, 22 Jul 2015 19:59:34 +0000 (-0400) Subject: add signed txt, etc. if it's in an encrypted block X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=0aa88c2762b768e1057327a28328240dd3d4234b;p=edward.git add signed txt, etc. if it's in an encrypted block later there will need to be fingerprint checking to make sure that edward can't become a decryption service for edward traffic observers. --- diff --git a/edward b/edward index d7f055d..9a78185 100755 --- a/edward +++ b/edward @@ -357,6 +357,9 @@ def flatten_payloads (eddymsg_obj): flat_string = "" + if eddymsg_obj == None: + return "" + if eddymsg_obj.multipart == True: for sub in eddymsg_obj.subparts: flat_string += flatten_payloads (sub) @@ -366,6 +369,13 @@ def flatten_payloads (eddymsg_obj): for piece in eddymsg_obj.payload_pieces: if piece.piece_type == "text": flat_string += piece.string + elif piece.piece_type == "message": + flat_string += flatten_payloads(piece.plainobj) + elif ((piece.piece_type == "clearsign") \ + or (piece.piece_type == "detachedsig")) \ + and (piece.gpg_data != None): + flat_string += flatten_payloads (piece.gpg_data.plainobj) + return flat_string