mem.h in wolfcrypt, compatibility layer
This commit is contained in:
parent
6e1a0befdc
commit
0da381e019
19
cyassl/ssl.h
19
cyassl/ssl.h
@ -80,7 +80,7 @@
|
||||
#define CYASSL_X509_OBJECT WOLFSSL_X509_OBJECT
|
||||
#define CYASSL_X509_STORE_CTX WOLFSSL_X509_STORE_CTX
|
||||
|
||||
/* ssl.c */
|
||||
/* src/ssl.c */
|
||||
#define CYASSL_CLIENT_END WOLFSSL_CLIENT_END
|
||||
#define CYASSL_CERT_MANAGER WOLFSSL_CERT_MANAGER
|
||||
#define CYASSL_USER_CA WOLFSSL_USER_CA
|
||||
@ -89,7 +89,17 @@
|
||||
#define CYASSL_TLSV1_2 WOLFSSL_TLSV1_2
|
||||
#define CYASSL_SSLV3 WOLFSSL_SSLV3
|
||||
#define CyaSSL_session_reused wolfSSL_session_reused
|
||||
|
||||
#define CyaSSL_get_version wolfSSL_get_version
|
||||
#define CyaSSL_get_shutdown wolfSSL_get_shutdown
|
||||
#define CyaSSL_is_init_finished wolfSSL_is_init_finished
|
||||
#define CyaSSL_CTX_UnloadCAs wolfSSL_CTX_UnloadCAs
|
||||
#define CyaSSL_UnloadCertsKeys wolfSSL_UnloadCertsKeys
|
||||
#define CyaSSL_SetServerID wolfSSL_SetServerID
|
||||
#define CyaSSL_SetCertCbCtx wolfSSL_SetCertCbCtx
|
||||
#define CyaSSL_CTX_check_private_key wolfSSL_CTX_check_private_key
|
||||
#define CyaSSL_get_current_cipher_suite wolfSSL_get_current_cipher_suite
|
||||
#define CyaSSL_get_cipher wolfSSL_get_cipher
|
||||
#define CyaSSL_CIPHER_get_name wolfSSL_CIPHER_get_name
|
||||
|
||||
/* io.c */
|
||||
#define CYASSL_CBIO_ERR_CONN_CLOSE WOLFSSL_CBIO_ERR_CONN_CLOSE
|
||||
@ -101,9 +111,12 @@
|
||||
#define CYASSL_CBIO_ERR_WANT_WRITE WOLFSSL_CBIO_ERR_WANT_WRITE
|
||||
#define CYASSL_CBIO_ERR_TIMEOUT WOLFSSL_CBIO_ERR_TIMEOUT
|
||||
|
||||
/* tls.c */
|
||||
/* src/tls.c */
|
||||
#define CYASSL_SERVER_END WOLFSSL_SERVER_END
|
||||
#define CYASSL_TLS_HMAC_INNER_SZ WOLFSSL_TLS_HMAC_INNER_SZ
|
||||
#define CyaSSL_make_eap_keys wolfSSL_make_eap_keys
|
||||
#define CyaSSL_MakeTlsMasterSecret wolfSSL_MakeTlsMasterSecret
|
||||
#define CyaSSL_DeriveTlsKeys wolfSSL_DeriveTlsKeys
|
||||
|
||||
/* internal.c */
|
||||
#define CyaSSL_ERR_reason_error_string wolfSSL_ERR_reason_error_string
|
||||
|
@ -22,8 +22,8 @@
|
||||
/* submitted by eof */
|
||||
|
||||
|
||||
#ifndef CYASSL_MEMORY_H
|
||||
#define CYASSL_MEMORY_H
|
||||
#ifndef WOLFSSL_MEMORY_H
|
||||
#define WOLFSSL_MEMORY_H
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
@ -32,20 +32,20 @@
|
||||
#endif
|
||||
|
||||
|
||||
typedef void *(*CyaSSL_Malloc_cb)(size_t size);
|
||||
typedef void (*CyaSSL_Free_cb)(void *ptr);
|
||||
typedef void *(*CyaSSL_Realloc_cb)(void *ptr, size_t size);
|
||||
typedef void *(*wolfSSL_Malloc_cb)(size_t size);
|
||||
typedef void (*wolfSSL_Free_cb)(void *ptr);
|
||||
typedef void *(*wolfSSL_Realloc_cb)(void *ptr, size_t size);
|
||||
|
||||
|
||||
/* Public set function */
|
||||
CYASSL_API int CyaSSL_SetAllocators(CyaSSL_Malloc_cb malloc_function,
|
||||
CyaSSL_Free_cb free_function,
|
||||
CyaSSL_Realloc_cb realloc_function);
|
||||
WOLFSSL_API int CyaSSL_SetAllocators(wolfSSL_Malloc_cb malloc_function,
|
||||
wolfSSL_Free_cb free_function,
|
||||
wolfSSL_Realloc_cb realloc_function);
|
||||
|
||||
/* Public in case user app wants to use XMALLOC/XFREE */
|
||||
CYASSL_API void* CyaSSL_Malloc(size_t size);
|
||||
CYASSL_API void CyaSSL_Free(void *ptr);
|
||||
CYASSL_API void* CyaSSL_Realloc(void *ptr, size_t size);
|
||||
WOLFSSL_API void* wolfSSL_Malloc(size_t size);
|
||||
WOLFSSL_API void wolfSSL_Free(void *ptr);
|
||||
WOLFSSL_API void* wolfSSL_Realloc(void *ptr, size_t size);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
Loading…
Reference in New Issue
Block a user