diff options
author | iNPUTmice <daniel@gultsch.de> | 2014-09-03 15:33:44 +0200 |
---|---|---|
committer | iNPUTmice <daniel@gultsch.de> | 2014-09-03 15:39:35 +0200 |
commit | 2b941d19f8cc9a517806a27d1ac976afbaa1677a (patch) | |
tree | 4c689ad320a265bcd8faf1fb797c751ff67ad4cf /src/eu/siacs | |
parent | f1494f83ff7dd9c7d0ebdb176d36293f42297988 (diff) |
more openpgp bug fixes
Diffstat (limited to 'src/eu/siacs')
-rw-r--r-- | src/eu/siacs/conversations/crypto/PgpEngine.java | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/eu/siacs/conversations/crypto/PgpEngine.java b/src/eu/siacs/conversations/crypto/PgpEngine.java index 7b5ef905c..d8222ac54 100644 --- a/src/eu/siacs/conversations/crypto/PgpEngine.java +++ b/src/eu/siacs/conversations/crypto/PgpEngine.java @@ -168,8 +168,10 @@ public class PgpEngine { os.flush(); StringBuilder encryptedMessageBody = new StringBuilder(); String[] lines = os.toString().split("\n"); - for (int i = 3; i < lines.length - 1; ++i) { - encryptedMessageBody.append(lines[i].trim()); + for (int i = 2; i < lines.length - 1; ++i) { + if (!lines[i].contains("Version")) { + encryptedMessageBody.append(lines[i].trim()); + } } message.setEncryptedBody(encryptedMessageBody .toString()); @@ -301,7 +303,9 @@ public class PgpEngine { if (line.contains("END PGP SIGNATURE")) { sig = false; } else { - signatureBuilder.append(line.trim()); + if (!line.contains("Version")) { + signatureBuilder.append(line.trim()); + } } } if (line.contains("BEGIN PGP SIGNATURE")) { |