From a6601c1e97c2d0afa58a1274a2c0b93d25dae480 Mon Sep 17 00:00:00 2001 From: Henry Case Date: Tue, 23 Jul 2019 18:57:19 +0100 Subject: [PATCH] Exit if can't set curve ID --- src/conn.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/conn.c b/src/conn.c index a265b04..55b2ee3 100755 --- a/src/conn.c +++ b/src/conn.c @@ -139,10 +139,13 @@ conn_init(Conn *conn) if (param.ssl_groups) { int ssl_err = SSL_set1_curves_list(conn->ssl, param.ssl_groups); - + if (!ssl_err) { + fprintf(stderr, "Requested group unsupported. Exiting...\n"); + exit(0); + } if (DBG > 2) fprintf(stderr, - "core_ssl_connect: set_grtou returned %d\n", + "core_ssl_connect: set_group returned %d\n", ssl_err); } }