A library for setting up Secure Socket Layer (SSL) connections and verifying remote hosts using certificates. Contains only the source files for mbed platform implementation of the library.
Dependents: HTTPClient-SSL HTTPClient-SSL HTTPClient-SSL HTTPClient-SSL
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 = -301, /* process input state error */ 00034 PREFIX_ERROR = -302, /* bad index to key rounds */ 00035 MEMORY_ERROR = -303, /* out of memory */ 00036 VERIFY_FINISHED_ERROR = -304, /* verify problem on finished */ 00037 VERIFY_MAC_ERROR = -305, /* verify mac problem */ 00038 PARSE_ERROR = -306, /* parse error on header */ 00039 UNKNOWN_HANDSHAKE_TYPE = -307, /* weird handshake type */ 00040 SOCKET_ERROR_E = -308, /* error state on socket */ 00041 SOCKET_NODATA = -309, /* expected data, not there */ 00042 INCOMPLETE_DATA = -310, /* don't have enough data to 00043 complete task */ 00044 UNKNOWN_RECORD_TYPE = -311, /* unknown type in record hdr */ 00045 DECRYPT_ERROR = -312, /* error during decryption */ 00046 FATAL_ERROR = -313, /* recvd alert fatal error */ 00047 ENCRYPT_ERROR = -314, /* error during encryption */ 00048 FREAD_ERROR = -315, /* fread problem */ 00049 NO_PEER_KEY = -316, /* need peer's key */ 00050 NO_PRIVATE_KEY = -317, /* need the private key */ 00051 RSA_PRIVATE_ERROR = -318, /* error during rsa priv op */ 00052 NO_DH_PARAMS = -319, /* server missing DH params */ 00053 BUILD_MSG_ERROR = -320, /* build message failure */ 00054 00055 BAD_HELLO = -321, /* client hello malformed */ 00056 DOMAIN_NAME_MISMATCH = -322, /* peer subject name mismatch */ 00057 WANT_READ = -323, /* want read, call again */ 00058 NOT_READY_ERROR = -324, /* handshake layer not ready */ 00059 PMS_VERSION_ERROR = -325, /* pre m secret version error */ 00060 VERSION_ERROR = -326, /* record layer version error */ 00061 WANT_WRITE = -327, /* want write, call again */ 00062 BUFFER_ERROR = -328, /* malformed buffer input */ 00063 VERIFY_CERT_ERROR = -329, /* verify cert error */ 00064 VERIFY_SIGN_ERROR = -330, /* verify sign error */ 00065 CLIENT_ID_ERROR = -331, /* psk client identity error */ 00066 SERVER_HINT_ERROR = -332, /* psk server hint error */ 00067 PSK_KEY_ERROR = -333, /* psk key error */ 00068 ZLIB_INIT_ERROR = -334, /* zlib init error */ 00069 ZLIB_COMPRESS_ERROR = -335, /* zlib compression error */ 00070 ZLIB_DECOMPRESS_ERROR = -336, /* zlib decompression error */ 00071 00072 GETTIME_ERROR = -337, /* gettimeofday failed ??? */ 00073 GETITIMER_ERROR = -338, /* getitimer failed ??? */ 00074 SIGACT_ERROR = -339, /* sigaction failed ??? */ 00075 SETITIMER_ERROR = -340, /* setitimer failed ??? */ 00076 LENGTH_ERROR = -341, /* record layer length error */ 00077 PEER_KEY_ERROR = -342, /* can't decode peer key */ 00078 ZERO_RETURN = -343, /* peer sent close notify */ 00079 SIDE_ERROR = -344, /* wrong client/server type */ 00080 NO_PEER_CERT = -345, /* peer didn't send key */ 00081 NTRU_KEY_ERROR = -346, /* NTRU key error */ 00082 NTRU_DRBG_ERROR = -347, /* NTRU drbg error */ 00083 NTRU_ENCRYPT_ERROR = -348, /* NTRU encrypt error */ 00084 NTRU_DECRYPT_ERROR = -349, /* NTRU decrypt error */ 00085 ECC_CURVETYPE_ERROR = -350, /* Bad ECC Curve Type */ 00086 ECC_CURVE_ERROR = -351, /* Bad ECC Curve */ 00087 ECC_PEERKEY_ERROR = -352, /* Bad Peer ECC Key */ 00088 ECC_MAKEKEY_ERROR = -353, /* Bad Make ECC Key */ 00089 ECC_EXPORT_ERROR = -354, /* Bad ECC Export Key */ 00090 ECC_SHARED_ERROR = -355, /* Bad ECC Shared Secret */ 00091 NOT_CA_ERROR = -357, /* Not a CA cert error */ 00092 BAD_PATH_ERROR = -358, /* Bad path for opendir */ 00093 BAD_CERT_MANAGER_ERROR = -359, /* Bad Cert Manager */ 00094 OCSP_CERT_REVOKED = -360, /* OCSP Certificate revoked */ 00095 CRL_CERT_REVOKED = -361, /* CRL Certificate revoked */ 00096 CRL_MISSING = -362, /* CRL Not loaded */ 00097 MONITOR_RUNNING_E = -363, /* CRL Monitor already running */ 00098 THREAD_CREATE_E = -364, /* Thread Create Error */ 00099 OCSP_NEED_URL = -365, /* OCSP need an URL for lookup */ 00100 OCSP_CERT_UNKNOWN = -366, /* OCSP responder doesn't know */ 00101 OCSP_LOOKUP_FAIL = -367, /* OCSP lookup not successful */ 00102 MAX_CHAIN_ERROR = -368, /* max chain depth exceeded */ 00103 COOKIE_ERROR = -369, /* dtls cookie error */ 00104 SEQUENCE_ERROR = -370, /* dtls sequence error */ 00105 SUITES_ERROR = -371, /* suites pointer error */ 00106 SSL_NO_PEM_HEADER = -372, /* no PEM header found */ 00107 OUT_OF_ORDER_E = -373, /* out of order message */ 00108 BAD_KEA_TYPE_E = -374, /* bad KEA type found */ 00109 SANITY_CIPHER_E = -375, /* sanity check on cipher error */ 00110 RECV_OVERFLOW_E = -376, /* RXCB returned more than rqed */ 00111 GEN_COOKIE_E = -377, /* Generate Cookie Error */ 00112 NO_PEER_VERIFY = -378, /* Need peer cert verify Error */ 00113 FWRITE_ERROR = -379, /* fwrite problem */ 00114 CACHE_MATCH_ERROR = -380, /* chache hdr match error */ 00115 UNKNOWN_SNI_HOST_NAME_E = -381, /* Unrecognized host name Error */ 00116 UNKNOWN_MAX_FRAG_LEN_E = -382, /* Unrecognized max frag len Error */ 00117 KEYUSE_SIGNATURE_E = -383, /* KeyUse digSignature error */ 00118 KEYUSE_ENCIPHER_E = -385, /* KeyUse keyEncipher error */ 00119 EXTKEYUSE_AUTH_E = -386, /* ExtKeyUse server|client_auth */ 00120 SEND_OOB_READ_E = -387, /* Send Cb out of bounds read */ 00121 SECURE_RENEGOTIATION_E = -388, /* Invalid Renegotiation Info */ 00122 SESSION_TICKET_LEN_E = -389, /* Session Ticket too large */ 00123 SESSION_TICKET_EXPECT_E = -390, /* Session Ticket missing */ 00124 SCR_DIFFERENT_CERT_E = -391, /* SCR Different cert error */ 00125 SESSION_SECRET_CB_E = -392, /* Session secret Cb fcn failure */ 00126 NO_CHANGE_CIPHER_E = -393, /* Finished before change cipher */ 00127 SANITY_MSG_E = -394, /* Sanity check on msg order error */ 00128 DUPLICATE_MSG_E = -395, /* Duplicate message error */ 00129 00130 /* add strings to SetErrorString !!!!! */ 00131 00132 /* begin negotiation parameter errors */ 00133 UNSUPPORTED_SUITE = -500, /* unsupported cipher suite */ 00134 MATCH_SUITE_ERROR = -501 /* can't match cipher suite */ 00135 /* end negotiation parameter errors only 10 for now */ 00136 /* add strings to SetErrorString !!!!! */ 00137 00138 /* no error stings go down here, add above negotiation errors !!!! */ 00139 }; 00140 00141 00142 #ifdef CYASSL_CALLBACKS 00143 enum { 00144 MIN_PARAM_ERR = UNSUPPORTED_SUITE, 00145 MAX_PARAM_ERR = MIN_PARAM_ERR - 10 00146 }; 00147 #endif 00148 00149 00150 CYASSL_LOCAL 00151 void SetErrorString(int err, char* buff); 00152 00153 00154 #ifdef __cplusplus 00155 } /* extern "C" */ 00156 #endif 00157 00158 00159 #endif /* CyaSSL_ERROR_H */ 00160 00161
Generated on Wed Jul 13 2022 02:33:56 by
