fix vc2003 build issues
This commit is contained in:
parent
00de6d645b
commit
3531419db4
|
@ -17,6 +17,9 @@
|
||||||
#define WOLFSSL_SEND_HRR_COOKIE
|
#define WOLFSSL_SEND_HRR_COOKIE
|
||||||
#define WOLFSSL_DTLS_CID
|
#define WOLFSSL_DTLS_CID
|
||||||
|
|
||||||
|
#define WOLF_C89
|
||||||
|
#define NO_WOLF_C99
|
||||||
|
|
||||||
/* Configurations */
|
/* Configurations */
|
||||||
#if defined(HAVE_FIPS)
|
#if defined(HAVE_FIPS)
|
||||||
/* FIPS */
|
/* FIPS */
|
||||||
|
@ -49,6 +52,9 @@
|
||||||
#define WOLFSSL_SNIFFER
|
#define WOLFSSL_SNIFFER
|
||||||
#define HAVE_SECURE_RENEGOTIATION
|
#define HAVE_SECURE_RENEGOTIATION
|
||||||
|
|
||||||
|
/* for NTLM */
|
||||||
|
#define WOLFSSL_DES_ECB
|
||||||
|
|
||||||
#define HAVE_AESGCM
|
#define HAVE_AESGCM
|
||||||
#define WOLFSSL_AESGCM_STREAM
|
#define WOLFSSL_AESGCM_STREAM
|
||||||
#define WOLFSSL_SHA384
|
#define WOLFSSL_SHA384
|
||||||
|
@ -61,9 +67,25 @@
|
||||||
#define ECC_SHAMIR
|
#define ECC_SHAMIR
|
||||||
#define ECC_TIMING_RESISTANT
|
#define ECC_TIMING_RESISTANT
|
||||||
|
|
||||||
#define WOLFSSL_SP_X86_64
|
|
||||||
#define SP_INT_BITS 4096
|
#define SP_INT_BITS 4096
|
||||||
|
|
||||||
|
/* For VC7.1: define strcpy_s to StringCchCopy */
|
||||||
|
#ifndef StringCchCopy
|
||||||
|
#define STRSAFE_NO_DEPRECATE
|
||||||
|
#define STRSAFE_NO_CB_FUNCTIONS
|
||||||
|
#include <Winerror.h>
|
||||||
|
#include <Strsafe.h>
|
||||||
|
#endif /* !StringCchCopy */
|
||||||
|
|
||||||
|
#define strcpy_s StringCchCopyA
|
||||||
|
|
||||||
|
#define USE_WOLF_STRTOK
|
||||||
|
#define XVSNPRINTF _vsnprintf
|
||||||
|
|
||||||
|
#ifndef InetPton
|
||||||
|
int __stdcall InetPton(int Family, const char *pszAddrString, void *pAddrBuf);
|
||||||
|
#endif /* !InetPton */
|
||||||
|
|
||||||
/* Optional Performance Speedups */
|
/* Optional Performance Speedups */
|
||||||
#if 0
|
#if 0
|
||||||
/* AESNI on x64 */
|
/* AESNI on x64 */
|
||||||
|
|
|
@ -356,7 +356,7 @@ typedef WOLFSSL_EC_BUILTIN_CURVE EC_builtin_curve;
|
||||||
#define EC_GROUP_order_bits wolfSSL_EC_GROUP_order_bits
|
#define EC_GROUP_order_bits wolfSSL_EC_GROUP_order_bits
|
||||||
#define EC_GROUP_method_of wolfSSL_EC_GROUP_method_of
|
#define EC_GROUP_method_of wolfSSL_EC_GROUP_method_of
|
||||||
#ifndef NO_WOLFSSL_STUB
|
#ifndef NO_WOLFSSL_STUB
|
||||||
#define EC_GROUP_set_point_conversion_form(...) WC_DO_NOTHING
|
#define EC_GROUP_set_point_conversion_form(x, y) WC_DO_NOTHING
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define EC_METHOD_get_field_type wolfSSL_EC_METHOD_get_field_type
|
#define EC_METHOD_get_field_type wolfSSL_EC_METHOD_get_field_type
|
||||||
|
|
|
@ -1019,7 +1019,7 @@ WOLFSSL_API int wolfSSL_EVP_SignInit_ex(WOLFSSL_EVP_MD_CTX* ctx,
|
||||||
#define EVP_MD_block_size wolfSSL_EVP_MD_block_size
|
#define EVP_MD_block_size wolfSSL_EVP_MD_block_size
|
||||||
#define EVP_MD_type wolfSSL_EVP_MD_type
|
#define EVP_MD_type wolfSSL_EVP_MD_type
|
||||||
#ifndef NO_WOLFSSL_STUB
|
#ifndef NO_WOLFSSL_STUB
|
||||||
#define EVP_MD_CTX_set_flags(...) WC_DO_NOTHING
|
#define EVP_MD_CTX_set_flags(x, y) WC_DO_NOTHING
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define EVP_Digest wolfSSL_EVP_Digest
|
#define EVP_Digest wolfSSL_EVP_Digest
|
||||||
|
|
|
@ -264,7 +264,7 @@ int wolfSSL_PEM_write_DHparams(XFILE fp, WOLFSSL_DH* dh);
|
||||||
#define PEM_read_bio_ECPrivateKey wolfSSL_PEM_read_bio_ECPrivateKey
|
#define PEM_read_bio_ECPrivateKey wolfSSL_PEM_read_bio_ECPrivateKey
|
||||||
#define PEM_read_bio_EC_PUBKEY wolfSSL_PEM_read_bio_EC_PUBKEY
|
#define PEM_read_bio_EC_PUBKEY wolfSSL_PEM_read_bio_EC_PUBKEY
|
||||||
#ifndef NO_WOLFSSL_STUB
|
#ifndef NO_WOLFSSL_STUB
|
||||||
#define PEM_write_bio_ECPKParameters(...) 0
|
#define PEM_write_bio_ECPKParameters(x) 0
|
||||||
#endif
|
#endif
|
||||||
/* EVP_KEY */
|
/* EVP_KEY */
|
||||||
#define PEM_read_bio_PrivateKey wolfSSL_PEM_read_bio_PrivateKey
|
#define PEM_read_bio_PrivateKey wolfSSL_PEM_read_bio_PrivateKey
|
||||||
|
|
|
@ -745,7 +745,7 @@ wolfSSL_X509_STORE_set_verify_cb((WOLFSSL_X509_STORE *)(s), (WOLFSSL_X509_STORE_
|
||||||
#define X509_REVOKED_get0_serialNumber wolfSSL_X509_REVOKED_get0_serial_number
|
#define X509_REVOKED_get0_serialNumber wolfSSL_X509_REVOKED_get0_serial_number
|
||||||
#define X509_REVOKED_get0_revocationDate wolfSSL_X509_REVOKED_get0_revocation_date
|
#define X509_REVOKED_get0_revocationDate wolfSSL_X509_REVOKED_get0_revocation_date
|
||||||
|
|
||||||
#define X509_check_purpose(...) 0
|
#define X509_check_purpose(x, y, z) 0
|
||||||
|
|
||||||
#define OCSP_parse_url wolfSSL_OCSP_parse_url
|
#define OCSP_parse_url wolfSSL_OCSP_parse_url
|
||||||
|
|
||||||
|
@ -876,7 +876,7 @@ wolfSSL_X509_STORE_set_verify_cb((WOLFSSL_X509_STORE *)(s), (WOLFSSL_X509_STORE_
|
||||||
#define ASN1_STRING_print(x, y) wolfSSL_ASN1_STRING_print ((WOLFSSL_BIO*)(x), (WOLFSSL_ASN1_STRING*)(y))
|
#define ASN1_STRING_print(x, y) wolfSSL_ASN1_STRING_print ((WOLFSSL_BIO*)(x), (WOLFSSL_ASN1_STRING*)(y))
|
||||||
#define d2i_DISPLAYTEXT wolfSSL_d2i_DISPLAYTEXT
|
#define d2i_DISPLAYTEXT wolfSSL_d2i_DISPLAYTEXT
|
||||||
#ifndef NO_WOLFSSL_STUB
|
#ifndef NO_WOLFSSL_STUB
|
||||||
#define ASN1_STRING_set_default_mask_asc(...) 1
|
#define ASN1_STRING_set_default_mask_asc(x) 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define ASN1_OCTET_STRING WOLFSSL_ASN1_STRING
|
#define ASN1_OCTET_STRING WOLFSSL_ASN1_STRING
|
||||||
|
@ -894,7 +894,7 @@ wolfSSL_X509_STORE_set_verify_cb((WOLFSSL_X509_STORE *)(s), (WOLFSSL_X509_STORE_
|
||||||
#define ASN1_IA5STRING_free wolfSSL_ASN1_STRING_free
|
#define ASN1_IA5STRING_free wolfSSL_ASN1_STRING_free
|
||||||
#define ASN1_IA5STRING_set wolfSSL_ASN1_STRING_set
|
#define ASN1_IA5STRING_set wolfSSL_ASN1_STRING_set
|
||||||
|
|
||||||
#define ASN1_PRINTABLE_type(...) V_ASN1_PRINTABLESTRING
|
#define ASN1_PRINTABLE_type(x) V_ASN1_PRINTABLESTRING
|
||||||
|
|
||||||
#define ASN1_UTCTIME_pr wolfSSL_ASN1_UTCTIME_pr
|
#define ASN1_UTCTIME_pr wolfSSL_ASN1_UTCTIME_pr
|
||||||
|
|
||||||
|
@ -1447,7 +1447,7 @@ typedef WOLFSSL_SRTP_PROTECTION_PROFILE SRTP_PROTECTION_PROFILE;
|
||||||
#define PSK_MAX_IDENTITY_LEN 128
|
#define PSK_MAX_IDENTITY_LEN 128
|
||||||
#define SSL_CTX_clear_options wolfSSL_CTX_clear_options
|
#define SSL_CTX_clear_options wolfSSL_CTX_clear_options
|
||||||
|
|
||||||
#define SSL_CTX_add_server_custom_ext(...) 0
|
__inline int SSL_CTX_add_server_custom_ext(SSL_CTX *ctx, ...) { (void)(ctx); return 0; }
|
||||||
|
|
||||||
#define SSL_get0_verified_chain wolfSSL_get0_verified_chain
|
#define SSL_get0_verified_chain wolfSSL_get0_verified_chain
|
||||||
#define X509_chain_up_ref wolfSSL_X509_chain_up_ref
|
#define X509_chain_up_ref wolfSSL_X509_chain_up_ref
|
||||||
|
@ -1455,8 +1455,8 @@ typedef WOLFSSL_SRTP_PROTECTION_PROFILE SRTP_PROTECTION_PROFILE;
|
||||||
#endif /* HAVE_STUNNEL || WOLFSSL_NGINX */
|
#endif /* HAVE_STUNNEL || WOLFSSL_NGINX */
|
||||||
|
|
||||||
#ifndef NO_WOLFSSL_STUB
|
#ifndef NO_WOLFSSL_STUB
|
||||||
#define b2i_PrivateKey_bio(...) NULL
|
#define b2i_PrivateKey_bio(x) NULL
|
||||||
#define b2i_PVK_bio(...) NULL
|
#define b2i_PVK_bio(x) NULL
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define SSL_CTX_get_default_passwd_cb wolfSSL_CTX_get_default_passwd_cb
|
#define SSL_CTX_get_default_passwd_cb wolfSSL_CTX_get_default_passwd_cb
|
||||||
|
@ -1663,8 +1663,8 @@ typedef WOLFSSL_SRTP_PROTECTION_PROFILE SRTP_PROTECTION_PROFILE;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef NO_WOLFSSL_STUB
|
#ifndef NO_WOLFSSL_STUB
|
||||||
#define OBJ_create_objects(...) WC_DO_NOTHING
|
#define OBJ_create_objects(x) WC_DO_NOTHING
|
||||||
#define sk_SSL_COMP_free(...) WC_DO_NOTHING
|
#define sk_SSL_COMP_free(x) WC_DO_NOTHING
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define OBJ_dup wolfSSL_ASN1_OBJECT_dup
|
#define OBJ_dup wolfSSL_ASN1_OBJECT_dup
|
||||||
|
|
|
@ -152,7 +152,7 @@ WOLFSSL_API WOLFSSL_ASN1_STRING* wolfSSL_a2i_IPADDRESS(const char* ipa);
|
||||||
#define X509V3_EXT_d2i wolfSSL_X509V3_EXT_d2i
|
#define X509V3_EXT_d2i wolfSSL_X509V3_EXT_d2i
|
||||||
#define X509V3_EXT_add_nconf wolfSSL_X509V3_EXT_add_nconf
|
#define X509V3_EXT_add_nconf wolfSSL_X509V3_EXT_add_nconf
|
||||||
#ifndef NO_WOLFSSL_STUB
|
#ifndef NO_WOLFSSL_STUB
|
||||||
#define X509V3_parse_list(...) NULL
|
#define X509V3_parse_list(x) NULL
|
||||||
#endif
|
#endif
|
||||||
#define i2s_ASN1_OCTET_STRING wolfSSL_i2s_ASN1_STRING
|
#define i2s_ASN1_OCTET_STRING wolfSSL_i2s_ASN1_STRING
|
||||||
#define a2i_IPADDRESS wolfSSL_a2i_IPADDRESS
|
#define a2i_IPADDRESS wolfSSL_a2i_IPADDRESS
|
||||||
|
@ -160,8 +160,8 @@ WOLFSSL_API WOLFSSL_ASN1_STRING* wolfSSL_a2i_IPADDRESS(const char* ipa);
|
||||||
#define X509V3_EXT_conf_nid wolfSSL_X509V3_EXT_conf_nid
|
#define X509V3_EXT_conf_nid wolfSSL_X509V3_EXT_conf_nid
|
||||||
#define X509V3_set_ctx wolfSSL_X509V3_set_ctx
|
#define X509V3_set_ctx wolfSSL_X509V3_set_ctx
|
||||||
#ifndef NO_WOLFSSL_STUB
|
#ifndef NO_WOLFSSL_STUB
|
||||||
#define X509V3_set_nconf(...) WC_DO_NOTHING
|
#define X509V3_set_nconf(x) WC_DO_NOTHING
|
||||||
#define X509V3_EXT_cleanup(...) WC_DO_NOTHING
|
#define X509V3_EXT_cleanup(x) WC_DO_NOTHING
|
||||||
#endif
|
#endif
|
||||||
#define X509V3_set_ctx_test(ctx) wolfSSL_X509V3_set_ctx(ctx, NULL, NULL, NULL, NULL, CTX_TEST)
|
#define X509V3_set_ctx_test(ctx) wolfSSL_X509V3_set_ctx(ctx, NULL, NULL, NULL, NULL, CTX_TEST)
|
||||||
#define X509V3_set_ctx_nodb wolfSSL_X509V3_set_ctx_nodb
|
#define X509V3_set_ctx_nodb wolfSSL_X509V3_set_ctx_nodb
|
||||||
|
|
|
@ -173,7 +173,7 @@ WOLFSSL_API void wolfSSL_SetLoggingPrefix(const char* prefix);
|
||||||
WOLFSSL_API void WOLFSSL_MSG_EX(const char* fmt, ...);
|
WOLFSSL_API void WOLFSSL_MSG_EX(const char* fmt, ...);
|
||||||
#define HAVE_WOLFSSL_MSG_EX
|
#define HAVE_WOLFSSL_MSG_EX
|
||||||
#else
|
#else
|
||||||
#define WOLFSSL_MSG_EX(...) WC_DO_NOTHING
|
__inline void WOLFSSL_MSG_EX(const char *fmt, ...) { (void)(fmt); return; }
|
||||||
#endif
|
#endif
|
||||||
WOLFSSL_API void WOLFSSL_MSG(const char* msg);
|
WOLFSSL_API void WOLFSSL_MSG(const char* msg);
|
||||||
WOLFSSL_API void WOLFSSL_BUFFER(const byte* buffer, word32 length);
|
WOLFSSL_API void WOLFSSL_BUFFER(const byte* buffer, word32 length);
|
||||||
|
@ -185,7 +185,7 @@ WOLFSSL_API void wolfSSL_SetLoggingPrefix(const char* prefix);
|
||||||
#define WOLFSSL_STUB(m) WC_DO_NOTHING
|
#define WOLFSSL_STUB(m) WC_DO_NOTHING
|
||||||
#define WOLFSSL_IS_DEBUG_ON() 0
|
#define WOLFSSL_IS_DEBUG_ON() 0
|
||||||
|
|
||||||
#define WOLFSSL_MSG_EX(...) WC_DO_NOTHING
|
__inline void WOLFSSL_MSG_EX(const char *fmt, ...) { (void)(fmt); return; }
|
||||||
#define WOLFSSL_MSG(m) WC_DO_NOTHING
|
#define WOLFSSL_MSG(m) WC_DO_NOTHING
|
||||||
#define WOLFSSL_BUFFER(b, l) WC_DO_NOTHING
|
#define WOLFSSL_BUFFER(b, l) WC_DO_NOTHING
|
||||||
|
|
||||||
|
|
|
@ -1570,7 +1570,7 @@ typedef struct w64wrapper {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef SAVE_VECTOR_REGISTERS
|
#ifndef SAVE_VECTOR_REGISTERS
|
||||||
#define SAVE_VECTOR_REGISTERS(...) WC_DO_NOTHING
|
#define SAVE_VECTOR_REGISTERS(x) WC_DO_NOTHING
|
||||||
#endif
|
#endif
|
||||||
#ifndef SAVE_VECTOR_REGISTERS2
|
#ifndef SAVE_VECTOR_REGISTERS2
|
||||||
#define SAVE_VECTOR_REGISTERS2() 0
|
#define SAVE_VECTOR_REGISTERS2() 0
|
||||||
|
@ -1579,10 +1579,10 @@ typedef struct w64wrapper {
|
||||||
#define WC_DEBUG_SET_VECTOR_REGISTERS_RETVAL(x) WC_DO_NOTHING
|
#define WC_DEBUG_SET_VECTOR_REGISTERS_RETVAL(x) WC_DO_NOTHING
|
||||||
#endif
|
#endif
|
||||||
#ifndef ASSERT_SAVED_VECTOR_REGISTERS
|
#ifndef ASSERT_SAVED_VECTOR_REGISTERS
|
||||||
#define ASSERT_SAVED_VECTOR_REGISTERS(...) WC_DO_NOTHING
|
#define ASSERT_SAVED_VECTOR_REGISTERS(x) WC_DO_NOTHING
|
||||||
#endif
|
#endif
|
||||||
#ifndef ASSERT_RESTORED_VECTOR_REGISTERS
|
#ifndef ASSERT_RESTORED_VECTOR_REGISTERS
|
||||||
#define ASSERT_RESTORED_VECTOR_REGISTERS(...) WC_DO_NOTHING
|
#define ASSERT_RESTORED_VECTOR_REGISTERS(x) WC_DO_NOTHING
|
||||||
#endif
|
#endif
|
||||||
#ifndef RESTORE_VECTOR_REGISTERS
|
#ifndef RESTORE_VECTOR_REGISTERS
|
||||||
#define RESTORE_VECTOR_REGISTERS() WC_DO_NOTHING
|
#define RESTORE_VECTOR_REGISTERS() WC_DO_NOTHING
|
||||||
|
|
|
@ -325,7 +325,7 @@
|
||||||
#define WOLFSSL_ATOMIC_OPS
|
#define WOLFSSL_ATOMIC_OPS
|
||||||
#endif /* WOLFSSL_HAVE_ATOMIC_H */
|
#endif /* WOLFSSL_HAVE_ATOMIC_H */
|
||||||
#endif
|
#endif
|
||||||
#elif defined(_MSC_VER)
|
#elif _MSC_VER >= 1400
|
||||||
/* Use MSVC compiler intrinsics for atomic ops */
|
/* Use MSVC compiler intrinsics for atomic ops */
|
||||||
#include <intrin.h>
|
#include <intrin.h>
|
||||||
typedef volatile long wolfSSL_Atomic_Int;
|
typedef volatile long wolfSSL_Atomic_Int;
|
||||||
|
|
Loading…
Reference in a new issue