forked from wolfSSL/wolfssl
examples not seeing WOLFSSL_API
This commit is contained in:
@ -31,7 +31,7 @@ AC_CONFIG_MACRO_DIR([m4])
|
|||||||
AC_CONFIG_HEADERS([config.h:config.in])dnl Keep filename to 8.3 for MS-DOS.
|
AC_CONFIG_HEADERS([config.h:config.in])dnl Keep filename to 8.3 for MS-DOS.
|
||||||
|
|
||||||
#shared library versioning
|
#shared library versioning
|
||||||
CYASSL_LIBRARY_VERSION=6:0:1
|
WOLFSSL_LIBRARY_VERSION=6:0:1
|
||||||
# | | |
|
# | | |
|
||||||
# +------+ | +---+
|
# +------+ | +---+
|
||||||
# | | |
|
# | | |
|
||||||
@ -43,7 +43,7 @@ CYASSL_LIBRARY_VERSION=6:0:1
|
|||||||
# | +- increment if source code has changed
|
# | +- increment if source code has changed
|
||||||
# | set to zero if current is incremented
|
# | set to zero if current is incremented
|
||||||
# +- increment if interfaces have been added, removed or changed
|
# +- increment if interfaces have been added, removed or changed
|
||||||
AC_SUBST([CYASSL_LIBRARY_VERSION])
|
AC_SUBST([WOLFSSL_LIBRARY_VERSION])
|
||||||
|
|
||||||
# capture user C_EXTRA_FLAGS from ./configure line, CFLAGS may hold -g -O2 even
|
# capture user C_EXTRA_FLAGS from ./configure line, CFLAGS may hold -g -O2 even
|
||||||
# if user doesn't override, no way to tell
|
# if user doesn't override, no way to tell
|
||||||
|
44
cyassl/ssl.h
44
cyassl/ssl.h
@ -153,14 +153,6 @@
|
|||||||
#define cyassl_chacha wolfssl_chacha
|
#define cyassl_chacha wolfssl_chacha
|
||||||
#define CyaSSL_ERR_reason_error_string wolfSSL_ERR_reason_error_string
|
#define CyaSSL_ERR_reason_error_string wolfSSL_ERR_reason_error_string
|
||||||
|
|
||||||
/* fips defines */
|
|
||||||
//defined in logging
|
|
||||||
//#define WOLFSSL_LEAVE CYASSL_LEAVE
|
|
||||||
//#define WOLFSSL_ERROR CYASSL_ERROR
|
|
||||||
|
|
||||||
//defined in settings.h
|
|
||||||
//#define WOLFSSL_GENERAL_ALIGNMENT CYASSL_GENERAL_ALIGNMENT
|
|
||||||
|
|
||||||
#define wolfcrypt_test ctaocrypt_test
|
#define wolfcrypt_test ctaocrypt_test
|
||||||
|
|
||||||
/* src/eys.c */
|
/* src/eys.c */
|
||||||
@ -229,10 +221,6 @@
|
|||||||
#define CyaSSL_CTX_set_group_messages wolfSSL_CTX_set_group_messages
|
#define CyaSSL_CTX_set_group_messages wolfSSL_CTX_set_group_messages
|
||||||
#define CyaSSL_CTX_set_session_cache_mode wolfSSL_CTX_set_session_cache_mode
|
#define CyaSSL_CTX_set_session_cache_mode wolfSSL_CTX_set_session_cache_mode
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Callbacks */
|
/* Callbacks */
|
||||||
#define CyaSSL_accept_ex wolfSSL_accept_ex
|
#define CyaSSL_accept_ex wolfSSL_accept_ex
|
||||||
#define CyaSSL_SetIORecv wolfSSL_SetIORecv
|
#define CyaSSL_SetIORecv wolfSSL_SetIORecv
|
||||||
@ -302,9 +290,6 @@
|
|||||||
#define CyaSSL_GetServerWriteKey wolfSSL_GetServerWriteKey
|
#define CyaSSL_GetServerWriteKey wolfSSL_GetServerWriteKey
|
||||||
#define CyaSSL_GetCipherBlockSize wolfSSL_GetCipherBlockSize
|
#define CyaSSL_GetCipherBlockSize wolfSSL_GetCipherBlockSize
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Connection, Session, and I/O */
|
/* Connection, Session, and I/O */
|
||||||
#define CyaSSL_peek wolfSSL_peek
|
#define CyaSSL_peek wolfSSL_peek
|
||||||
#define CyaSSL_read wolfSSL_read
|
#define CyaSSL_read wolfSSL_read
|
||||||
@ -329,13 +314,6 @@
|
|||||||
#define CyaSSL_dtls_got_timeout wolfSSL_dtls_got_timeout
|
#define CyaSSL_dtls_got_timeout wolfSSL_dtls_got_timeout
|
||||||
#define CyaSSL_dtls_get_current_timeout wolfSSL_dtls_get_current_timeout
|
#define CyaSSL_dtls_get_current_timeout wolfSSL_dtls_get_current_timeout
|
||||||
|
|
||||||
/* Memory Abstraction Layer */
|
|
||||||
//#define CyaSSL_Free wolfSSL_Free
|
|
||||||
//#define CyaSSL_Malloc wolfSSL_Malloc
|
|
||||||
//#define CyaSSL_Realloc wolfSSL_Realloc
|
|
||||||
//#define CyaSSL_SetAllocators wolfSSL_SetAllocators
|
|
||||||
/* moved to wolfssl/wolfcrypt/memory.h */
|
|
||||||
|
|
||||||
/* Certificate Manager */
|
/* Certificate Manager */
|
||||||
#define CyaSSL_CertManagerNew wolfSSL_CertManagerNew
|
#define CyaSSL_CertManagerNew wolfSSL_CertManagerNew
|
||||||
#define CyaSSL_CertManagerFree wolfSSL_CertManagerFree
|
#define CyaSSL_CertManagerFree wolfSSL_CertManagerFree
|
||||||
@ -375,22 +353,20 @@
|
|||||||
#define CyaSSL_CTX_UseTruncatedHMAC wolfSSL_CTX_UseTruncatedHMAC
|
#define CyaSSL_CTX_UseTruncatedHMAC wolfSSL_CTX_UseTruncatedHMAC
|
||||||
#define CyaSSL_CTX_UseSupportedCurve wolfSSL_CTX_UseSupportedCurve
|
#define CyaSSL_CTX_UseSupportedCurve wolfSSL_CTX_UseSupportedCurve
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Carried over from openssl compatibilty layer */
|
|
||||||
|
|
||||||
/* End wolfssl -> cyassl -> openssl compatibility */
|
/* End wolfssl -> cyassl -> openssl compatibility */
|
||||||
|
|
||||||
|
|
||||||
/* JRB macro redefinitions and api calls for cryptography for reverse compat. */
|
/* JRB macro redefinitions and api calls for cryptography for reverse compat. */
|
||||||
#ifdef WOLFSSL_SMALL_STACK
|
#ifdef WOLFSSL_SMALL_STACK
|
||||||
#define CYASSL_SMALL_STACK
|
#define CYASSL_SMALL_STACK
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* change visibility to be compatible with CyaSSL visibility */
|
/* change visibility to be compatible with CyaSSL visibility */
|
||||||
#undef WOLFSSL_API
|
#ifndef HAVE_FIPS
|
||||||
#define WOLFSSL_API CYASSL_API
|
/* Do Nothing */
|
||||||
|
#else
|
||||||
|
#undef WOLFSSL_API
|
||||||
|
#define WOLFSSL_API CYASSL_API
|
||||||
|
#endif
|
||||||
|
|
||||||
#define WOLFSSL_BIT_SIZE CYASSL_BIT_SIZE /* @TODO*/
|
#define WOLFSSL_BIT_SIZE CYASSL_BIT_SIZE /* @TODO*/
|
||||||
|
|
||||||
@ -399,9 +375,6 @@
|
|||||||
#define WOLFSSL_MAX_16BIT CYASSL_MAX_16BIT
|
#define WOLFSSL_MAX_16BIT CYASSL_MAX_16BIT
|
||||||
#define NO_WOLFSSL_ALLOC_ALIGN NO_CYASSL_ALLOC_ALIGN /* @TODO*/
|
#define NO_WOLFSSL_ALLOC_ALIGN NO_CYASSL_ALLOC_ALIGN /* @TODO*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* for pwdbased reverse compatibility */
|
/* for pwdbased reverse compatibility */
|
||||||
#ifndef NO_PWDBASED
|
#ifndef NO_PWDBASED
|
||||||
#define PBKDF1 wc_PBKDF1
|
#define PBKDF1 wc_PBKDF1
|
||||||
@ -417,11 +390,6 @@
|
|||||||
#define LIBCYASSL_VERSION_STRING LIBWOLFSSL_VERSION_STRING
|
#define LIBCYASSL_VERSION_STRING LIBWOLFSSL_VERSION_STRING
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
} /* extern "C" */
|
} /* extern "C" */
|
||||||
#endif
|
#endif
|
||||||
|
24
tests/api.c
24
tests/api.c
@ -101,22 +101,22 @@ static void test_CyaSSL_Method_Allocators(void)
|
|||||||
TEST_METHOD_ALLOCATOR(a, AssertNull)
|
TEST_METHOD_ALLOCATOR(a, AssertNull)
|
||||||
|
|
||||||
#ifndef NO_OLD_TLS
|
#ifndef NO_OLD_TLS
|
||||||
TEST_VALID_METHOD_ALLOCATOR(wolfSSLv3_server_method);
|
TEST_VALID_METHOD_ALLOCATOR(CyaSSLv3_server_method);
|
||||||
TEST_VALID_METHOD_ALLOCATOR(wolfSSLv3_client_method);
|
TEST_VALID_METHOD_ALLOCATOR(CyaSSLv3_client_method);
|
||||||
TEST_VALID_METHOD_ALLOCATOR(wolfTLSv1_server_method);
|
TEST_VALID_METHOD_ALLOCATOR(CyaTLSv1_server_method);
|
||||||
TEST_VALID_METHOD_ALLOCATOR(wolfTLSv1_client_method);
|
TEST_VALID_METHOD_ALLOCATOR(CyaTLSv1_client_method);
|
||||||
TEST_VALID_METHOD_ALLOCATOR(wolfTLSv1_1_server_method);
|
TEST_VALID_METHOD_ALLOCATOR(CyaTLSv1_1_server_method);
|
||||||
TEST_VALID_METHOD_ALLOCATOR(wolfTLSv1_1_client_method);
|
TEST_VALID_METHOD_ALLOCATOR(CyaTLSv1_1_client_method);
|
||||||
#endif
|
#endif
|
||||||
TEST_VALID_METHOD_ALLOCATOR(wolfTLSv1_2_server_method);
|
TEST_VALID_METHOD_ALLOCATOR(CyaTLSv1_2_server_method);
|
||||||
TEST_VALID_METHOD_ALLOCATOR(wolfTLSv1_2_client_method);
|
TEST_VALID_METHOD_ALLOCATOR(CyaTLSv1_2_client_method);
|
||||||
TEST_VALID_METHOD_ALLOCATOR(CyaSSLv23_client_method);
|
TEST_VALID_METHOD_ALLOCATOR(CyaSSLv23_client_method);
|
||||||
|
|
||||||
#ifdef CYASSL_DTLS
|
#ifdef CYASSL_DTLS
|
||||||
TEST_VALID_METHOD_ALLOCATOR(wolfDTLSv1_server_method);
|
TEST_VALID_METHOD_ALLOCATOR(CyaDTLSv1_server_method);
|
||||||
TEST_VALID_METHOD_ALLOCATOR(wolfDTLSv1_client_method);
|
TEST_VALID_METHOD_ALLOCATOR(CyaDTLSv1_client_method);
|
||||||
TEST_VALID_METHOD_ALLOCATOR(wolfDTLSv1_2_server_method);
|
TEST_VALID_METHOD_ALLOCATOR(CyaDTLSv1_2_server_method);
|
||||||
TEST_VALID_METHOD_ALLOCATOR(wolfDTLSv1_2_client_method);
|
TEST_VALID_METHOD_ALLOCATOR(CyaDTLSv1_2_client_method);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef OPENSSL_EXTRA
|
#ifdef OPENSSL_EXTRA
|
||||||
|
@ -24,8 +24,8 @@
|
|||||||
|
|
||||||
|
|
||||||
#include <cyassl/ctaocrypt/types.h>
|
#include <cyassl/ctaocrypt/types.h>
|
||||||
// #if !defined(WOLF_CRYPT_TYPES_H) && !defined(CTAO_CRYPT_TYPES_H)
|
#ifndef WOLF_CRYPT_TYPES_H
|
||||||
// #define WOLF_CRYPT_TYPES_H
|
#define WOLF_CRYPT_TYPES_H
|
||||||
|
|
||||||
#include <wolfssl/wolfcrypt/settings.h>
|
#include <wolfssl/wolfcrypt/settings.h>
|
||||||
#include <wolfssl/wolfcrypt/wc_port.h>
|
#include <wolfssl/wolfcrypt/wc_port.h>
|
||||||
@ -328,4 +328,4 @@
|
|||||||
// #endif
|
// #endif
|
||||||
|
|
||||||
|
|
||||||
// #endif /* WOLF_CRYPT_TYPES_H */
|
#endif /* WOLF_CRYPT_TYPES_H */
|
||||||
|
Reference in New Issue
Block a user