aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations
diff options
context:
space:
mode:
authoriNPUTmice <daniel@gultsch.de>2014-09-03 15:33:44 +0200
committeriNPUTmice <daniel@gultsch.de>2014-09-03 15:33:44 +0200
commit253438e698d4e7f69b97dcc11c07426c03fbc416 (patch)
treeb86661a2641db0c2a82b91676a834700500dbb60 /src/eu/siacs/conversations
parent664c9c434f80ace23a94b8c506b6211a72ec5cce (diff)
more openpgp bug fixes
Diffstat (limited to 'src/eu/siacs/conversations')
-rw-r--r--src/eu/siacs/conversations/crypto/PgpEngine.java10
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 71282c44..2f678279 100644
--- a/src/eu/siacs/conversations/crypto/PgpEngine.java
+++ b/src/eu/siacs/conversations/crypto/PgpEngine.java
@@ -171,8 +171,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());
@@ -304,7 +306,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")) {