projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
mappings as standalone module
[apps/madmutt.git]
/
crypt-gpgme.c
diff --git
a/crypt-gpgme.c
b/crypt-gpgme.c
index
9728bcc
..
e920128
100644
(file)
--- a/
crypt-gpgme.c
+++ b/
crypt-gpgme.c
@@
-299,11
+299,11
@@
static int crypt_id_matches_addr (ADDRESS * addr, ADDRESS * u_addr,
rv |= CRYPT_KV_STRONGID;
if (addr->mailbox && u_addr->mailbox
rv |= CRYPT_KV_STRONGID;
if (addr->mailbox && u_addr->mailbox
- &&
str_casecmp
(addr->mailbox, u_addr->mailbox) == 0)
+ &&
m_strcasecmp
(addr->mailbox, u_addr->mailbox) == 0)
rv |= CRYPT_KV_ADDR;
if (addr->personal && u_addr->personal
rv |= CRYPT_KV_ADDR;
if (addr->personal && u_addr->personal
- &&
str_casecmp
(addr->personal, u_addr->personal) == 0)
+ &&
m_strcasecmp
(addr->personal, u_addr->personal) == 0)
rv |= CRYPT_KV_STRING;
return rv;
rv |= CRYPT_KV_STRING;
return rv;
@@
-687,8
+687,7
@@
static int get_micalg (gpgme_ctx_t ctx, char *buf, size_t buflen)
if (result) {
algorithm_name = gpgme_hash_algo_name (result->signatures->hash_algo);
if (algorithm_name) {
if (result) {
algorithm_name = gpgme_hash_algo_name (result->signatures->hash_algo);
if (algorithm_name) {
- strncpy (buf, algorithm_name, buflen - 1);
- buf[buflen - 1] = 0;
+ m_strcpy(buf, buflen, algorithm_name);
}
}
}
}
@@
-1660,7
+1659,7
@@
static int pgp_check_traditional_one_body (FILE * fp, BODY * b,
}
while (fgets (buf, sizeof (buf), tfp)) {
}
while (fgets (buf, sizeof (buf), tfp)) {
- if (!
str_ncmp
("-----BEGIN PGP ", buf, 15)) {
+ if (!
m_strncmp
("-----BEGIN PGP ", buf, 15)) {
if (!m_strcmp("MESSAGE-----\n", buf + 15))
enc = 1;
else if (!m_strcmp("SIGNED MESSAGE-----\n", buf + 15))
if (!m_strcmp("MESSAGE-----\n", buf + 15))
enc = 1;
else if (!m_strcmp("SIGNED MESSAGE-----\n", buf + 15))
@@
-1790,7
+1789,7
@@
int pgp_gpgme_application_handler (BODY * m, STATE * s)
but we know that this may only be text thus we assume Latin-1
here. */
if (!mutt_get_body_charset (body_charset, sizeof (body_charset), m))
but we know that this may only be text thus we assume Latin-1
here. */
if (!mutt_get_body_charset (body_charset, sizeof (body_charset), m))
-
strfcpy (body_charset, "iso-8859-1", sizeof body_charset
);
+
m_strcpy(body_charset, sizeof(body_charset), "iso-8859-1"
);
fseeko (s->fpin, m->offset, 0);
last_pos = m->offset;
fseeko (s->fpin, m->offset, 0);
last_pos = m->offset;
@@
-1803,7
+1802,7
@@
int pgp_gpgme_application_handler (BODY * m, STATE * s)
bytes -= (offset - last_pos); /* don't rely on m_strlen(buf) */
last_pos = offset;
bytes -= (offset - last_pos); /* don't rely on m_strlen(buf) */
last_pos = offset;
- if (!
str_ncmp
("-----BEGIN PGP ", buf, 15)) {
+ if (!
m_strncmp
("-----BEGIN PGP ", buf, 15)) {
clearsign = 0;
start_pos = last_pos;
clearsign = 0;
start_pos = last_pos;
@@
-2371,10
+2370,10
@@
static int _crypt_compare_address (const void *a, const void *b)
crypt_key_t **t = (crypt_key_t **) b;
int r;
crypt_key_t **t = (crypt_key_t **) b;
int r;
- if ((r =
str_casecmp
((*s)->uid, (*t)->uid)))
+ if ((r =
m_strcasecmp
((*s)->uid, (*t)->uid)))
return r > 0;
else
return r > 0;
else
- return
str_casecmp
(crypt_keyid (*s), crypt_keyid (*t)) > 0;
+ return
m_strcasecmp
(crypt_keyid (*s), crypt_keyid (*t)) > 0;
}
static int crypt_compare_address (const void *a, const void *b)
}
static int crypt_compare_address (const void *a, const void *b)
@@
-2391,10
+2390,10
@@
static int _crypt_compare_keyid (const void *a, const void *b)
crypt_key_t **t = (crypt_key_t **) b;
int r;
crypt_key_t **t = (crypt_key_t **) b;
int r;
- if ((r =
str_casecmp
(crypt_keyid (*s), crypt_keyid (*t))))
+ if ((r =
m_strcasecmp
(crypt_keyid (*s), crypt_keyid (*t))))
return r > 0;
else
return r > 0;
else
- return
str_casecmp
((*s)->uid, (*t)->uid) > 0;
+ return
m_strcasecmp
((*s)->uid, (*t)->uid) > 0;
}
static int crypt_compare_keyid (const void *a, const void *b)
}
static int crypt_compare_keyid (const void *a, const void *b)
@@
-2420,7
+2419,7
@@
static int _crypt_compare_date (const void *a, const void *b)
if (ts < tt)
return 0;
if (ts < tt)
return 0;
- return
str_casecmp
((*s)->uid, (*t)->uid) > 0;
+ return
m_strcasecmp
((*s)->uid, (*t)->uid) > 0;
}
static int crypt_compare_date (const void *a, const void *b)
}
static int crypt_compare_date (const void *a, const void *b)
@@
-2465,9
+2464,9
@@
static int _crypt_compare_trust (const void *a, const void *b)
if (ts < tt)
return 0;
if (ts < tt)
return 0;
- if ((r =
str_casecmp
((*s)->uid, (*t)->uid)))
+ if ((r =
m_strcasecmp
((*s)->uid, (*t)->uid)))
return r > 0;
return r > 0;
- return (
str_casecmp
(crypt_keyid ((*s)), crypt_keyid ((*t)))) > 0;
+ return (
m_strcasecmp
(crypt_keyid ((*s)), crypt_keyid ((*t)))) > 0;
}
static int crypt_compare_trust (const void *a, const void *b)
}
static int crypt_compare_trust (const void *a, const void *b)
@@
-3570,12
+3569,12
@@
static crypt_key_t *crypt_getkeybystr (char *p, short abilities,
match = 0;
debug_print (5, ("matching \"%s\" against " "key %s, \"%s\":\n", p, crypt_keyid (k), k->uid));
match = 0;
debug_print (5, ("matching \"%s\" against " "key %s, \"%s\":\n", p, crypt_keyid (k), k->uid));
- if (!*p || !
str_casecmp
(p, crypt_keyid (k))
- || (!
str_ncasecmp
(p, "0x", 2)
- && !
str_casecmp
(p + 2, crypt_keyid (k)))
+ if (!*p || !
m_strcasecmp
(p, crypt_keyid (k))
+ || (!
m_strncasecmp
(p, "0x", 2)
+ && !
m_strcasecmp
(p + 2, crypt_keyid (k)))
|| (option (OPTPGPLONGIDS)
|| (option (OPTPGPLONGIDS)
- && !
str_ncasecmp
(p, "0x", 2)
- && !
str_casecmp
(p + 2, crypt_keyid (k) + 8))
+ && !
m_strncasecmp
(p, "0x", 2)
+ && !
m_strcasecmp
(p + 2, crypt_keyid (k) + 8))
|| str_isstr (k->uid, p)) {
crypt_key_t *tmp;
|| str_isstr (k->uid, p)) {
crypt_key_t *tmp;
@@
-3622,8
+3621,8
@@
static crypt_key_t *crypt_ask_for_key (char *tag,
if (whatfor) {
for (l = id_defaults; l; l = l->next)
if (whatfor) {
for (l = id_defaults; l; l = l->next)
- if (!
str_casecmp
(whatfor, l->what)) {
-
strfcpy (resp, NONULL (l->dflt), sizeof (resp
));
+ if (!
m_strcasecmp
(whatfor, l->what)) {
+
m_strcpy(resp, sizeof(resp), NONULL(l->dflt
));
break;
}
}
break;
}
}