1 /* errors.h - erro code 2 * Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc. 3 * 4 * This file is part of GNUPG. 5 * 6 * GNUPG is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; either version 3 of the License, or 9 * (at your option) any later version. 10 * 11 * GNUPG is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * GNU General Public License for more details. 15 * 16 * You should have received a copy of the GNU General Public License 17 * along with this program; if not, see <http://www.gnu.org/licenses/>. 18 */ 19 #ifndef G10_ERRORS_H 20 #define G10_ERRORS_H 21 22 #define G10ERR_GENERAL 1 23 #define G10ERR_UNKNOWN_PACKET 2 24 #define G10ERR_UNKNOWN_VERSION 3 /* Unknown version (in packet) */ 25 #define G10ERR_PUBKEY_ALGO 4 /* Unknown pubkey algorithm */ 26 #define G10ERR_DIGEST_ALGO 5 /* Unknown digest algorithm */ 27 #define G10ERR_BAD_PUBKEY 6 /* Bad public key */ 28 #define G10ERR_BAD_SECKEY 7 /* Bad secret key */ 29 #define G10ERR_BAD_SIGN 8 /* Bad signature */ 30 #define G10ERR_NO_PUBKEY 9 /* public key not found */ 31 #define G10ERR_CHECKSUM 10 /* checksum error */ 32 #define G10ERR_BAD_PASS 11 /* Bad passphrase */ 33 #define G10ERR_CIPHER_ALGO 12 /* Unknown cipher algorithm */ 34 #define G10ERR_KEYRING_OPEN 13 35 #define G10ERR_INVALID_PACKET 14 36 #define G10ERR_INVALID_ARMOR 15 37 #define G10ERR_NO_USER_ID 16 38 #define G10ERR_NO_SECKEY 17 /* secret key not available */ 39 #define G10ERR_WRONG_SECKEY 18 /* wrong seckey used */ 40 #define G10ERR_UNSUPPORTED 19 41 #define G10ERR_BAD_KEY 20 /* bad (session) key */ 42 #define G10ERR_READ_FILE 21 43 #define G10ERR_WRITE_FILE 22 44 #define G10ERR_COMPR_ALGO 23 /* Unknown compress algorithm */ 45 #define G10ERR_OPEN_FILE 24 46 #define G10ERR_CREATE_FILE 25 47 #define G10ERR_PASSPHRASE 26 /* invalid passphrase */ 48 #define G10ERR_NI_PUBKEY 27 49 #define G10ERR_NI_CIPHER 28 50 #define G10ERR_SIG_CLASS 29 51 #define G10ERR_BAD_MPI 30 52 #define G10ERR_RESOURCE_LIMIT 31 53 #define G10ERR_INV_KEYRING 32 54 #define G10ERR_TRUSTDB 33 /* a problem with the trustdb */ 55 #define G10ERR_BAD_CERT 34 /* bad certicate */ 56 #define G10ERR_INV_USER_ID 35 57 #define G10ERR_CLOSE_FILE 36 58 #define G10ERR_RENAME_FILE 37 59 #define G10ERR_DELETE_FILE 38 60 #define G10ERR_UNEXPECTED 39 61 #define G10ERR_TIME_CONFLICT 40 62 #define G10ERR_WR_PUBKEY_ALGO 41 /* unusabe pubkey algo */ 63 #define G10ERR_FILE_EXISTS 42 64 #define G10ERR_WEAK_KEY 43 /* NOTE: hardcoded into the cipher modules */ 65 #define G10ERR_WRONG_KEYLEN 44 /* NOTE: hardcoded into the cipher modules */ 66 #define G10ERR_INV_ARG 45 67 #define G10ERR_BAD_URI 46 /* syntax error in URI */ 68 #define G10ERR_INVALID_URI 47 /* e.g. unsupported scheme */ 69 #define G10ERR_NETWORK 48 /* general network error */ 70 #define G10ERR_UNKNOWN_HOST 49 71 #define G10ERR_SELFTEST_FAILED 50 72 #define G10ERR_NOT_ENCRYPTED 51 73 #define G10ERR_NOT_PROCESSED 52 74 #define G10ERR_UNU_PUBKEY 53 75 #define G10ERR_UNU_SECKEY 54 76 #define G10ERR_KEYSERVER 55 77 #define G10ERR_CANCELED 56 78 #define G10ERR_NO_CARD 57 79 #define G10ERR_NO_DATA 58 80 81 #ifndef HAVE_STRERROR 82 char *strerror (int n); 83 #endif 84 85 #ifdef _WIN32 86 const char * w32_strerror (int w32_errno); 87 #endif 88 89 #endif /*G10_ERRORS_H*/ 90