From 362e32818075a58e417bf4dd0c91fabb39078fc9 Mon Sep 17 00:00:00 2001 From: John Safranek Date: Wed, 19 Aug 2020 10:46:03 -0700 Subject: [PATCH] NTRU fixes 1. When configuring for NTRU, enable static RSA. 2. The echoserver should not try to use NTRU with TLSv1.3. --- configure.ac | 2 +- examples/echoserver/echoserver.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 1f624d106..154feca82 100644 --- a/configure.ac +++ b/configure.ac @@ -2970,7 +2970,7 @@ AC_ARG_WITH([ntru], AC_MSG_RESULT([yes]) fi - AM_CFLAGS="$AM_CFLAGS -DHAVE_NTRU -DHAVE_TLS_EXTENSIONS" + AM_CFLAGS="$AM_CFLAGS -DHAVE_NTRU -DHAVE_TLS_EXTENSIONS -DWOLFSSL_STATIC_RSA" ENABLED_NTRU="yes" ] ) diff --git a/examples/echoserver/echoserver.c b/examples/echoserver/echoserver.c index 1ed4d1fe9..93996a11a 100644 --- a/examples/echoserver/echoserver.c +++ b/examples/echoserver/echoserver.c @@ -138,7 +138,8 @@ THREAD_RETURN CYASSL_THREAD echoserver_test(void* args) #if defined(CYASSL_DTLS) method = CyaDTLSv1_2_server_method(); #elif !defined(NO_TLS) - #if defined(WOLFSSL_TLS13) && defined(WOLFSSL_SNIFFER) + #if (defined(WOLFSSL_TLS13) && defined(WOLFSSL_SNIFFER)) || \ + defined(HAVE_NTRU) method = CyaTLSv1_2_server_method(); #else method = CyaSSLv23_server_method();