aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs/conversations/crypto
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/eu/siacs/conversations/crypto')
-rw-r--r--src/main/java/eu/siacs/conversations/crypto/PgpEngine.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/eu/siacs/conversations/crypto/PgpEngine.java b/src/main/java/eu/siacs/conversations/crypto/PgpEngine.java
index 7ca5bea07..b7d5ac8ca 100644
--- a/src/main/java/eu/siacs/conversations/crypto/PgpEngine.java
+++ b/src/main/java/eu/siacs/conversations/crypto/PgpEngine.java
@@ -2,6 +2,7 @@ package eu.siacs.conversations.crypto;
import android.app.PendingIntent;
import android.content.Intent;
+import android.util.Log;
import org.openintents.openpgp.OpenPgpSignatureResult;
import org.openintents.openpgp.util.OpenPgpApi;
@@ -16,6 +17,7 @@ import java.io.InputStream;
import java.io.OutputStream;
import java.net.URL;
+import eu.siacs.conversations.Config;
import eu.siacs.conversations.R;
import eu.siacs.conversations.entities.Account;
import eu.siacs.conversations.entities.Contact;
@@ -299,7 +301,7 @@ public class PgpEngine {
public void generateSignature(final Account account, String status,
final UiCallback<Account> callback) {
- if (account.getPgpId() == -1) {
+ if (account.getPgpId() == 0) {
return;
}
Intent params = new Intent();
@@ -308,6 +310,7 @@ public class PgpEngine {
params.putExtra(OpenPgpApi.EXTRA_SIGN_KEY_ID, account.getPgpId());
InputStream is = new ByteArrayInputStream(status.getBytes());
final OutputStream os = new ByteArrayOutputStream();
+ Log.d(Config.LOGTAG,account.getJid().toBareJid()+": signing status message \""+status+"\"");
api.executeApiAsync(params, is, os, new IOpenPgpCallback() {
@Override