X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=lib-crypt%2Fgnupgparse.c;h=f2a105cda8077b78cc12bd874c6e5f00cbe841aa;hb=35f4e8cefa22d98782a720e4df428a1ce3be2237;hp=dff28ca1df1cba57d413aa569a80cfe452a69e61;hpb=3a63661c35d4b5f93501efab7e5478386ad02565;p=apps%2Fmadmutt.git diff --git a/lib-crypt/gnupgparse.c b/lib-crypt/gnupgparse.c index dff28ca..f2a105c 100644 --- a/lib-crypt/gnupgparse.c +++ b/lib-crypt/gnupgparse.c @@ -43,7 +43,6 @@ #include "pgp.h" #include "charset.h" -#include "lib/debug.h" /**************** * Read the GNUPG keys. For now we read the complete keyring by @@ -117,8 +116,6 @@ static pgp_key_t parse_pub_line (char *buf, int *is_subkey, pgp_key_t k) if (!*buf) return NULL; - debug_print (2, ("buf = `%s'\n", buf)); - for (p = buf; p; p = pend) { if ((pend = strchr (p, ':'))) *pend++ = 0; @@ -129,8 +126,6 @@ static pgp_key_t parse_pub_line (char *buf, int *is_subkey, pgp_key_t k) switch (field) { case 1: /* record type */ { - debug_print (2, ("record type: %s\n", p)); - if (!m_strcmp(p, "pub")); else if (!m_strcmp(p, "sub")) *is_subkey = 1; @@ -149,8 +144,6 @@ static pgp_key_t parse_pub_line (char *buf, int *is_subkey, pgp_key_t k) } case 2: /* trust info */ { - debug_print (2, ("trust info: %s\n", p)); - switch (*p) { /* look only at the first letter */ case 'e': flags |= KEYFLAG_EXPIRED; @@ -182,18 +175,12 @@ static pgp_key_t parse_pub_line (char *buf, int *is_subkey, pgp_key_t k) } case 3: /* key length */ { - - debug_print (2, ("key len: %s\n", p)); - if (!(*is_subkey && option (OPTPGPIGNORESUB))) k->keylen = atoi (p); /* fixme: add validation checks */ break; } case 4: /* pubkey algo */ { - - debug_print (2, ("pubkey algorithm: %s\n", p)); - if (!(*is_subkey && option (OPTPGPIGNORESUB))) { k->numalg = atoi (p); k->algorithm = pgp_pkalgbytype (atoi (p)); @@ -202,8 +189,6 @@ static pgp_key_t parse_pub_line (char *buf, int *is_subkey, pgp_key_t k) } case 5: /* 16 hex digits with the long keyid. */ { - debug_print (2, ("key id: %s\n", p)); - if (!(*is_subkey && option (OPTPGPIGNORESUB))) m_strreplace(&k->keyid, p); break; @@ -214,8 +199,6 @@ static pgp_key_t parse_pub_line (char *buf, int *is_subkey, pgp_key_t k) char tstr[11]; struct tm st_time; - debug_print (2, ("time stamp: %s\n", p)); - if (!p) break; st_time.tm_sec = 0; @@ -245,8 +228,6 @@ static pgp_key_t parse_pub_line (char *buf, int *is_subkey, pgp_key_t k) if (!is_uid && (*is_subkey && option (OPTPGPIGNORESUB))) break; - debug_print (2, ("user ID: %s\n", p)); - uid = p_new(pgp_uid_t, 1); fix_uid (p); uid->addr = m_strdup(p); @@ -266,8 +247,6 @@ static pgp_key_t parse_pub_line (char *buf, int *is_subkey, pgp_key_t k) case 11: /* signature class */ break; case 12: /* key capabilities */ - debug_print (2, ("capabilities info: %s\n", p)); - while (*p) { switch (*p++) { case 'D': @@ -299,7 +278,7 @@ static pgp_key_t parse_pub_line (char *buf, int *is_subkey, pgp_key_t k) return k; } -pgp_key_t pgp_get_candidates (pgp_ring_t keyring, LIST * hints) +pgp_key_t pgp_get_candidates (pgp_ring_t keyring, string_list_t * hints) { FILE *fp; pid_t thepid;