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

Dependents:   OS

Committer:
sPymbed
Date:
Wed Nov 20 13:27:48 2019 +0000
Revision:
17:ff9d1e86ad5f
Parent:
15:117db924cf7c
removed: wolfcrypt

Who changed what in which revision?

UserRevisionLine numberNew contents of line
wolfSSL 15:117db924cf7c 1 /* crypto.h
wolfSSL 15:117db924cf7c 2 *
wolfSSL 15:117db924cf7c 3 * Copyright (C) 2006-2017 wolfSSL Inc.
wolfSSL 15:117db924cf7c 4 *
wolfSSL 15:117db924cf7c 5 * This file is part of wolfSSL.
wolfSSL 15:117db924cf7c 6 *
wolfSSL 15:117db924cf7c 7 * wolfSSL is free software; you can redistribute it and/or modify
wolfSSL 15:117db924cf7c 8 * it under the terms of the GNU General Public License as published by
wolfSSL 15:117db924cf7c 9 * the Free Software Foundation; either version 2 of the License, or
wolfSSL 15:117db924cf7c 10 * (at your option) any later version.
wolfSSL 15:117db924cf7c 11 *
wolfSSL 15:117db924cf7c 12 * wolfSSL is distributed in the hope that it will be useful,
wolfSSL 15:117db924cf7c 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
wolfSSL 15:117db924cf7c 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
wolfSSL 15:117db924cf7c 15 * GNU General Public License for more details.
wolfSSL 15:117db924cf7c 16 *
wolfSSL 15:117db924cf7c 17 * You should have received a copy of the GNU General Public License
wolfSSL 15:117db924cf7c 18 * along with this program; if not, write to the Free Software
wolfSSL 15:117db924cf7c 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
wolfSSL 15:117db924cf7c 20 */
wolfSSL 15:117db924cf7c 21
wolfSSL 15:117db924cf7c 22 /* crypto.h for openSSL */
wolfSSL 15:117db924cf7c 23
wolfSSL 15:117db924cf7c 24 #ifndef WOLFSSL_CRYPTO_H_
wolfSSL 15:117db924cf7c 25 #define WOLFSSL_CRYPTO_H_
wolfSSL 15:117db924cf7c 26
wolfSSL 15:117db924cf7c 27 #include <wolfssl/openssl/opensslv.h>
wolfSSL 15:117db924cf7c 28
wolfSSL 15:117db924cf7c 29 #include <wolfssl/wolfcrypt/settings.h>
wolfSSL 15:117db924cf7c 30
wolfSSL 15:117db924cf7c 31 #ifdef WOLFSSL_PREFIX
wolfSSL 15:117db924cf7c 32 #include "prefix_crypto.h"
wolfSSL 15:117db924cf7c 33 #endif
wolfSSL 15:117db924cf7c 34
wolfSSL 15:117db924cf7c 35
wolfSSL 15:117db924cf7c 36 WOLFSSL_API const char* wolfSSLeay_version(int type);
wolfSSL 15:117db924cf7c 37 WOLFSSL_API unsigned long wolfSSLeay(void);
wolfSSL 15:117db924cf7c 38
wolfSSL 15:117db924cf7c 39 #ifdef OPENSSL_EXTRA
wolfSSL 15:117db924cf7c 40 WOLFSSL_API void wolfSSL_OPENSSL_free(void*);
wolfSSL 15:117db924cf7c 41 WOLFSSL_API void *wolfSSL_OPENSSL_malloc(size_t a);
wolfSSL 15:117db924cf7c 42 #endif
wolfSSL 15:117db924cf7c 43
wolfSSL 15:117db924cf7c 44 #define CRYPTO_THREADID void
wolfSSL 15:117db924cf7c 45
wolfSSL 15:117db924cf7c 46 #define SSLeay_version wolfSSLeay_version
wolfSSL 15:117db924cf7c 47 #define SSLeay wolfSSLeay
wolfSSL 15:117db924cf7c 48
wolfSSL 15:117db924cf7c 49
wolfSSL 15:117db924cf7c 50 #define SSLEAY_VERSION 0x0090600fL
wolfSSL 15:117db924cf7c 51 #define SSLEAY_VERSION_NUMBER SSLEAY_VERSION
wolfSSL 15:117db924cf7c 52 #define CRYPTO_lock wc_LockMutex_ex
wolfSSL 15:117db924cf7c 53
wolfSSL 15:117db924cf7c 54 /* this function was used to set the default malloc, free, and realloc */
wolfSSL 15:117db924cf7c 55 #define CRYPTO_malloc_init() /* CRYPTO_malloc_init is not needed */
wolfSSL 15:117db924cf7c 56
wolfSSL 15:117db924cf7c 57 #define OPENSSL_free wolfSSL_OPENSSL_free
wolfSSL 15:117db924cf7c 58 #define OPENSSL_malloc wolfSSL_OPENSSL_malloc
wolfSSL 15:117db924cf7c 59
wolfSSL 15:117db924cf7c 60 #if defined(OPENSSL_ALL) || defined(HAVE_STUNNEL) || defined(WOLFSSL_NGINX) || \
wolfSSL 15:117db924cf7c 61 defined(WOLFSSL_HAPROXY) || defined(OPENSSL_EXTRA)
wolfSSL 15:117db924cf7c 62 #define CRYPTO_set_mem_ex_functions wolfSSL_CRYPTO_set_mem_ex_functions
wolfSSL 15:117db924cf7c 63 #define FIPS_mode wolfSSL_FIPS_mode
wolfSSL 15:117db924cf7c 64 #define FIPS_mode_set wolfSSL_FIPS_mode_set
wolfSSL 15:117db924cf7c 65 typedef struct CRYPTO_EX_DATA CRYPTO_EX_DATA;
wolfSSL 15:117db924cf7c 66 typedef void (CRYPTO_free_func)(void*parent, void*ptr, CRYPTO_EX_DATA *ad, int idx,
wolfSSL 15:117db924cf7c 67 long argl, void* argp);
wolfSSL 15:117db924cf7c 68 #define CRYPTO_THREADID_set_callback wolfSSL_THREADID_set_callback
wolfSSL 15:117db924cf7c 69 #define CRYPTO_THREADID_set_numeric wolfSSL_THREADID_set_numeric
wolfSSL 15:117db924cf7c 70
wolfSSL 15:117db924cf7c 71 #define CRYPTO_r_lock wc_LockMutex_ex
wolfSSL 15:117db924cf7c 72 #define CRYPTO_unlock wc_LockMutex_ex
wolfSSL 15:117db924cf7c 73
wolfSSL 15:117db924cf7c 74 #define CRYPTO_THREAD_lock wc_LockMutex
wolfSSL 15:117db924cf7c 75 #define CRYPTO_THREAD_r_lock wc_LockMutex
wolfSSL 15:117db924cf7c 76 #define CRYPTO_THREAD_unlock wc_UnLockMutex
wolfSSL 15:117db924cf7c 77
wolfSSL 15:117db924cf7c 78 #endif /* OPENSSL_ALL || HAVE_STUNNEL || WOLFSSL_NGINX || WOLFSSL_HAPROXY */
wolfSSL 15:117db924cf7c 79
wolfSSL 15:117db924cf7c 80 #endif /* header */
wolfSSL 15:117db924cf7c 81