libopensc: Fix SC_ERROR defines and messages: remove unused error defines, fix the internal value of some PKCS#15 related errors.

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4644 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
martin 2010-08-23 10:32:21 +00:00
parent 2b1a8b5828
commit 98255b109a
2 changed files with 20 additions and 20 deletions

View File

@ -31,8 +31,8 @@ const char *sc_strerror(int error)
const char *rdr_errors[] = { const char *rdr_errors[] = {
"Generic reader error", "Generic reader error",
"No readers found", "No readers found",
"Slot not found", /* Not used */ "UNUSED",
"Slot already connected", /* Not used */ "UNUSED",
"Card not present", "Card not present",
"Card removed", "Card removed",
"Card reset", "Card reset",
@ -40,7 +40,7 @@ const char *sc_strerror(int error)
"Timed out while waiting for user input", "Timed out while waiting for user input",
"Input operation cancelled by user", "Input operation cancelled by user",
"The two PINs did not match", "The two PINs did not match",
"Message too long (keypad)", /* Not used */ "Message too long (keypad)",
"Timeout while waiting for event from card reader", "Timeout while waiting for event from card reader",
"Unresponsive card (correctly inserted?)", "Unresponsive card (correctly inserted?)",
"Reader detached (hotplug device?)", "Reader detached (hotplug device?)",
@ -71,8 +71,8 @@ const char *sc_strerror(int error)
const int card_base = -SC_ERROR_CARD_CMD_FAILED; const int card_base = -SC_ERROR_CARD_CMD_FAILED;
const char *arg_errors[] = { const char *arg_errors[] = {
"Invalid arguments", "Invalid arguments",
"Command too short", "UNUSED",
"Command too long", "UNUSED",
"Buffer too small", "Buffer too small",
"Invalid PIN length", "Invalid PIN length",
"Invalid data", "Invalid data",
@ -99,14 +99,14 @@ const char *sc_strerror(int error)
}; };
const int int_base = -SC_ERROR_INTERNAL; const int int_base = -SC_ERROR_INTERNAL;
const char *p15i_errors[] = { const char *p15i_errors[] = {
"Generic PKCS #15 initialization error", "Generic PKCS#15 initialization error",
"Syntax error", "Syntax error",
"Inconsistent or incomplete pkcs15 profile", "Inconsistent or incomplete PKCS#15 profile",
"Key length/algorithm not supported by card", "Key length/algorithm not supported by card",
"No default (transport) key available", "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", "Unable to load key and certificate(s) from file",
"Object is not compatible with intended use", "UNUSED",
"File template not found", "File template not found",
"Invalid PIN reference", "Invalid PIN reference",
"File too small", "File too small",

View File

@ -31,8 +31,8 @@ extern "C" {
/* Errors related to reader operation */ /* Errors related to reader operation */
#define SC_ERROR_READER -1100 #define SC_ERROR_READER -1100
#define SC_ERROR_NO_READERS_FOUND -1101 #define SC_ERROR_NO_READERS_FOUND -1101
#define SC_ERROR_SLOT_NOT_FOUND -1102 /* FIXME: not used */ /* Unused: -1102 */
#define SC_ERROR_SLOT_ALREADY_CONNECTED -1103 /* FIXME: not used */ /* Unused: -1103 */
#define SC_ERROR_CARD_NOT_PRESENT -1104 #define SC_ERROR_CARD_NOT_PRESENT -1104
#define SC_ERROR_CARD_REMOVED -1105 #define SC_ERROR_CARD_REMOVED -1105
#define SC_ERROR_CARD_RESET -1106 #define SC_ERROR_CARD_RESET -1106
@ -40,7 +40,7 @@ extern "C" {
#define SC_ERROR_KEYPAD_TIMEOUT -1108 #define SC_ERROR_KEYPAD_TIMEOUT -1108
#define SC_ERROR_KEYPAD_CANCELLED -1109 #define SC_ERROR_KEYPAD_CANCELLED -1109
#define SC_ERROR_KEYPAD_PIN_MISMATCH -1110 #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_EVENT_TIMEOUT -1112
#define SC_ERROR_CARD_UNRESPONSIVE -1113 #define SC_ERROR_CARD_UNRESPONSIVE -1113
#define SC_ERROR_READER_DETACHED -1114 #define SC_ERROR_READER_DETACHED -1114
@ -69,8 +69,8 @@ extern "C" {
/* Returned by OpenSC library when called with invalid arguments */ /* Returned by OpenSC library when called with invalid arguments */
#define SC_ERROR_INVALID_ARGUMENTS -1300 #define SC_ERROR_INVALID_ARGUMENTS -1300
#define SC_ERROR_CMD_TOO_SHORT -1301 /* Unused: -1301 */
#define SC_ERROR_CMD_TOO_LONG -1302 /* Unused: -1302 */
#define SC_ERROR_BUFFER_TOO_SMALL -1303 #define SC_ERROR_BUFFER_TOO_SMALL -1303
#define SC_ERROR_INVALID_PIN_LENGTH -1304 #define SC_ERROR_INVALID_PIN_LENGTH -1304
#define SC_ERROR_INVALID_DATA -1305 #define SC_ERROR_INVALID_DATA -1305
@ -100,12 +100,12 @@ extern "C" {
#define SC_ERROR_INCONSISTENT_PROFILE -1502 #define SC_ERROR_INCONSISTENT_PROFILE -1502
#define SC_ERROR_INCOMPATIBLE_KEY -1503 #define SC_ERROR_INCOMPATIBLE_KEY -1503
#define SC_ERROR_NO_DEFAULT_KEY -1504 #define SC_ERROR_NO_DEFAULT_KEY -1504
#define SC_ERROR_ID_NOT_UNIQUE -1505 /* Unused: -1505 */
#define SC_ERROR_CANNOT_LOAD_KEY -1006 #define SC_ERROR_CANNOT_LOAD_KEY -1506
#define SC_ERROR_INCOMPATIBLE_OBJECT -1007 /* Unused: -1007 */
#define SC_ERROR_TEMPLATE_NOT_FOUND -1008 #define SC_ERROR_TEMPLATE_NOT_FOUND -1508
#define SC_ERROR_INVALID_PIN_REFERENCE -1009 #define SC_ERROR_INVALID_PIN_REFERENCE -1509
#define SC_ERROR_FILE_TOO_SMALL -1010 #define SC_ERROR_FILE_TOO_SMALL -1510
/* Errors that do not fit the categories above */ /* Errors that do not fit the categories above */
#define SC_ERROR_UNKNOWN -1900 #define SC_ERROR_UNKNOWN -1900