mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
gpg: Replace remaining old error code macros by GPG_ERR_.
* g10/gpg.h (g10_errstr): Remove macro and change all occurrences by gpg_strerror. (G10ERR_): Remove all macros and change all occurrences by their GPG_ERR_ counterparts. Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
a23c30fb59
commit
11142e0ad7
32 changed files with 362 additions and 408 deletions
|
@ -104,7 +104,7 @@ get_session_key (PKT_pubkey_enc * k, DEK * dek)
|
|||
rc = enum_secret_keys (&enum_context, sk);
|
||||
if (rc)
|
||||
{
|
||||
rc = G10ERR_NO_SECKEY;
|
||||
rc = GPG_ERR_NO_SECKEY;
|
||||
break;
|
||||
}
|
||||
if (sk->pubkey_algo != k->pubkey_algo)
|
||||
|
@ -410,22 +410,22 @@ get_override_session_key (DEK *dek, const char *string)
|
|||
int i;
|
||||
|
||||
if (!string)
|
||||
return G10ERR_BAD_KEY;
|
||||
return GPG_ERR_BAD_KEY;
|
||||
dek->algo = atoi (string);
|
||||
if (dek->algo < 1)
|
||||
return G10ERR_BAD_KEY;
|
||||
return GPG_ERR_BAD_KEY;
|
||||
if (!(s = strchr (string, ':')))
|
||||
return G10ERR_BAD_KEY;
|
||||
return GPG_ERR_BAD_KEY;
|
||||
s++;
|
||||
for (i = 0; i < DIM (dek->key) && *s; i++, s += 2)
|
||||
{
|
||||
int c = hextobyte (s);
|
||||
if (c == -1)
|
||||
return G10ERR_BAD_KEY;
|
||||
return GPG_ERR_BAD_KEY;
|
||||
dek->key[i] = c;
|
||||
}
|
||||
if (*s)
|
||||
return G10ERR_BAD_KEY;
|
||||
return GPG_ERR_BAD_KEY;
|
||||
dek->keylen = i;
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue