wolfSSL SSL/TLS library, support up to TLS1.3
Dependents: CyaSSL-Twitter-OAuth4Tw Example-client-tls-cert TwitterReader TweetTest ... more
crypto.h
00001 /* crypto.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 /* crypto.h for openSSL */ 00023 00024 #ifndef WOLFSSL_CRYPTO_H_ 00025 #define WOLFSSL_CRYPTO_H_ 00026 00027 #include <wolfssl/openssl/opensslv.h> 00028 00029 #include <wolfssl/wolfcrypt/settings.h> 00030 00031 #ifdef WOLFSSL_PREFIX 00032 #include "prefix_crypto.h" 00033 #endif 00034 00035 00036 WOLFSSL_API const char* wolfSSLeay_version(int type); 00037 WOLFSSL_API unsigned long wolfSSLeay(void); 00038 WOLFSSL_API unsigned long wolfSSL_OpenSSL_version_num(void); 00039 00040 #ifdef OPENSSL_EXTRA 00041 WOLFSSL_API void wolfSSL_OPENSSL_free(void*); 00042 WOLFSSL_API void *wolfSSL_OPENSSL_malloc(size_t a); 00043 #endif 00044 00045 #define CRYPTO_THREADID void 00046 00047 #define SSLeay_version wolfSSLeay_version 00048 #define SSLeay wolfSSLeay 00049 #define OpenSSL_version_num wolfSSL_OpenSSL_version_num 00050 00051 #ifdef WOLFSSL_QT 00052 #define SSLEAY_VERSION 0x10001000L 00053 #else 00054 #define SSLEAY_VERSION 0x0090600fL 00055 #endif 00056 #define SSLEAY_VERSION_NUMBER SSLEAY_VERSION 00057 #define CRYPTO_lock wc_LockMutex_ex 00058 00059 /* this function was used to set the default malloc, free, and realloc */ 00060 #define CRYPTO_malloc_init() 0 /* CRYPTO_malloc_init is not needed */ 00061 00062 #define OPENSSL_free wolfSSL_OPENSSL_free 00063 #define OPENSSL_malloc wolfSSL_OPENSSL_malloc 00064 00065 #ifdef WOLFSSL_QT 00066 #define OPENSSL_INIT_ADD_ALL_CIPHERS 0x00000004L 00067 #define OPENSSL_INIT_ADD_ALL_DIGESTS 0x00000008L 00068 #define OPENSSL_INIT_LOAD_CONFIG 0x00000040L 00069 #endif 00070 00071 #if defined(OPENSSL_ALL) || defined(HAVE_STUNNEL) || defined(WOLFSSL_NGINX) || \ 00072 defined(WOLFSSL_HAPROXY) || defined(OPENSSL_EXTRA) 00073 #define CRYPTO_set_mem_ex_functions wolfSSL_CRYPTO_set_mem_ex_functions 00074 #define FIPS_mode wolfSSL_FIPS_mode 00075 #define FIPS_mode_set wolfSSL_FIPS_mode_set 00076 typedef struct CRYPTO_EX_DATA CRYPTO_EX_DATA; 00077 typedef void (CRYPTO_free_func)(void*parent, void*ptr, CRYPTO_EX_DATA *ad, int idx, 00078 long argl, void* argp); 00079 #define CRYPTO_THREADID_set_callback wolfSSL_THREADID_set_callback 00080 #define CRYPTO_THREADID_set_numeric wolfSSL_THREADID_set_numeric 00081 00082 #define CRYPTO_r_lock wc_LockMutex_ex 00083 #define CRYPTO_unlock wc_LockMutex_ex 00084 00085 #define CRYPTO_THREAD_lock wc_LockMutex 00086 #define CRYPTO_THREAD_r_lock wc_LockMutex 00087 #define CRYPTO_THREAD_unlock wc_UnLockMutex 00088 00089 #endif /* OPENSSL_ALL || HAVE_STUNNEL || WOLFSSL_NGINX || WOLFSSL_HAPROXY */ 00090 00091 #endif /* header */ 00092
Generated on Tue Jul 12 2022 20:58:34 by 1.7.2