2002-04-05 15:06:33 +00:00
|
|
|
|
/*
|
|
|
|
|
* errors.h: OpenSC error codes
|
|
|
|
|
*
|
|
|
|
|
* Copyright (C) 2001, 2002 Juha Yrj<EFBFBD>l<EFBFBD> <juha.yrjola@iki.fi>
|
|
|
|
|
*
|
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
|
*
|
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
2002-04-06 12:02:28 +00:00
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
2002-04-05 15:06:33 +00:00
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
|
*
|
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
|
* License along with this library; if not, write to the Free Software
|
2002-04-06 12:02:28 +00:00
|
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
2002-04-05 15:06:33 +00:00
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef _OPENSC_ERRORS_H
|
|
|
|
|
#define _OPENSC_ERRORS_H
|
|
|
|
|
|
|
|
|
|
#define SC_SUCCESS 0
|
|
|
|
|
#define SC_NO_ERROR 0
|
|
|
|
|
|
2002-04-06 12:02:28 +00:00
|
|
|
|
/* Errors related to reader operation */
|
|
|
|
|
#define SC_ERROR_READER -1100
|
|
|
|
|
#define SC_ERROR_NO_READERS_FOUND -1101
|
|
|
|
|
#define SC_ERROR_SLOT_NOT_FOUND -1102
|
|
|
|
|
#define SC_ERROR_SLOT_ALREADY_CONNECTED -1103
|
|
|
|
|
#define SC_ERROR_CARD_NOT_PRESENT -1104
|
|
|
|
|
#define SC_ERROR_CARD_REMOVED -1105
|
|
|
|
|
#define SC_ERROR_CARD_RESET -1106
|
|
|
|
|
#define SC_ERROR_TRANSMIT_FAILED -1107
|
|
|
|
|
|
|
|
|
|
/* Resulting from a card command or related to the card*/
|
|
|
|
|
#define SC_ERROR_CARD_CMD_FAILED -1200
|
|
|
|
|
#define SC_ERROR_FILE_NOT_FOUND -1201
|
|
|
|
|
#define SC_ERROR_RECORD_NOT_FOUND -1202
|
|
|
|
|
#define SC_ERROR_CLASS_NOT_SUPPORTED -1203
|
|
|
|
|
#define SC_ERROR_INS_NOT_SUPPORTED -1204
|
|
|
|
|
#define SC_ERROR_INCORRECT_PARAMETERS -1205
|
|
|
|
|
#define SC_ERROR_WRONG_LENGTH -1206
|
|
|
|
|
#define SC_ERROR_MEMORY_FAILURE -1207
|
|
|
|
|
#define SC_ERROR_NO_CARD_SUPPORT -1208
|
|
|
|
|
#define SC_ERROR_NOT_ALLOWED -1209
|
|
|
|
|
#define SC_ERROR_INVALID_CARD -1210
|
|
|
|
|
#define SC_ERROR_SECURITY_STATUS_NOT_SATISFIED -1211
|
|
|
|
|
#define SC_ERROR_AUTH_METHOD_BLOCKED -1212
|
|
|
|
|
#define SC_ERROR_UNKNOWN_DATA_RECEIVED -1213
|
|
|
|
|
#define SC_ERROR_PIN_CODE_INCORRECT -1214
|
|
|
|
|
#define SC_ERROR_FILE_ALREADY_EXISTS -1215
|
|
|
|
|
|
|
|
|
|
/* 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
|
|
|
|
|
#define SC_ERROR_BUFFER_TOO_SMALL -1303
|
|
|
|
|
#define SC_ERROR_INVALID_PIN_LENGTH -1304
|
|
|
|
|
|
|
|
|
|
/* Resulting from OpenSC internal operation */
|
|
|
|
|
#define SC_ERROR_INTERNAL -1400
|
|
|
|
|
#define SC_ERROR_INVALID_ASN1_OBJECT -1401
|
|
|
|
|
#define SC_ERROR_ASN1_OBJECT_NOT_FOUND -1402
|
|
|
|
|
#define SC_ERROR_ASN1_END_OF_CONTENTS -1403
|
|
|
|
|
#define SC_ERROR_OUT_OF_MEMORY -1404
|
|
|
|
|
#define SC_ERROR_TOO_MANY_OBJECTS -1405
|
|
|
|
|
#define SC_ERROR_OBJECT_NOT_VALID -1406
|
|
|
|
|
#define SC_ERROR_OBJECT_NOT_FOUND -1407
|
|
|
|
|
#define SC_ERROR_NOT_SUPPORTED -1408
|
|
|
|
|
|
|
|
|
|
/* Relating to PKCS #15 init stuff */
|
|
|
|
|
#define SC_ERROR_PKCS15INIT -1500
|
|
|
|
|
#define SC_ERROR_SYNTAX_ERROR -1501
|
|
|
|
|
#define SC_ERROR_INCONSISTENT_PROFILE -1502
|
|
|
|
|
|
|
|
|
|
/* Errors that do not fit the categories above */
|
|
|
|
|
#define SC_ERROR_UNKNOWN -1900
|
|
|
|
|
#define SC_ERROR_PKCS15_APP_NOT_FOUND -1901
|
2002-04-05 15:06:33 +00:00
|
|
|
|
|
|
|
|
|
#endif
|