From 357ace8408424e16fe4b089009d8f26f37ab0c81 Mon Sep 17 00:00:00 2001 From: Uriah-wolfSSL Date: Tue, 12 Jul 2022 13:33:02 -0500 Subject: [PATCH 1/2] * Updated README.txt w/ how to use user_settings_dtls.h. * Added dtls13.c to build project files. * Added user_settiings.dtls.h to include.am. --- IDE/WIN/README.txt | 13 +++++++++++++ IDE/WIN/include.am | 1 + wolfssl.vcproj | 4 ++++ wolfssl.vcxproj | 1 + 4 files changed, 19 insertions(+) diff --git a/IDE/WIN/README.txt b/IDE/WIN/README.txt index c220bd630..25e4d7e8d 100644 --- a/IDE/WIN/README.txt +++ b/IDE/WIN/README.txt @@ -68,3 +68,16 @@ Additionally one may enable: * WOLFSSL_KEY_GEN These settings are defined in IDE/WIN/user_settings.h. + +# Notes on enabling DTLS including DTLS version 1.3 + +The file IDE/WIN/user_settings_dtls.h contains the needed build options for +enabling DTLS and DTLS version 1.3. + +To incorporate the build options: + + * Rename IDE/WIN/user_settings.h to IDE/WIN/user_settings.h.bak + * Rename IDE/WIN/user_settings_dtls.h to IDE/WIN/user_settings.h + +Alternatively, copy the DTLS labeled section from IDE/WIN/user_settings_dtls.h +in to IDE/WIN/user_settings.h. \ No newline at end of file diff --git a/IDE/WIN/include.am b/IDE/WIN/include.am index ef20c513e..a7a1b9a7e 100644 --- a/IDE/WIN/include.am +++ b/IDE/WIN/include.am @@ -7,3 +7,4 @@ EXTRA_DIST+= IDE/WIN/test.vcxproj EXTRA_DIST+= IDE/WIN/wolfssl-fips.sln EXTRA_DIST+= IDE/WIN/wolfssl-fips.vcxproj EXTRA_DIST+= IDE/WIN/user_settings.h +EXTRA_DIST+= IDE/WIN/user_settings_dtls.h diff --git a/wolfssl.vcproj b/wolfssl.vcproj index d9277c678..c49dfed8b 100644 --- a/wolfssl.vcproj +++ b/wolfssl.vcproj @@ -155,6 +155,10 @@ RelativePath=".\src\crl.c" > + + diff --git a/wolfssl.vcxproj b/wolfssl.vcxproj index 9c62ae8e5..bebef5489 100644 --- a/wolfssl.vcxproj +++ b/wolfssl.vcxproj @@ -277,6 +277,7 @@ + From a4e452ec6a6b8f9a19aff9c9127162018a3578da Mon Sep 17 00:00:00 2001 From: Uriah-wolfSSL Date: Fri, 8 Jul 2022 11:26:14 -0500 Subject: [PATCH 2/2] New file for adding needed configuration options to enable DTLS including DTLS version 1.3. This is an example file to be used for testing, eval, demos, etc. --- IDE/WIN/user_settings_dtls.h | 98 ++++++++++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 IDE/WIN/user_settings_dtls.h diff --git a/IDE/WIN/user_settings_dtls.h b/IDE/WIN/user_settings_dtls.h new file mode 100644 index 000000000..6059137f9 --- /dev/null +++ b/IDE/WIN/user_settings_dtls.h @@ -0,0 +1,98 @@ +#ifndef _WIN_USER_SETTINGS_H_ +#define _WIN_USER_SETTINGS_H_ + +/* Verify this is Windows */ +#ifndef _WIN32 +#error This user_settings.h header is only designed for Windows +#endif + +/* DTLS configuration including DTLS v.1.3 which requires TLS v.1.3. */ + +/* The below DTLS configurations can be copied in to another user_settings.h + file that may have other settings that need to be preserved. +*/ +#define WOLFSSL_TLS13 +#define WOLFSSL_DTLS +#define WOLFSSL_DTLS13 +#define HAVE_HKDF +#define HAVE_FFDHE_2048 +#define WC_RSA_PSS + +/* DTLS configuration */ + +/* Configurations */ +#if defined(HAVE_FIPS) + /* FIPS */ + #define OPENSSL_EXTRA + #define HAVE_THREAD_LS + #define WOLFSSL_KEY_GEN + #define HAVE_AESGCM + #define HAVE_HASHDRBG + #define WOLFSSL_SHA384 + #define WOLFSSL_SHA512 + #define NO_PSK + #define NO_RC4 + #define NO_DSA + #define NO_MD4 + + #define GCM_NONCE_MID_SZ 12 +#else + /* Enables blinding mode, to prevent timing attacks */ + #define WC_RSA_BLINDING + #define NO_MULTIBYTE_PRINT + + #if defined(WOLFSSL_LIB) + /* The lib */ + #define OPENSSL_EXTRA + #define WOLFSSL_RIPEMD + #define NO_PSK + #define HAVE_EXTENDED_MASTER + #define WOLFSSL_SNIFFER + #define HAVE_SECURE_RENEGOTIATION + + #define HAVE_AESGCM + #define WOLFSSL_SHA384 + #define WOLFSSL_SHA512 + + #define HAVE_SUPPORTED_CURVES + #define HAVE_TLS_EXTENSIONS + + #define HAVE_ECC + #define ECC_SHAMIR + #define ECC_TIMING_RESISTANT + + /* Optional Performance Speedups */ + #if 0 + /* AESNI on x64 */ + #ifdef _WIN64 + #define HAVE_INTEL_RDSEED + #define WOLFSSL_AESNI + #endif + + /* Single Precision Support for RSA/DH 1024/2048/3072 and + * ECC P-256/P-384 */ + #define WOLFSSL_SP + #define WOLFSSL_HAVE_SP_ECC + #define WOLFSSL_HAVE_SP_DH + #define WOLFSSL_HAVE_SP_RSA + + #ifdef _WIN64 + /* Old versions of MASM compiler do not recognize newer + * instructions. */ + #if 0 + #define NO_AVX2_SUPPORT + #define NO_MOVBE_SUPPORT + #endif + #define WOLFSSL_SP_ASM + #define WOLFSSL_SP_X86_64_ASM + #endif + #endif + + #else + /* The servers and clients */ + #define OPENSSL_EXTRA + #define NO_PSK + #endif +#endif /* HAVE_FIPS */ + +#endif /* _WIN_USER_SETTINGS_H_ */