projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Rocco Rutte:
[apps/madmutt.git]
/
gnupgparse.c
diff --git
a/gnupgparse.c
b/gnupgparse.c
index
48a70bc
..
257220f
100644
(file)
--- a/
gnupgparse.c
+++ b/
gnupgparse.c
@@
-40,6
+40,9
@@
/* for hexval */
#include "mime.h"
/* for hexval */
#include "mime.h"
+#include "lib/mem.h"
+#include "lib/str.h"
+
/****************
* Read the GNUPG keys. For now we read the complete keyring by
* calling gnupg in a special mode.
/****************
* Read the GNUPG keys. For now we read the complete keyring by
* calling gnupg in a special mode.
@@
-92,7
+95,7
@@
static void fix_uid (char *uid)
memcpy (uid, buf, ob - buf);
uid[ob - buf] = '\0';
}
memcpy (uid, buf, ob - buf);
uid[ob - buf] = '\0';
}
- else if (ob - buf == n && (buf[n] = 0,
mutt
_strlen (buf) < n))
+ else if (ob - buf == n && (buf[n] = 0,
safe
_strlen (buf) < n))
memcpy (uid, buf, n);
}
FREE (&buf);
memcpy (uid, buf, n);
}
FREE (&buf);
@@
-126,13
+129,13
@@
static pgp_key_t parse_pub_line (char *buf, int *is_subkey, pgp_key_t k)
{
dprint (2, (debugfile, "record type: %s\n", p));
{
dprint (2, (debugfile, "record type: %s\n", p));
- if (!
mutt
_strcmp (p, "pub"));
- else if (!
mutt
_strcmp (p, "sub"))
+ if (!
safe
_strcmp (p, "pub"));
+ else if (!
safe
_strcmp (p, "sub"))
*is_subkey = 1;
*is_subkey = 1;
- else if (!
mutt
_strcmp (p, "sec"));
- else if (!
mutt
_strcmp (p, "ssb"))
+ else if (!
safe
_strcmp (p, "sec"));
+ else if (!
safe
_strcmp (p, "ssb"))
*is_subkey = 1;
*is_subkey = 1;
- else if (!
mutt
_strcmp (p, "uid"))
+ else if (!
safe
_strcmp (p, "uid"))
is_uid = 1;
else
return NULL;
is_uid = 1;
else
return NULL;
@@
-200,7
+203,7
@@
static pgp_key_t parse_pub_line (char *buf, int *is_subkey, pgp_key_t k)
dprint (2, (debugfile, "key id: %s\n", p));
if (!(*is_subkey && option (OPTPGPIGNORESUB)))
dprint (2, (debugfile, "key id: %s\n", p));
if (!(*is_subkey && option (OPTPGPIGNORESUB)))
-
mutt_
str_replace (&k->keyid, p);
+ str_replace (&k->keyid, p);
break;
}
break;
}
@@
-306,7
+309,7
@@
pgp_key_t pgp_get_candidates (pgp_ring_t keyring, LIST * hints)
if ((devnull = open ("/dev/null", O_RDWR)) == -1)
return NULL;
if ((devnull = open ("/dev/null", O_RDWR)) == -1)
return NULL;
-
mutt_
str_replace (&_chs, Charset);
+ str_replace (&_chs, Charset);
thepid = pgp_invoke_list_keys (NULL, &fp, NULL, -1, -1, devnull,
keyring, hints);
thepid = pgp_invoke_list_keys (NULL, &fp, NULL, -1, -1, devnull,
keyring, hints);