diff --git a/src/libopensc/errors.c b/src/libopensc/errors.c index 33bbf0a3..06942016 100644 --- a/src/libopensc/errors.c +++ b/src/libopensc/errors.c @@ -31,8 +31,8 @@ const char *sc_strerror(int error) const char *rdr_errors[] = { "Generic reader error", "No readers found", - "Slot not found", /* Not used */ - "Slot already connected", /* Not used */ + "UNUSED", + "UNUSED", "Card not present", "Card removed", "Card reset", @@ -40,7 +40,7 @@ const char *sc_strerror(int error) "Timed out while waiting for user input", "Input operation cancelled by user", "The two PINs did not match", - "Message too long (keypad)", /* Not used */ + "Message too long (keypad)", "Timeout while waiting for event from card reader", "Unresponsive card (correctly inserted?)", "Reader detached (hotplug device?)", @@ -71,8 +71,8 @@ const char *sc_strerror(int error) const int card_base = -SC_ERROR_CARD_CMD_FAILED; const char *arg_errors[] = { "Invalid arguments", - "Command too short", - "Command too long", + "UNUSED", + "UNUSED", "Buffer too small", "Invalid PIN length", "Invalid data", @@ -99,14 +99,14 @@ const char *sc_strerror(int error) }; const int int_base = -SC_ERROR_INTERNAL; const char *p15i_errors[] = { - "Generic PKCS #15 initialization error", + "Generic PKCS#15 initialization error", "Syntax error", - "Inconsistent or incomplete pkcs15 profile", + "Inconsistent or incomplete PKCS#15 profile", "Key length/algorithm not supported by card", "No default (transport) key available", - "The PKCS#15 Key/certificate ID specified is not unique", + "UNUSED", "Unable to load key and certificate(s) from file", - "Object is not compatible with intended use", + "UNUSED", "File template not found", "Invalid PIN reference", "File too small", diff --git a/src/libopensc/errors.h b/src/libopensc/errors.h index 1fa31470..39018e54 100644 --- a/src/libopensc/errors.h +++ b/src/libopensc/errors.h @@ -31,8 +31,8 @@ extern "C" { /* Errors related to reader operation */ #define SC_ERROR_READER -1100 #define SC_ERROR_NO_READERS_FOUND -1101 -#define SC_ERROR_SLOT_NOT_FOUND -1102 /* FIXME: not used */ -#define SC_ERROR_SLOT_ALREADY_CONNECTED -1103 /* FIXME: not used */ +/* Unused: -1102 */ +/* Unused: -1103 */ #define SC_ERROR_CARD_NOT_PRESENT -1104 #define SC_ERROR_CARD_REMOVED -1105 #define SC_ERROR_CARD_RESET -1106 @@ -40,7 +40,7 @@ extern "C" { #define SC_ERROR_KEYPAD_TIMEOUT -1108 #define SC_ERROR_KEYPAD_CANCELLED -1109 #define SC_ERROR_KEYPAD_PIN_MISMATCH -1110 -#define SC_ERROR_KEYPAD_MSG_TOO_LONG -1111 /* FIXME: not used */ +#define SC_ERROR_KEYPAD_MSG_TOO_LONG -1111 #define SC_ERROR_EVENT_TIMEOUT -1112 #define SC_ERROR_CARD_UNRESPONSIVE -1113 #define SC_ERROR_READER_DETACHED -1114 @@ -69,8 +69,8 @@ extern "C" { /* Returned by OpenSC library when called with invalid arguments */ #define SC_ERROR_INVALID_ARGUMENTS -1300 -#define SC_ERROR_CMD_TOO_SHORT -1301 -#define SC_ERROR_CMD_TOO_LONG -1302 +/* Unused: -1301 */ +/* Unused: -1302 */ #define SC_ERROR_BUFFER_TOO_SMALL -1303 #define SC_ERROR_INVALID_PIN_LENGTH -1304 #define SC_ERROR_INVALID_DATA -1305 @@ -100,12 +100,12 @@ extern "C" { #define SC_ERROR_INCONSISTENT_PROFILE -1502 #define SC_ERROR_INCOMPATIBLE_KEY -1503 #define SC_ERROR_NO_DEFAULT_KEY -1504 -#define SC_ERROR_ID_NOT_UNIQUE -1505 -#define SC_ERROR_CANNOT_LOAD_KEY -1006 -#define SC_ERROR_INCOMPATIBLE_OBJECT -1007 -#define SC_ERROR_TEMPLATE_NOT_FOUND -1008 -#define SC_ERROR_INVALID_PIN_REFERENCE -1009 -#define SC_ERROR_FILE_TOO_SMALL -1010 +/* Unused: -1505 */ +#define SC_ERROR_CANNOT_LOAD_KEY -1506 +/* Unused: -1007 */ +#define SC_ERROR_TEMPLATE_NOT_FOUND -1508 +#define SC_ERROR_INVALID_PIN_REFERENCE -1509 +#define SC_ERROR_FILE_TOO_SMALL -1510 /* Errors that do not fit the categories above */ #define SC_ERROR_UNKNOWN -1900