mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +01:00
More error codes
This commit is contained in:
parent
a46e786221
commit
1df38417a3
@ -1,3 +1,7 @@
|
||||
2002-02-14 Werner Koch <wk@gnupg.org>
|
||||
|
||||
* maperror.c: Add more assuan<->gnupg mappings.
|
||||
|
||||
2002-02-12 Werner Koch <wk@gnupg.org>
|
||||
|
||||
* fopencookie.c: Dummy function.
|
||||
|
@ -91,6 +91,7 @@ enum {
|
||||
GNUPG_Invalid_Card = 62,
|
||||
GNUPG_Card_Not_Present = 63,
|
||||
GNUPG_No_PKCS15_App = 64,
|
||||
GNUPG_Not_Confirmed = 65,
|
||||
};
|
||||
|
||||
/* Status codes - fixme: should go into another file */
|
||||
|
@ -148,6 +148,11 @@ map_assuan_err (int err)
|
||||
|
||||
case ASSUAN_Not_Trusted: err = GNUPG_Not_Trusted; break;
|
||||
|
||||
case ASSUAN_Card_Error: err = GNUPG_Card_Error; break;
|
||||
case ASSUAN_Invalid_Card: err = GNUPG_Invalid_Card; break;
|
||||
case ASSUAN_No_PKCS15_App: err = GNUPG_No_PKCS15_App; break;
|
||||
case ASSUAN_Card_Not_Present: err= GNUPG_Card_Not_Present; break;
|
||||
case ASSUAN_Not_Confirmed: err = GNUPG_Not_Confirmed; break;
|
||||
|
||||
default:
|
||||
err = err < 100? GNUPG_Assuan_Server_Fault : GNUPG_Assuan_Error;
|
||||
@ -178,6 +183,19 @@ map_to_assuan_status (int rc)
|
||||
case GNUPG_Not_Trusted: rc = ASSUAN_Not_Trusted; break;
|
||||
case GNUPG_Canceled: rc = ASSUAN_Canceled; break;
|
||||
|
||||
case GNUPG_Card_Error:
|
||||
case GNUPG_Card_Reset:
|
||||
rc = ASSUAN_Card_Error;
|
||||
break;
|
||||
case GNUPG_Card_Removed:
|
||||
case GNUPG_Card_Not_Present:
|
||||
rc = ASSUAN_Card_Not_Present;
|
||||
break;
|
||||
case GNUPG_Invalid_Card: rc = ASSUAN_Invalid_Card; break;
|
||||
case GNUPG_No_PKCS15_App: rc = ASSUAN_No_PKCS15_App; break;
|
||||
case GNUPG_Not_Confirmed: rc = ASSUAN_Not_Confirmed; break;
|
||||
|
||||
|
||||
case GNUPG_Bad_PIN:
|
||||
case GNUPG_Bad_Passphrase:
|
||||
rc = ASSUAN_No_Secret_Key;
|
||||
|
Loading…
x
Reference in New Issue
Block a user