From 5317ff100e7d4c03268c1e2bdbc1f2dc4e5399b9 Mon Sep 17 00:00:00 2001 From: Henry Case Date: Mon, 19 Aug 2019 11:27:42 +0100 Subject: [PATCH] Adds PQ signal --- bssl_perf/Makefile | 2 +- bssl_perf/src/client.c | 2 ++ bssl_perf/src/server.c | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/bssl_perf/Makefile b/bssl_perf/Makefile index 709a086..70a14c0 100644 --- a/bssl_perf/Makefile +++ b/bssl_perf/Makefile @@ -9,7 +9,7 @@ DBG ?= 0 ifeq ($(DBG),1) DEBUG = -DDEBUG -g -O0 else -DEBUG = -O3 +DEBUG = -O3 -g endif CFLAGS = -std=c99 diff --git a/bssl_perf/src/client.c b/bssl_perf/src/client.c index 2f98771..5eacadf 100644 --- a/bssl_perf/src/client.c +++ b/bssl_perf/src/client.c @@ -30,6 +30,7 @@ SSL_CTX *setup_client_ctx(const char* curves) ERR("Enforcing protocol to TLSv1.2"); } + SSL_CTX_enable_pq_experiment_signal(ctx); return ctx; } @@ -76,6 +77,7 @@ void test_Handshake(const char* IP, const char* curves, size_t handshake_nb) { if (err<=0) { ERR("Error connecting SSL err=%d", err); } + //printf("Signal seen: %X\n", SSL_pq_experiment_signal_seen(ssl)); assert(!SSL_session_reused(ssl)); assert(SSL_shutdown(ssl) == 0); assert(SSL_shutdown(ssl) == 1); diff --git a/bssl_perf/src/server.c b/bssl_perf/src/server.c index f2645ad..e7c993c 100644 --- a/bssl_perf/src/server.c +++ b/bssl_perf/src/server.c @@ -201,6 +201,7 @@ int main(int argc, char *argv[]) init(); ctx = setup_server_ctx(argv[1]); + SSL_CTX_enable_pq_experiment_signal(ctx); fd = accept_once(); for(;;) { @@ -210,7 +211,6 @@ int main(int argc, char *argv[]) DBG("Error creating SSL context"); } - SSL_set_fd(ssl, fd); ret = SSL_accept(ssl); if (ret<=0) {