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