CyaSSL 3.0.0
Dependents: HTTPClient-SSL HTTPClient HTTPClient-SSL http_access ... more
cyassl/ctaocrypt/error-crypt.h@3:64d4f7cb83d5, 2014-12-03 (annotated)
- Committer:
- wolfSSL
- Date:
- Wed Dec 03 05:24:18 2014 +0000
- Revision:
- 3:64d4f7cb83d5
- Parent:
- 0:1239e9b70ca2
added IGNORE_KEY_EXTENSIONS
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
wolfSSL | 0:1239e9b70ca2 | 1 | /* error-crypt.h |
wolfSSL | 0:1239e9b70ca2 | 2 | * |
wolfSSL | 0:1239e9b70ca2 | 3 | * Copyright (C) 2006-2014 wolfSSL Inc. |
wolfSSL | 0:1239e9b70ca2 | 4 | * |
wolfSSL | 0:1239e9b70ca2 | 5 | * This file is part of CyaSSL. |
wolfSSL | 0:1239e9b70ca2 | 6 | * |
wolfSSL | 0:1239e9b70ca2 | 7 | * CyaSSL is free software; you can redistribute it and/or modify |
wolfSSL | 0:1239e9b70ca2 | 8 | * it under the terms of the GNU General Public License as published by |
wolfSSL | 0:1239e9b70ca2 | 9 | * the Free Software Foundation; either version 2 of the License, or |
wolfSSL | 0:1239e9b70ca2 | 10 | * (at your option) any later version. |
wolfSSL | 0:1239e9b70ca2 | 11 | * |
wolfSSL | 0:1239e9b70ca2 | 12 | * CyaSSL is distributed in the hope that it will be useful, |
wolfSSL | 0:1239e9b70ca2 | 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
wolfSSL | 0:1239e9b70ca2 | 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
wolfSSL | 0:1239e9b70ca2 | 15 | * GNU General Public License for more details. |
wolfSSL | 0:1239e9b70ca2 | 16 | * |
wolfSSL | 0:1239e9b70ca2 | 17 | * You should have received a copy of the GNU General Public License |
wolfSSL | 0:1239e9b70ca2 | 18 | * along with this program; if not, write to the Free Software |
wolfSSL | 0:1239e9b70ca2 | 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA |
wolfSSL | 0:1239e9b70ca2 | 20 | */ |
wolfSSL | 0:1239e9b70ca2 | 21 | |
wolfSSL | 0:1239e9b70ca2 | 22 | |
wolfSSL | 0:1239e9b70ca2 | 23 | #ifndef CTAO_CRYPT_ERROR_H |
wolfSSL | 0:1239e9b70ca2 | 24 | #define CTAO_CRYPT_ERROR_H |
wolfSSL | 0:1239e9b70ca2 | 25 | |
wolfSSL | 0:1239e9b70ca2 | 26 | #include <cyassl/ctaocrypt/types.h> |
wolfSSL | 0:1239e9b70ca2 | 27 | |
wolfSSL | 0:1239e9b70ca2 | 28 | |
wolfSSL | 0:1239e9b70ca2 | 29 | #ifdef __cplusplus |
wolfSSL | 0:1239e9b70ca2 | 30 | extern "C" { |
wolfSSL | 0:1239e9b70ca2 | 31 | #endif |
wolfSSL | 0:1239e9b70ca2 | 32 | |
wolfSSL | 0:1239e9b70ca2 | 33 | |
wolfSSL | 0:1239e9b70ca2 | 34 | /* error codes */ |
wolfSSL | 0:1239e9b70ca2 | 35 | enum { |
wolfSSL | 0:1239e9b70ca2 | 36 | MAX_CODE_E = -100, /* errors -101 - -199 */ |
wolfSSL | 0:1239e9b70ca2 | 37 | OPEN_RAN_E = -101, /* opening random device error */ |
wolfSSL | 0:1239e9b70ca2 | 38 | READ_RAN_E = -102, /* reading random device error */ |
wolfSSL | 0:1239e9b70ca2 | 39 | WINCRYPT_E = -103, /* windows crypt init error */ |
wolfSSL | 0:1239e9b70ca2 | 40 | CRYPTGEN_E = -104, /* windows crypt generation error */ |
wolfSSL | 0:1239e9b70ca2 | 41 | RAN_BLOCK_E = -105, /* reading random device would block */ |
wolfSSL | 0:1239e9b70ca2 | 42 | BAD_MUTEX_E = -106, /* Bad mutex operation */ |
wolfSSL | 0:1239e9b70ca2 | 43 | |
wolfSSL | 0:1239e9b70ca2 | 44 | MP_INIT_E = -110, /* mp_init error state */ |
wolfSSL | 0:1239e9b70ca2 | 45 | MP_READ_E = -111, /* mp_read error state */ |
wolfSSL | 0:1239e9b70ca2 | 46 | MP_EXPTMOD_E = -112, /* mp_exptmod error state */ |
wolfSSL | 0:1239e9b70ca2 | 47 | MP_TO_E = -113, /* mp_to_xxx error state, can't convert */ |
wolfSSL | 0:1239e9b70ca2 | 48 | MP_SUB_E = -114, /* mp_sub error state, can't subtract */ |
wolfSSL | 0:1239e9b70ca2 | 49 | MP_ADD_E = -115, /* mp_add error state, can't add */ |
wolfSSL | 0:1239e9b70ca2 | 50 | MP_MUL_E = -116, /* mp_mul error state, can't multiply */ |
wolfSSL | 0:1239e9b70ca2 | 51 | MP_MULMOD_E = -117, /* mp_mulmod error state, can't multiply mod */ |
wolfSSL | 0:1239e9b70ca2 | 52 | MP_MOD_E = -118, /* mp_mod error state, can't mod */ |
wolfSSL | 0:1239e9b70ca2 | 53 | MP_INVMOD_E = -119, /* mp_invmod error state, can't inv mod */ |
wolfSSL | 0:1239e9b70ca2 | 54 | MP_CMP_E = -120, /* mp_cmp error state */ |
wolfSSL | 0:1239e9b70ca2 | 55 | MP_ZERO_E = -121, /* got a mp zero result, not expected */ |
wolfSSL | 0:1239e9b70ca2 | 56 | |
wolfSSL | 0:1239e9b70ca2 | 57 | MEMORY_E = -125, /* out of memory error */ |
wolfSSL | 0:1239e9b70ca2 | 58 | |
wolfSSL | 0:1239e9b70ca2 | 59 | RSA_WRONG_TYPE_E = -130, /* RSA wrong block type for RSA function */ |
wolfSSL | 0:1239e9b70ca2 | 60 | RSA_BUFFER_E = -131, /* RSA buffer error, output too small or |
wolfSSL | 0:1239e9b70ca2 | 61 | input too large */ |
wolfSSL | 0:1239e9b70ca2 | 62 | BUFFER_E = -132, /* output buffer too small or input too large */ |
wolfSSL | 0:1239e9b70ca2 | 63 | ALGO_ID_E = -133, /* setting algo id error */ |
wolfSSL | 0:1239e9b70ca2 | 64 | PUBLIC_KEY_E = -134, /* setting public key error */ |
wolfSSL | 0:1239e9b70ca2 | 65 | DATE_E = -135, /* setting date validity error */ |
wolfSSL | 0:1239e9b70ca2 | 66 | SUBJECT_E = -136, /* setting subject name error */ |
wolfSSL | 0:1239e9b70ca2 | 67 | ISSUER_E = -137, /* setting issuer name error */ |
wolfSSL | 0:1239e9b70ca2 | 68 | CA_TRUE_E = -138, /* setting CA basic constraint true error */ |
wolfSSL | 0:1239e9b70ca2 | 69 | EXTENSIONS_E = -139, /* setting extensions error */ |
wolfSSL | 0:1239e9b70ca2 | 70 | |
wolfSSL | 0:1239e9b70ca2 | 71 | ASN_PARSE_E = -140, /* ASN parsing error, invalid input */ |
wolfSSL | 0:1239e9b70ca2 | 72 | ASN_VERSION_E = -141, /* ASN version error, invalid number */ |
wolfSSL | 0:1239e9b70ca2 | 73 | ASN_GETINT_E = -142, /* ASN get big int error, invalid data */ |
wolfSSL | 0:1239e9b70ca2 | 74 | ASN_RSA_KEY_E = -143, /* ASN key init error, invalid input */ |
wolfSSL | 0:1239e9b70ca2 | 75 | ASN_OBJECT_ID_E = -144, /* ASN object id error, invalid id */ |
wolfSSL | 0:1239e9b70ca2 | 76 | ASN_TAG_NULL_E = -145, /* ASN tag error, not null */ |
wolfSSL | 0:1239e9b70ca2 | 77 | ASN_EXPECT_0_E = -146, /* ASN expect error, not zero */ |
wolfSSL | 0:1239e9b70ca2 | 78 | ASN_BITSTR_E = -147, /* ASN bit string error, wrong id */ |
wolfSSL | 0:1239e9b70ca2 | 79 | ASN_UNKNOWN_OID_E = -148, /* ASN oid error, unknown sum id */ |
wolfSSL | 0:1239e9b70ca2 | 80 | ASN_DATE_SZ_E = -149, /* ASN date error, bad size */ |
wolfSSL | 0:1239e9b70ca2 | 81 | ASN_BEFORE_DATE_E = -150, /* ASN date error, current date before */ |
wolfSSL | 0:1239e9b70ca2 | 82 | ASN_AFTER_DATE_E = -151, /* ASN date error, current date after */ |
wolfSSL | 0:1239e9b70ca2 | 83 | ASN_SIG_OID_E = -152, /* ASN signature error, mismatched oid */ |
wolfSSL | 0:1239e9b70ca2 | 84 | ASN_TIME_E = -153, /* ASN time error, unknown time type */ |
wolfSSL | 0:1239e9b70ca2 | 85 | ASN_INPUT_E = -154, /* ASN input error, not enough data */ |
wolfSSL | 0:1239e9b70ca2 | 86 | ASN_SIG_CONFIRM_E = -155, /* ASN sig error, confirm failure */ |
wolfSSL | 0:1239e9b70ca2 | 87 | ASN_SIG_HASH_E = -156, /* ASN sig error, unsupported hash type */ |
wolfSSL | 0:1239e9b70ca2 | 88 | ASN_SIG_KEY_E = -157, /* ASN sig error, unsupported key type */ |
wolfSSL | 0:1239e9b70ca2 | 89 | ASN_DH_KEY_E = -158, /* ASN key init error, invalid input */ |
wolfSSL | 0:1239e9b70ca2 | 90 | ASN_NTRU_KEY_E = -159, /* ASN ntru key decode error, invalid input */ |
wolfSSL | 0:1239e9b70ca2 | 91 | ASN_CRIT_EXT_E = -160, /* ASN unsupported critical extension */ |
wolfSSL | 0:1239e9b70ca2 | 92 | |
wolfSSL | 0:1239e9b70ca2 | 93 | ECC_BAD_ARG_E = -170, /* ECC input argument of wrong type */ |
wolfSSL | 0:1239e9b70ca2 | 94 | ASN_ECC_KEY_E = -171, /* ASN ECC bad input */ |
wolfSSL | 0:1239e9b70ca2 | 95 | ECC_CURVE_OID_E = -172, /* Unsupported ECC OID curve type */ |
wolfSSL | 0:1239e9b70ca2 | 96 | BAD_FUNC_ARG = -173, /* Bad function argument provided */ |
wolfSSL | 0:1239e9b70ca2 | 97 | NOT_COMPILED_IN = -174, /* Feature not compiled in */ |
wolfSSL | 0:1239e9b70ca2 | 98 | UNICODE_SIZE_E = -175, /* Unicode password too big */ |
wolfSSL | 0:1239e9b70ca2 | 99 | NO_PASSWORD = -176, /* no password provided by user */ |
wolfSSL | 0:1239e9b70ca2 | 100 | ALT_NAME_E = -177, /* alt name size problem, too big */ |
wolfSSL | 0:1239e9b70ca2 | 101 | |
wolfSSL | 0:1239e9b70ca2 | 102 | AES_GCM_AUTH_E = -180, /* AES-GCM Authentication check failure */ |
wolfSSL | 0:1239e9b70ca2 | 103 | AES_CCM_AUTH_E = -181, /* AES-CCM Authentication check failure */ |
wolfSSL | 0:1239e9b70ca2 | 104 | |
wolfSSL | 0:1239e9b70ca2 | 105 | CAVIUM_INIT_E = -182, /* Cavium Init type error */ |
wolfSSL | 0:1239e9b70ca2 | 106 | |
wolfSSL | 0:1239e9b70ca2 | 107 | COMPRESS_INIT_E = -183, /* Compress init error */ |
wolfSSL | 0:1239e9b70ca2 | 108 | COMPRESS_E = -184, /* Compress error */ |
wolfSSL | 0:1239e9b70ca2 | 109 | DECOMPRESS_INIT_E = -185, /* DeCompress init error */ |
wolfSSL | 0:1239e9b70ca2 | 110 | DECOMPRESS_E = -186, /* DeCompress error */ |
wolfSSL | 0:1239e9b70ca2 | 111 | |
wolfSSL | 0:1239e9b70ca2 | 112 | BAD_ALIGN_E = -187, /* Bad alignment for operation, no alloc */ |
wolfSSL | 0:1239e9b70ca2 | 113 | ASN_NO_SIGNER_E = -188, /* ASN no signer to confirm failure */ |
wolfSSL | 0:1239e9b70ca2 | 114 | ASN_CRL_CONFIRM_E = -189, /* ASN CRL signature confirm failure */ |
wolfSSL | 0:1239e9b70ca2 | 115 | ASN_CRL_NO_SIGNER_E = -190, /* ASN CRL no signer to confirm failure */ |
wolfSSL | 0:1239e9b70ca2 | 116 | ASN_OCSP_CONFIRM_E = -191, /* ASN OCSP signature confirm failure */ |
wolfSSL | 0:1239e9b70ca2 | 117 | |
wolfSSL | 0:1239e9b70ca2 | 118 | BAD_ENC_STATE_E = -192, /* Bad ecc enc state operation */ |
wolfSSL | 0:1239e9b70ca2 | 119 | BAD_PADDING_E = -193, /* Bad padding, msg not correct length */ |
wolfSSL | 0:1239e9b70ca2 | 120 | |
wolfSSL | 0:1239e9b70ca2 | 121 | REQ_ATTRIBUTE_E = -194, /* setting cert request attributes error */ |
wolfSSL | 0:1239e9b70ca2 | 122 | |
wolfSSL | 0:1239e9b70ca2 | 123 | PKCS7_OID_E = -195, /* PKCS#7, mismatched OID error */ |
wolfSSL | 0:1239e9b70ca2 | 124 | PKCS7_RECIP_E = -196, /* PKCS#7, recipient error */ |
wolfSSL | 0:1239e9b70ca2 | 125 | FIPS_NOT_ALLOWED_E = -197, /* FIPS not allowed error */ |
wolfSSL | 0:1239e9b70ca2 | 126 | ASN_NAME_INVALID_E = -198, /* ASN name constraint error */ |
wolfSSL | 0:1239e9b70ca2 | 127 | |
wolfSSL | 0:1239e9b70ca2 | 128 | MIN_CODE_E = -200 /* errors -101 - -199 */ |
wolfSSL | 0:1239e9b70ca2 | 129 | }; |
wolfSSL | 0:1239e9b70ca2 | 130 | |
wolfSSL | 0:1239e9b70ca2 | 131 | |
wolfSSL | 0:1239e9b70ca2 | 132 | CYASSL_API void CTaoCryptErrorString(int err, char* buff); |
wolfSSL | 0:1239e9b70ca2 | 133 | |
wolfSSL | 0:1239e9b70ca2 | 134 | |
wolfSSL | 0:1239e9b70ca2 | 135 | #ifdef __cplusplus |
wolfSSL | 0:1239e9b70ca2 | 136 | } /* extern "C" */ |
wolfSSL | 0:1239e9b70ca2 | 137 | #endif |
wolfSSL | 0:1239e9b70ca2 | 138 | |
wolfSSL | 0:1239e9b70ca2 | 139 | #endif /* CTAO_CRYPT_ERROR_H */ |
wolfSSL | 0:1239e9b70ca2 | 140 | |
wolfSSL | 0:1239e9b70ca2 | 141 | |
wolfSSL | 0:1239e9b70ca2 | 142 |