Mercurial > hg
changeset 1223:591d8b35c881
Disable gpg-agent
Disable gpg-agent as it doesn't seem to work very well.
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Thu, 17 May 2007 10:55:49 +0200 |
parents | 75aee46d3aee |
children | fb0460a3cf4b |
files | mcabber/src/main.c mcabber/src/pgp.c |
diffstat | 2 files changed, 13 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- 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");
--- 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));