Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of CyaSSL by
error-ssl.h
00001 /* error-ssl.h 00002 * 00003 * Copyright (C) 2006-2014 wolfSSL Inc. 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA 00020 */ 00021 00022 00023 #ifndef CYASSL_ERROR_H 00024 #define CYASSL_ERROR_H 00025 00026 #include <cyassl/ctaocrypt/error-crypt.h> /* pull in CTaoCrypt errors */ 00027 00028 #ifdef __cplusplus 00029 extern "C" { 00030 #endif 00031 00032 enum CyaSSL_ErrorCodes { 00033 INPUT_CASE_ERROR = -201, /* process input state error */ 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, /* recvd 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 NO_DH_PARAMS = -219, /* server missing DH params */ 00053 BUILD_MSG_ERROR = -220, /* build message failure */ 00054 00055 BAD_HELLO = -221, /* client hello malformed */ 00056 DOMAIN_NAME_MISMATCH = -222, /* peer subject name mismatch */ 00057 WANT_READ = -223, /* want read, call again */ 00058 NOT_READY_ERROR = -224, /* handshake layer not ready */ 00059 PMS_VERSION_ERROR = -225, /* pre m secret version error */ 00060 VERSION_ERROR = -226, /* record layer version error */ 00061 WANT_WRITE = -227, /* want write, call again */ 00062 BUFFER_ERROR = -228, /* malformed buffer input */ 00063 VERIFY_CERT_ERROR = -229, /* verify cert error */ 00064 VERIFY_SIGN_ERROR = -230, /* verify sign error */ 00065 CLIENT_ID_ERROR = -231, /* psk client identity error */ 00066 SERVER_HINT_ERROR = -232, /* psk server hint error */ 00067 PSK_KEY_ERROR = -233, /* psk key error */ 00068 ZLIB_INIT_ERROR = -234, /* zlib init error */ 00069 ZLIB_COMPRESS_ERROR = -235, /* zlib compression error */ 00070 ZLIB_DECOMPRESS_ERROR = -236, /* zlib decompression error */ 00071 00072 GETTIME_ERROR = -237, /* gettimeofday failed ??? */ 00073 GETITIMER_ERROR = -238, /* getitimer failed ??? */ 00074 SIGACT_ERROR = -239, /* sigaction failed ??? */ 00075 SETITIMER_ERROR = -240, /* setitimer failed ??? */ 00076 LENGTH_ERROR = -241, /* record layer length error */ 00077 PEER_KEY_ERROR = -242, /* can't decode peer key */ 00078 ZERO_RETURN = -243, /* peer sent close notify */ 00079 SIDE_ERROR = -244, /* wrong client/server type */ 00080 NO_PEER_CERT = -245, /* peer didn't send key */ 00081 NTRU_KEY_ERROR = -246, /* NTRU key error */ 00082 NTRU_DRBG_ERROR = -247, /* NTRU drbg error */ 00083 NTRU_ENCRYPT_ERROR = -248, /* NTRU encrypt error */ 00084 NTRU_DECRYPT_ERROR = -249, /* NTRU decrypt error */ 00085 ECC_CURVETYPE_ERROR = -250, /* Bad ECC Curve Type */ 00086 ECC_CURVE_ERROR = -251, /* Bad ECC Curve */ 00087 ECC_PEERKEY_ERROR = -252, /* Bad Peer ECC Key */ 00088 ECC_MAKEKEY_ERROR = -253, /* Bad Make ECC Key */ 00089 ECC_EXPORT_ERROR = -254, /* Bad ECC Export Key */ 00090 ECC_SHARED_ERROR = -255, /* Bad ECC Shared Secret */ 00091 NOT_CA_ERROR = -257, /* Not a CA cert error */ 00092 BAD_PATH_ERROR = -258, /* Bad path for opendir */ 00093 BAD_CERT_MANAGER_ERROR = -259, /* Bad Cert Manager */ 00094 OCSP_CERT_REVOKED = -260, /* OCSP Certificate revoked */ 00095 CRL_CERT_REVOKED = -261, /* CRL Certificate revoked */ 00096 CRL_MISSING = -262, /* CRL Not loaded */ 00097 MONITOR_RUNNING_E = -263, /* CRL Monitor already running */ 00098 THREAD_CREATE_E = -264, /* Thread Create Error */ 00099 OCSP_NEED_URL = -265, /* OCSP need an URL for lookup */ 00100 OCSP_CERT_UNKNOWN = -266, /* OCSP responder doesn't know */ 00101 OCSP_LOOKUP_FAIL = -267, /* OCSP lookup not successful */ 00102 MAX_CHAIN_ERROR = -268, /* max chain depth exceeded */ 00103 COOKIE_ERROR = -269, /* dtls cookie error */ 00104 SEQUENCE_ERROR = -270, /* dtls sequence error */ 00105 SUITES_ERROR = -271, /* suites pointer error */ 00106 SSL_NO_PEM_HEADER = -272, /* no PEM header found */ 00107 OUT_OF_ORDER_E = -273, /* out of order message */ 00108 BAD_KEA_TYPE_E = -274, /* bad KEA type found */ 00109 SANITY_CIPHER_E = -275, /* sanity check on cipher error */ 00110 RECV_OVERFLOW_E = -276, /* RXCB returned more than rqed */ 00111 GEN_COOKIE_E = -277, /* Generate Cookie Error */ 00112 NO_PEER_VERIFY = -278, /* Need peer cert verify Error */ 00113 FWRITE_ERROR = -279, /* fwrite problem */ 00114 CACHE_MATCH_ERROR = -280, /* chache hdr match error */ 00115 UNKNOWN_SNI_HOST_NAME_E = -281, /* Unrecognized host name Error */ 00116 UNKNOWN_MAX_FRAG_LEN_E = -282, /* Unrecognized max frag len Error */ 00117 /* add strings to SetErrorString !!!!! */ 00118 KEYUSE_SIGNATURE_E = -283, /* KeyUse digSignature error */ 00119 KEYUSE_ENCIPHER_E = -285, /* KeyUse keyEncipher error */ 00120 EXTKEYUSE_AUTH_E = -286, /* ExtKeyUse server|client_auth */ 00121 00122 /* begin negotiation parameter errors */ 00123 UNSUPPORTED_SUITE = -290, /* unsupported cipher suite */ 00124 MATCH_SUITE_ERROR = -291 /* can't match cipher suite */ 00125 /* end negotiation parameter errors only 10 for now */ 00126 /* add strings to SetErrorString !!!!! */ 00127 }; 00128 00129 00130 #ifdef CYASSL_CALLBACKS 00131 enum { 00132 MIN_PARAM_ERR = UNSUPPORTED_SUITE, 00133 MAX_PARAM_ERR = MIN_PARAM_ERR - 10 00134 }; 00135 #endif 00136 00137 00138 CYASSL_LOCAL 00139 void SetErrorString(int err, char* buff); 00140 00141 00142 #ifdef __cplusplus 00143 } /* extern "C" */ 00144 #endif 00145 00146 00147 #endif /* CyaSSL_ERROR_H */ 00148 00149 00150
Generated on Tue Jul 12 2022 21:40:04 by
1.7.2
