This is a port of cyaSSL 2.7.0.

Dependents:   CyaSSL_DTLS_Cellular CyaSSL_DTLS_Ethernet

Committer:
ashleymills
Date:
Thu Sep 05 15:55:50 2013 +0000
Revision:
1:c0ce1562443a
Parent:
0:714293de3836
Nothing;

Who changed what in which revision?

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