eID middleware |

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

# eidErrors.h

Go to the documentation of this file.

    00001 /* ****************************************************************************
    00002 * eID Middleware Project.
    00003 * Copyright (C) 2008-2009 FedICT.
    00004 *
    00005 * This is free software; you can redistribute it and/or modify it
    00006 * under the terms of the GNU Lesser General Public License version
    00007 * 3.0 as published by the Free Software Foundation.
    00008 *
    00009 * This software is distributed in the hope that it will be useful,
    00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of
    00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
    00012 * Lesser General Public License for more details.
    00013 *
    00014 * You should have received a copy of the GNU Lesser General Public
    00015 * License along with this software; if not, see
    00016 * http://www.gnu.org/licenses/.
    00017 **************************************************************************** */
    00018
    00019 #pragma once
    00020
    00021 #define EIDMW_OK                   0
    00022
    00023 // Results of calling the function with incorrect parameters */
    00024
    00025 /** A function parameter has an unexpected value (general) */
    00026 #define EIDMW_ERR_PARAM_BAD            0xe1d00100
    00027
    00028 /** A function parameter exceeded the allowed range */
    00029 #define EIDMW_ERR_PARAM_RANGE          0xe1d00101
    00030
    00031 /** Bad file path (invalid characters, length no multiple of 4) */
    00032 #define EIDMW_ERR_BAD_PATH             0xe1d00102
    00033
    00034 /** Unknown/unsupported algorithm */
    00035 #define EIDMW_ERR_ALGO_BAD             0xe1d00103
    00036
    00037 /** Invalid/unsupported PIN operation */
    00038 #define EIDMW_ERR_PIN_OPERATION        0xe1d00104
    00039
    00040 /** PIN not allowed for this card (invalid characters, too short/long) */
    00041 #define EIDMW_ERR_PIN_FORMAT           0xe1d00105
    00042
    00043 /** Bad usage of a class or function */
    00044 #define EIDMW_ERR_BAD_USAGE            0xe1d00106
    00045
    00046
    00047 // Card errors
    00048
    00049 /** Generic card error */
    00050 #define EIDMW_ERR_CARD                 0xe1d00200
    00051
    00052 /** Not Authenticated (no PIN specified) */
    00053 #define EIDMW_ERR_NOT_AUTHENTICATED    0xe1d00201
    00054
    00055 /** This command is not supported by this card */
    00056 #define EIDMW_ERR_NOT_SUPPORTED        0xe1d00202
    00057
    00058 /** Bad PIN */
    00059 #define EIDMW_ERR_PIN_BAD              0xe1d00203
    00060
    00061 /** PIN blocked */
    00062 #define EIDMW_ERR_PIN_BLOCKED          0xe1d00204
    00063
    00064 /** No card present or card has been removed */
    00065 #define EIDMW_ERR_NO_CARD              0xe1d00205
    00066
    00067 /** Bad parameter P1 or P2 */
    00068 #define EIDMW_ERR_BAD_P1P2             0xe1d00206
    00069
    00070 /** Command not allowed */
    00071 #define EIDMW_ERR_CMD_NOT_ALLOWED      0xe1d00207
    00072
    00073 /** File not found */
    00074 #define EIDMW_ERR_FILE_NOT_FOUND       0xe1d00208
    00075
    00076 /** Unable to read applet version from the card */
    00077 #define EIDMW_ERR_APPLET_VERSION_NOT_FOUND 0xe1d00209
    00078
    00079 /** Card not activated */
    00080 #define EIDMW_ERR_NOT_ACTIVATED        0xe1d0020A
    00081
    00082
    00083 // Reader errors
    00084
    00085 /** Error communicating with the card */
    00086 #define EIDMW_ERR_CARD_COMM            0xe1d00300
    00087
    00088 /** No reader has been found */
    00089 #define EIDMW_ERR_NO_READER            0xe1d00301
    00090
    00091 /** The pinpad reader returned an error */
    00092 #define EIDMW_ERR_PINPAD               0xe1d00302
    00093
    00094 /** A card is present but we can't connect.
    00095  * E.g. no card present, or a synchronous (e.g. SIS card) is
    00096  * inserted in the reader, but no 'reader specific card plugin'
    00097  * is available for that reader */
    00098 #define EIDMW_ERR_CANT_CONNECT         0xe1d00303
    00099
    00100 /** The card has been reset (e.g. by another application) */
    00101 #define EIDMW_ERR_CARD_RESET           0xe1d00304
    00102
    00103 /** The card can't be accessed because of other connections */
    00104 #define EIDMW_ERR_CARD_SHARING         0xe1d00305
    00105
    00106 /** Can't end a transaction that wasn't started (also returned
    00107  *  on Mac OS X when multiple apps are access the card simultaneously) */
    00108 #define EIDMW_ERR_NOT_TRANSACTED       0xe1d00306
    00109
    00110 // Internal errors (caused by the middleware)
    00111
    00112 /** An internal limit has been reached */
    00113 #define EIDMW_ERR_LIMIT                0xe1d00400
    00114
    00115 /** An internal check failed */
    00116 #define EIDMW_ERR_CHECK                0xe1d00401
    00117
    00118 /** The PCSC library could not be located */
    00119 #define EIDMW_ERR_PCSC_LIB            0xe1d00402
    00120
    00121 /** An attempt to resolve a Z-lib address failed */
    00122 #define EIDMW_ERR_ZLIB_RESOLVE         0xe1d00403
    00123
    00124 /** And unknown error occurred */
    00125 #define EIDMW_ERR_UNKNOWN              0xe1d00404
    00126
    00127 /** The pinpad reader received a wrong/unknown value */
    00128 #define EIDMW_PINPAD_ERR               0xe1d00405
    00129
    00130 /** Dynamic library couldn't be loaded (found found at the specified location) */
    00131 #define EIDMW_CANT_LOAD_LIB            0xe1d00406
    00132
    00133 /** Memory error */
    00134 #define EIDMW_ERR_MEMORY               0xe1d00407
    00135
    00136 /** Couldn't delete cache file(s) */
    00137 #define EIDMW_ERR_DELETE_CACHE         0xe1d00408
    00138
    00139 /** Error getting or writing config data */
    00140 #define EIDMW_CONF                     0xe1d00409
    00141
    00142 /** The cached files have been tampered with */
    00143 #define EIDMW_CACHE_TAMPERED           0xe1d0040A
    00144
    00145
    00146 // Socket related errors
    00147
    00148 /** Creation of a socket failed */
    00149 #define EIDMW_ERR_SOCKET_CREATE            0xe1d00500
    00150
    00151 /** Socket 'send()' failed */
    00152 #define EIDMW_ERR_SOCKET_SEND              0xe1d00501
    00153
    00154 /** Socket 'recv()' failed */
    00155 #define EIDMW_ERR_SOCKET_RECV              0xe1d00502
    00156
    00157 /** Call to 'gethostbyname()' in SocketClient failed */
    00158 #define EIDMW_ERR_SOCKET_GETHOST           0xe1d00503
    00159
    00160 /** Call to 'connect()' in SocketClient failed */
    00161 #define EIDMW_ERR_SOCKET_CONNECT           0xe1d00504
    00162
    00163 /** Invalid in SocketServer, call to 'socket()' failed */
    00164 #define EIDMW_ERR_SOCKET_SOCKET            0xe1d00510
    00165
    00166 /** Call to 'bind()' in SocketServer failed */
    00167 #define EIDMW_ERR_SOCKET_BIND              0xe1d00511
    00168
    00169 /** Call to 'Accept()' in SocketServer failed */
    00170 #define EIDMW_ERR_SOCKET_ACCEPT            0xe1d00512
    00171
    00172
    00173 // User errors/events
    00174
    00175 /** User pressed Cancel in PIN dialog */
    00176 #define EIDMW_ERR_PIN_CANCEL           0xe1d00600
    00177
    00178 /** Pinpad timeout */
    00179 #define EIDMW_ERR_TIMEOUT              0xe1d00601
    00180
    00181 /** The new PINs that were entered differ */
    00182 #define EIDMW_NEW_PINS_DIFFER          0xe1d00602
    00183
    00184 /** A PIN with invalid length or format was entered */
    00185 #define EIDMW_WRONG_PIN_FORMAT            0xe1d00603
    00186
    00187
    00188 // Parser errors
    00189
    00190 /** Could not find expected elements in parsed ASN.1 vector */
    00191 #define EIDMW_WRONG_ASN1_FORMAT        0xe1d00700
    00192
    00193
    00194 // I/O errors
    00195 // errors modelled on the definitions in errno.h
    00196
    00197 /** File could not be opened */
    00198 #define EIDMW_FILE_NOT_OPENED          0xe1d00800
    00199
    00200 /** Search permission is denied for a component of the path prefix of path. */
    00201 #define EIDMW_PERMISSION_DENIED        0xe1d00801
    00202
    00203 /** A loop exists in symbolic links encountered during resolution of the path argument. */
    00204 /** A component of path does not name an existing file or path is an empty string.*/
    00205 /** A component of the path prefix is not a directory. */
    00206 /** The length of the path argument exceeds {PATH_MAX} or a pathname component is longer than {NAME_MAX}. */
    00207 #define EIDMW_INVALID_PATH             0xe1d00802
    00208
    00209 /** {OPEN_MAX} file descriptors are currently open in the calling process. */
    00210 /** Too many files are currently open in the system.*/
    00211 #define EIDMW_TOO_MANY_OPENED_FILES    0xe1d00803
    00212
    00213 /** The argument of closedir or readdir does not refer to an open directory stream. */
    00214 #define EIDMW_DIR_NOT_OPENED           0xe1d00804
    00215
    00216 /** Interrupted by a signal */
    00217 #define EIDMW_INTERRUPTION             0xe1d00805
    00218
    00219 /** One of the values in the structure to be returned cannot be represented correctly. */
    00220 #define EIDMW_OVERFLOW                 0xe1d00806
    00221
    00222 /** An I/O error occurred while reading from the file system.*/
    00223 #define EIDMW_ERROR_IO                 0xe1d00807
    00224
    00225 /** Call of the Logger after destruct time */
    00226 #define EIDMW_ERR_LOGGER_APPLEAVING             0xe1d00900
    00227
    00228
    00229 // SDK error
    00230 /** The document type is unknown for this card */
    00231 #define EIDMW_ERR_DOCTYPE_UNKNOWN               0xe1d00b00
    00232
    00233 /** The card type asked doesn't correspond with the real card type */
    00234 #define EIDMW_ERR_CARDTYPE_BAD                  0xe1d00b01
    00235
    00236 /** This card type is unknown */
    00237 #define EIDMW_ERR_CARDTYPE_UNKNOWN              0xe1d00b02
    00238
    00239 /** This Certificate has no issuer (=root) */
    00240 #define EIDMW_ERR_CERT_NOISSUER                 0xe1d00b03
    00241
    00242 /** No release of SDK object has been done before closing the application */
    00243 #define EIDMW_ERR_RELEASE_NEEDED                0xe1d00b04
    00244
    00245 /** Bad transaction commande (Unlock without Lock OR Lock without Unlock) */
    00246 #define EIDMW_ERR_BAD_TRANSACTION               0xe1d00b05
    00247
    00248 /** The file type is unknown for this card */
    00249 #define EIDMW_ERR_FILETYPE_UNKNOWN              0xe1d00b06
    00250
    00251 /** The card has been changed */
    00252 #define EIDMW_ERR_CARD_CHANGED                  0xe1d00b07
    00253
    00254 /** The reader set has been changed */
    00255 #define EIDMW_ERR_READERSET_CHANGED             0xe1d00b08
    00256
    00257 /** User did not allow to read the card */
    00258 #define EIDMW_ERR_NOT_ALLOW_BY_USER             0xe1d00b09
    00259
    00260 /** This Certificate has no CDP */
    00261 #define EIDMW_ERR_CERT_NOCRL                    0xe1d00b0A
    00262
    00263 /** This Certificate has no OCSP responder */
    00264 #define EIDMW_ERR_CERT_NOOCSP                   0xe1d00b0B
    00265
    00266 /** No root is found for the store or certificate */
    00267 #define EIDMW_ERR_CERT_NOROOT                   0xe1d00b0C
    00268
    00269 /** User did not yet allow or disallow to read the card */
    00270 #define EIDMW_ERR_USER_MUST_ANSWER              0xe1d00b0D
    00271
    00272
    00273 // Errors in system calls
    00274
    00275 /** a system call returned an error */
    00276 #define EIDMW_ERR_SYSTEM                      0xe1d00c01
    00277
    00278 /** a signal function returned an error */
    00279 #define EIDMW_ERR_SIGNAL                     0xe1d00c02