Response codes as defined in the PC/SC specification.
Synopsis:
#include <smartcard/sc_data_types.h>
typedef enum
SC_SCARD_S_SUCCESS = 0
SC_DEVICE_SUCCESS = 0
SC_IFD_SUCCESS = 0
SC_SCARD_E_INVALID_VALUE = -1
SC_SCARD_E_UNKNOWN_READER = -2
SC_SCARD_E_UNKNOWN_CARD = -3
SC_E_NOTIMPL = -4
SC_SCARD_E_INVALID_HANDLE = -5
SC_SCARD_E_NOT_TRANSACTED = -6
SC_IFD_ERROR_TAG = -7
SC_SCARD_E_IO = -8
SC_SCARD_E_INVALID_LENGTH = -9
SC_SCARD_E_INVALID_CARD = -10
SC_SCARD_E_VERIFY_FAILED = -11
SC_SCARD_E_NO_MEMORY = -12
SC_SCARD_E_INVALID_CERT = -14
SC_SCARD_E_NO_SMARTCARD = -15
SC_SCARD_E_NOT_CONNECTED = -16
SC_SCARD_F_INTERNAL_ERROR = -17
SC_SCARD_E_INVALID_STATE = -18
SC_SCARD_E_READER_UNAVAILABLE = -20
SC_SCARD_E_READER_IN_USE = -21
SC_SCARD_E_INSUFFICIENT_BUFFER = -22
SC_SCARD_E_NOT_SUPPORTED = -23
SC_SCARD_E_NOT_FOUND = -24
SC_SCARD_E_PROTO_MISMATCH = -25
SC_IFD_ERROR_PTS_FAILURE = -26
SC_IFD_ERROR_NOT_SUPPORTED = -27
SC_IFD_PROTOCOL_NOT_SUPPORTED = -28
SC_SCARD_E_NOT_READY = -29
SC_IFD_ERROR_POWER_ACTION = -30
SC_SCARD_E_TIMEOUT = -31
SC_SCARD_E_CANCELLED = -32
SC_IFD_COMMUNICATION_ERROR = -33
SC_IFD_RESPONSE_TIMEOUT = -34
SC_SCARD_E_SERVICE_UNAVAILABLE = -35
SC_SCARD_E_ICC_UNAVAILABLE = -36
SC_SCARD_E_NO_OPERATIONS_TO_CANCEL = -37
SC_SCARD_E_CANCELED_OPERATION = -38
SC_IFD_ICC_PRESENT = 1
SC_IFD_ICC_NOT_PRESENT = 2
SC_SCARD_W_CANCELLED_BY_USER = 3
SC_SCARD_W_RESET_CARD = 4
SC_SCARD_W_UNSUPPORTED_CARD = 5
SC_SCARD_W_WRONG_CHV = 6
SC_SCARD_W_CHV_BLOCKED = 7
SC_SCARD_W_CHV_UNINITIALIZED = 8
} sc_response_code_t;
Data:
- SC_SCARD_S_SUCCESS
- No error was encountered.
- SC_DEVICE_SUCCESS
- Device success code.
- SC_IFD_SUCCESS
- Reader success code.
- SC_SCARD_E_INVALID_VALUE
- One or more of the supplied parameter values is invalid.
- SC_SCARD_E_UNKNOWN_READER
- The specified IFD name is not recognized.
- SC_SCARD_E_UNKNOWN_CARD
- The specified ICC name is not recognized.
- SC_E_NOTIMPL
- Function not implemented or not available at the moment.
- SC_SCARD_E_INVALID_HANDLE
- The supplied handle was invalid.
- SC_SCARD_E_NOT_TRANSACTED
- An attempt was made to end a non-existent transaction.
- SC_IFD_ERROR_TAG
- Reader error when reading a tag.
- SC_SCARD_E_IO
- IO failure.
- SC_SCARD_E_INVALID_LENGTH
- Invalid data or buffer length.
- SC_SCARD_E_INVALID_CARD
- Connected card is invalid.
- SC_SCARD_E_VERIFY_FAILED
- Verify operation failed.
This error code is not defined in the PC/SC spec.
- SC_SCARD_E_NO_MEMORY
- Not enough memory available to complete this command.
- SC_SCARD_E_INVALID_CERT
- Invalid certificate.
- SC_SCARD_E_NO_SMARTCARD
- The operation requires an ICC, but no ICC is currently in the device.
- SC_SCARD_E_NOT_CONNECTED
- Reader is not connected.
This error code is not defined in the PC/SC spec.
- SC_SCARD_F_INTERNAL_ERROR
- An internal consistency check failed.
- SC_SCARD_E_INVALID_STATE
- A system or service is in an invalid state.
This error code is not defined in the PC/SC spec.
- SC_SCARD_E_READER_UNAVAILABLE
- The specified IFD is currently unavailable for use.
- SC_SCARD_E_READER_IN_USE
- Reader is currently in use, and cannot be shared.
This error code is not defined in the PC/SC spec.
- SC_SCARD_E_INSUFFICIENT_BUFFER
- The data buffer to receive returned data is too small for the returned data.
- SC_SCARD_E_NOT_SUPPORTED
- Action is not supported.
This error code is not defined in the PC/SC spec.
- SC_SCARD_E_NOT_FOUND
- Service or component is not found.
This error code is not defined in the PC/SC spec.
- SC_SCARD_E_PROTO_MISMATCH
- The requested protocols are incompatible with the protocol currently in use with the ICC.
- SC_IFD_ERROR_PTS_FAILURE
- Reader PTS failure.
- SC_IFD_ERROR_NOT_SUPPORTED
- Reader not supported.
- SC_IFD_PROTOCOL_NOT_SUPPORTED
- Reader protocol is not supported.
- SC_SCARD_E_NOT_READY
- The IFD or ICC is not ready to accept commands.
- SC_IFD_ERROR_POWER_ACTION
- Error occurred on power action.
- SC_SCARD_E_TIMEOUT
- The specified timeout value has expired.
- SC_SCARD_E_CANCELLED
- The action was cancelled.
- SC_IFD_COMMUNICATION_ERROR
- Communication error with the reader.
- SC_IFD_RESPONSE_TIMEOUT
- Reader response timeout.
- SC_SCARD_E_SERVICE_UNAVAILABLE
- Service is not available.
- SC_SCARD_E_ICC_UNAVAILABLE
- ICC is not available.
This error code is not defined in the PC/SC spec.
- SC_SCARD_E_NO_OPERATIONS_TO_CANCEL
- There are no operations to cancel.
- SC_SCARD_E_CANCELED_OPERATION
- Operation has been canceled.
- SC_IFD_ICC_PRESENT
- ICC is present in the reader.
- SC_IFD_ICC_NOT_PRESENT
- ICC is not present in the reader.
- SC_SCARD_W_CANCELLED_BY_USER
- Operation has been cancelled by the user.
- SC_SCARD_W_RESET_CARD
- The card has been reset, so any shared state information is invalid.
- SC_SCARD_W_UNSUPPORTED_CARD
- The reader cannot communicate with the card, due to Answer to Reset (ATR) configuration conflicts.
- SC_SCARD_W_WRONG_CHV
- A verification failed because the wrong PIN was presented.
- SC_SCARD_W_CHV_BLOCKED
- A verification is blocked because the maximum number of PIN submission attempts has been reached.
- SC_SCARD_W_CHV_UNINITIALIZED
- Card holder verification (CHV) is not initialized.
This error code is not defined in the PC/SC spec.
Library:
libscs (For the qcc command, use the -l scs option to link against this library)