wolfSSL SSL/TLS library, support up to TLS1.3

Dependents:   CyaSSL-Twitter-OAuth4Tw Example-client-tls-cert TwitterReader TweetTest ... more

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers err.h Source File

err.h

00001 /* err.h
00002  *
00003  * Copyright (C) 2006-2020 wolfSSL Inc.
00004  *
00005  * This file is part of wolfSSL.
00006  *
00007  * wolfSSL 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  * wolfSSL 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-1335, USA
00020  */
00021 
00022 #ifndef WOLFSSL_OPENSSL_ERR_
00023 #define WOLFSSL_OPENSSL_ERR_
00024 
00025 #include <wolfssl/wolfcrypt/logging.h >
00026 
00027 /* err.h for openssl */
00028 #define ERR_load_crypto_strings          wolfSSL_ERR_load_crypto_strings
00029 #define ERR_load_CRYPTO_strings          wolfSSL_ERR_load_crypto_strings
00030 #define ERR_peek_last_error              wolfSSL_ERR_peek_last_error
00031 
00032 /* fatal error */
00033 #define ERR_R_MALLOC_FAILURE                    MEMORY_E
00034 #define ERR_R_PASSED_NULL_PARAMETER             BAD_FUNC_ARG
00035 #define ERR_R_DISABLED                          NOT_COMPILED_IN
00036 #define ERR_R_PASSED_INVALID_ARGUMENT           BAD_FUNC_ARG
00037 #define RSA_R_UNKNOWN_PADDING_TYPE              RSA_PAD_E
00038 #define EC_R_BUFFER_TOO_SMALL                   BUFFER_E
00039 
00040 /* SSL function codes */
00041 #define RSA_F_RSA_OSSL_PRIVATE_ENCRYPT          1
00042 #define SSL_F_SSL_CTX_USE_CERTIFICATE_FILE      2
00043 #define SSL_F_SSL_USE_PRIVATEKEY                3
00044 #define EC_F_EC_GFP_SIMPLE_POINT2OCT            4
00045 
00046 /* reasons */
00047 #define ERR_R_SYS_LIB                           1
00048 #define PKCS12_R_MAC_VERIFY_FAILURE             2
00049 
00050 #define RSAerr(f,r)  ERR_put_error(0,(f),(r),__FILE__,__LINE__)
00051 #define SSLerr(f,r)  ERR_put_error(0,(f),(r),__FILE__,__LINE__)
00052 #define ECerr(f,r)   ERR_put_error(0,(f),(r),__FILE__,__LINE__)
00053 
00054 #endif /* WOLFSSL_OPENSSL_ERR_ */
00055 
00056