CyaSSL is an SSL library for devices like mbed.
Dependents: cyassl-client Sync
cyassl_error.h
00001 /* cyassl_error.h 00002 * 00003 * Copyright (C) 2006-2009 Sawtooth Consulting Ltd. 00004 * 00005 * This file is part of CyaSSL. 00006 * 00007 * CyaSSL is free software; you can redistribute it and/or modify 00008 * it under the terms of the GNU General Public License as published by 00009 * the Free Software Foundation; either version 2 of the License, or 00010 * (at your option) any later version. 00011 * 00012 * CyaSSL is distributed in the hope that it will be useful, 00013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 * GNU General Public License for more details. 00016 * 00017 * You should have received a copy of the GNU General Public License 00018 * along with this program; if not, write to the Free Software 00019 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA 00020 */ 00021 00022 00023 00024 #ifndef CYASSL_ERROR_H 00025 #define CYASSL_ERROR_H 00026 00027 #include "error.h" /* CTaoCrypt errors */ 00028 00029 #ifdef __cplusplus 00030 extern "C" { 00031 #endif 00032 00033 enum CyaSSL_ErrorCodes { 00034 PREFIX_ERROR = -202, /* bad index to key rounds */ 00035 MEMORY_ERROR = -203, /* out of memory */ 00036 VERIFY_FINISHED_ERROR = -204, /* verify problem on finished */ 00037 VERIFY_MAC_ERROR = -205, /* verify mac problem */ 00038 PARSE_ERROR = -206, /* parse error on header */ 00039 UNKNOWN_HANDSHAKE_TYPE = -207, /* weird handshake type */ 00040 SOCKET_ERROR_E = -208, /* error state on socket */ 00041 SOCKET_NODATA = -209, /* expected data, not there */ 00042 INCOMPLETE_DATA = -210, /* don't have enough data to 00043 complete task */ 00044 UNKNOWN_RECORD_TYPE = -211, /* unknown type in record hdr */ 00045 DECRYPT_ERROR = -212, /* error during decryption */ 00046 FATAL_ERROR = -213, /* revcd alert fatal error */ 00047 ENCRYPT_ERROR = -214, /* error during encryption */ 00048 FREAD_ERROR = -215, /* fread problem */ 00049 NO_PEER_KEY = -216, /* need peer's key */ 00050 NO_PRIVATE_KEY = -217, /* need the private key */ 00051 RSA_PRIVATE_ERROR = -218, /* error during rsa priv op */ 00052 BUILD_MSG_ERROR = -220, /* build message failure */ 00053 00054 BAD_HELLO = -221, /* client hello malformed */ 00055 DOMAIN_NAME_MISMATCH = -222, /* peer subject name mismatch */ 00056 WANT_READ = -223, /* want read, call again */ 00057 NOT_READY_ERROR = -224, /* handshake layer not ready */ 00058 PMS_VERSION_ERROR = -225, /* pre m secret version error */ 00059 VERSION_ERROR = -226, /* record layer version error */ 00060 WANT_WRITE = -227, /* want write, call again */ 00061 BUFFER_ERROR = -228, /* malformed buffer input */ 00062 VERIFY_CERT_ERROR = -229, /* verify cert error */ 00063 VERIFY_SIGN_ERROR = -230, /* verify sign error */ 00064 CLIENT_ID_ERROR = -231, /* psk client identity error */ 00065 SERVER_HINT_ERROR = -232, /* psk server hint error */ 00066 PSK_KEY_ERROR = -233, /* psk key error */ 00067 ZLIB_INIT_ERROR = -234, /* zlib init error */ 00068 ZLIB_COMPRESS_ERROR = -235, /* zlib compression error */ 00069 ZLIB_DECOMPRESS_ERROR = -236, /* zlib decompression error */ 00070 00071 GETTIME_ERROR = -237, /* gettimeofday failed ??? */ 00072 GETITIMER_ERROR = -238, /* getitimer failed ??? */ 00073 SIGACT_ERROR = -239, /* sigaction failed ??? */ 00074 SETITIMER_ERROR = -240, /* setitimer failed ??? */ 00075 LENGTH_ERROR = -241, /* record layer length error */ 00076 PEER_KEY_ERROR = -242, /* cant decode peer key */ 00077 ZERO_RETURN = -243, /* peer sent close notify */ 00078 SIDE_ERROR = -244, /* wrong client/server type */ 00079 NO_PEER_CERT = -245, /* peer didn't send key */ 00080 NTRU_KEY_ERROR = -246, /* NTRU key error */ 00081 NTRU_DRBG_ERROR = -247, /* NTRU drbg error */ 00082 NTRU_ENCRYPT_ERROR = -248, /* NTRU encrypt error */ 00083 NTRU_DECRYPT_ERROR = -249, /* NTRU decrypt error */ 00084 /* add strings to SetErrorString !!!!! */ 00085 00086 /* begin negotiation parameter errors */ 00087 UNSUPPORTED_SUITE = -260, /* unsupported cipher suite */ 00088 MATCH_SUITE_ERROR = -261 /* can't match cipher suite */ 00089 /* end negotiation parameter errors only 10 for now */ 00090 /* add strings to SetErrorString !!!!! */ 00091 }; 00092 00093 00094 #ifdef CYASSL_CALLBACKS 00095 enum { 00096 MIN_PARAM_ERR = UNSUPPORTED_SUITE, 00097 MAX_PARAM_ERR = MIN_PARAM_ERR - 10 00098 }; 00099 #endif 00100 00101 00102 void SetErrorString(int error, char* buffer); 00103 00104 00105 #ifdef __cplusplus 00106 } /* extern "C" */ 00107 #endif 00108 00109 00110 #endif /* CyaSSL_ERROR_H */ 00111
Generated on Tue Jul 12 2022 18:43:19 by 1.7.2