summaryrefslogtreecommitdiffstats
path: root/g10/seckey-cert.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2015-01-22 12:06:11 +0100
committerWerner Koch <wk@gnupg.org>2015-01-22 12:06:11 +0100
commit11142e0ad7bc9a9e3c3dccf958d8dbd3312cb993 (patch)
tree0dd1a333374407a96a3258b4cb46a5e634e683ae /g10/seckey-cert.c
parentgpg: Remove an unused variable. (diff)
downloadgnupg2-11142e0ad7bc9a9e3c3dccf958d8dbd3312cb993.tar.xz
gnupg2-11142e0ad7bc9a9e3c3dccf958d8dbd3312cb993.zip
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>
Diffstat (limited to 'g10/seckey-cert.c')
-rw-r--r--g10/seckey-cert.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/g10/seckey-cert.c b/g10/seckey-cert.c
index 1dde6f91c..10037567c 100644
--- a/g10/seckey-cert.c
+++ b/g10/seckey-cert.c
@@ -55,20 +55,20 @@ xxxx_do_check( PKT_secret_key *sk, const char *tryagain_text, int mode,
if( sk->protect.s2k.mode == 1001 ) {
log_info(_("secret key parts are not available\n"));
- return G10ERR_UNU_SECKEY;
+ return GPG_ERR_UNUSABLE_SECKEY;
}
if( sk->protect.algo == CIPHER_ALGO_NONE )
BUG();
if( openpgp_cipher_test_algo( sk->protect.algo ) ) {
log_info(_("protection algorithm %d%s is not supported\n"),
sk->protect.algo,sk->protect.algo==1?" (IDEA)":"" );
- return G10ERR_CIPHER_ALGO;
+ return GPG_ERR_CIPHER_ALGO;
}
if(gcry_md_test_algo (sk->protect.s2k.hash_algo))
{
log_info(_("protection digest %d is not supported\n"),
sk->protect.s2k.hash_algo);
- return G10ERR_DIGEST_ALGO;
+ return GPG_ERR_DIGEST_ALGO;
}
keyid_from_sk( sk, keyid );
keyid[2] = keyid[3] = 0;
@@ -249,7 +249,7 @@ xxxx_do_check( PKT_secret_key *sk, const char *tryagain_text, int mode,
csum += checksum_mpi( sk->skey[i] );
}
if( csum != sk->csum )
- return G10ERR_CHECKSUM;
+ return GPG_ERR_CHECKSUM;
}
return 0;