summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2019-08-03 20:30:38 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2019-08-03 20:30:38 (EDT)
commit7d6bae151dc6567ae03979929005e8eb8b2e6b1a (patch)
treec2f8c48482cc1326d3ced3e41ff5e02f859e609f /src
parent4ee70fe4a12c869eb94d086e0a6293bd6d293aa5 (diff)
s_client: Don't manually enable curves
They're apparently already enabled.
Diffstat (limited to 'src')
-rw-r--r--src/s_client.c96
1 files changed, 0 insertions, 96 deletions
diff --git a/src/s_client.c b/src/s_client.c
index cdf3df3..e902c29 100644
--- a/src/s_client.c
+++ b/src/s_client.c
@@ -62,99 +62,6 @@ parse_host_port(char *hostport, char **host, char **port)
return true;
}
-#ifdef HAVE_SUPPORTED_CURVES
-static _Bool
-use_curves(WOLFSSL_CTX *ctx)
-{
- static word16 curves[] = {
-#ifdef HAVE_CURVE25519
- WOLFSSL_ECC_X25519,
-#endif
-#ifdef HAVE_ECC
-# if defined(HAVE_ECC160) || defined(HAVE_ALL_CURVES)
-# ifdef HAVE_ECC_KOBLITZ
- WOLFSSL_ECC_SECP160K1,
-# endif
-# ifndef NO_ECC_SECP /* Ugh double negative */
- WOLFSSL_ECC_SECP160R1,
-# endif
-# ifdef HAVE_ECC_SECPR2
- WOLFSSL_ECC_SECP160R2,
-# endif
-# endif
-# if defined(HAVE_ECC192) || defined(HAVE_ALL_CURVES)
-# ifdef HAVE_ECC_KOBLITZ
- WOLFSSL_ECC_SECP192K1,
-# endif
-# ifndef NO_ECC_SECP
- WOLFSSL_ECC_SECP192R1,
-# endif
-# endif
-# if defined(HAVE_ECC224) || defined(HAVE_ALL_CURVES)
-# ifdef HAVE_ECC_KOBLITZ
- WOLFSSL_ECC_SECP224K1,
-# endif
-# ifndef NO_ECC_SECP
- WOLFSSL_ECC_SECP224R1,
-# endif
-# endif
-# if !defined(NO_ECC256) || defined(HAVE_ALL_CURVES)
-# ifdef HAVE_ECC_KOBLITZ
- WOLFSSL_ECC_SECP256K1,
-# endif
-# ifndef NO_ECC_SECP
- WOLFSSL_ECC_SECP256R1,
-# endif
-# ifdef HAVE_ECC_BRAINPOOL
- WOLFSSL_ECC_BRAINPOOLP256R1,
-# endif
-# endif
-# if defined(HAVE_ECC384) || defined(HAVE_ALL_CURVES)
-# ifndef NO_ECC_SECP
- WOLFSSL_ECC_SECP384R1,
-# endif
-# ifdef HAVE_ECC_BRAINPOOL
- WOLFSSL_ECC_BRAINPOOLP384R1,
-# endif
-# endif
-# if defined(HAVE_ECC521) || defined(HAVE_ALL_CURVES)
-# ifndef NO_ECC_SECP
- WOLFSSL_ECC_SECP521R1,
-# endif
-# ifdef HAVE_ECC_BRAINPOOL
- WOLFSSL_ECC_BRAINPOOLP512R1,
-# endif
-# endif
-#endif /* HAVE_ECC */
-#ifdef HAVE_FFDHE_2048
- WOLFSSL_FFDHE_2048,
-#endif
-#ifdef HAVE_FFDHE_3072
- WOLFSSL_FFDHE_3072,
-#endif
-#ifdef HAVE_FFDHE_4096
- WOLFSSL_FFDHE_4096,
-#endif
-#ifdef HAVE_FFDHE_6144
- WOLFSSL_FFDHE_6144,
-#endif
-#ifdef HAVE_FFDHE_8192
- WOLFSSL_FFDHE_8192,
-#endif
- };
- size_t i;
-
- for (i = 0; i < ARRAY_SIZE(curves); ++i) {
- if (wolfSSL_CTX_UseSupportedCurve(ctx, curves[i]) !=
- WOLFSSL_SUCCESS) {
- return false;
- }
- }
-
- return true;
-}
-#endif /* HAVE_SUPPORTED_CURVES */
-
static int
connect_socket(const char *host, const char *port)
{
@@ -346,9 +253,6 @@ s_client(int argc, char **argv)
WOLFSSL_SNI_HOST_NAME, servername,
strlen(servername)) != WOLFSSL_SUCCESS) ||
#endif
-#ifdef HAVE_SUPPORTED_CURVES
- use_curves(ctx) == false ||
-#endif
(ssl = wolfSSL_new(ctx)) == NULL ||
wolfSSL_check_domain_name(ssl, servername) !=
WOLFSSL_SUCCESS