# HG changeset patch # User Mikael Berthe # Date 1179392149 -7200 # Node ID 591d8b35c881154af51de31e83db61ee4869560b # Parent 75aee46d3aee83b13d43171b8877792d46bb013b Disable gpg-agent Disable gpg-agent as it doesn't seem to work very well. diff -r 75aee46d3aee -r 591d8b35c881 mcabber/src/main.c --- a/mcabber/src/main.c Thu May 17 10:44:01 2007 +0200 +++ b/mcabber/src/main.c Thu May 17 10:55:49 2007 +0200 @@ -247,12 +247,13 @@ #ifdef HAVE_GPGME const char *pk, *pp; char *typed_passwd = NULL; - char *p; bool pgp_invalid = FALSE; bool pgp_agent; + //char *p; - p = getenv("GPG_AGENT_INFO"); - pgp_agent = (p && strchr(p, ':')); + //p = getenv("GPG_AGENT_INFO"); + //pgp_agent = (p && strchr(p, ':')); + pgp_agent = FALSE; pk = settings_opt_get("pgp_private_key"); pp = settings_opt_get("pgp_passphrase"); diff -r 75aee46d3aee -r 591d8b35c881 mcabber/src/pgp.c --- a/mcabber/src/pgp.c Thu May 17 10:44:01 2007 +0200 +++ b/mcabber/src/pgp.c Thu May 17 10:55:49 2007 +0200 @@ -253,11 +253,11 @@ { gpgme_ctx_t ctx; gpgme_data_t in, out; - char *p; char *signed_data = NULL; size_t nread; gpgme_key_t key; gpgme_error_t err; + //char *p; if (!gpg.enabled || !gpg.private_key) return NULL; @@ -273,9 +273,12 @@ gpgme_set_textmode(ctx, 0); gpgme_set_armor(ctx, 1); + /* p = getenv("GPG_AGENT_INFO"); if (!(p && strchr(p, ':'))) gpgme_set_passphrase_cb(ctx, passphrase_cb, 0); + */ + gpgme_set_passphrase_cb(ctx, passphrase_cb, 0); err = gpgme_get_key(ctx, gpg.private_key, &key, 1); if (err || !key) { @@ -321,12 +324,13 @@ { gpgme_ctx_t ctx; gpgme_data_t in, out; - char *p, *data; + char *data; char *decrypted_data = NULL; size_t nread; gpgme_error_t err; const char prefix[] = "-----BEGIN PGP MESSAGE-----\n\n"; const char suffix[] = "\n-----END PGP MESSAGE-----\n"; + //char *p; if (!gpg.enabled) return NULL; @@ -340,9 +344,12 @@ gpgme_set_protocol(ctx, GPGME_PROTOCOL_OpenPGP); + /* p = getenv("GPG_AGENT_INFO"); if (!(p && strchr(p, ':'))) gpgme_set_passphrase_cb(ctx, passphrase_cb, 0); + */ + gpgme_set_passphrase_cb(ctx, passphrase_cb, 0); // Surround the given data with the prefix & suffix data = g_new(char, sizeof(prefix) + sizeof(suffix) + strlen(gpg_data));