summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorjsing <>2014-10-15 14:08:26 +0000
committerjsing <>2014-10-15 14:08:26 +0000
commit63c863c8cc1f3a95888709f9528840589a9e567f (patch)
tree3f0ee31ae094fbf2f4b78ea39e25d05223b1a1d2 /src/lib
parent060df266399eaa119161ae1d0dd66991023ce805 (diff)
downloadopenbsd-63c863c8cc1f3a95888709f9528840589a9e567f.tar.gz
openbsd-63c863c8cc1f3a95888709f9528840589a9e567f.tar.bz2
openbsd-63c863c8cc1f3a95888709f9528840589a9e567f.zip
Set SSL_OP_SINGLE_ECDH_USE before calling SSL_CTX_set_tmp_ecdh() - this
avoids generating an EC key pair that will never be used.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/libressl/ressl_server.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libressl/ressl_server.c b/src/lib/libressl/ressl_server.c
index 1d5ee2a3f9..4783674a0b 100644
--- a/src/lib/libressl/ressl_server.c
+++ b/src/lib/libressl/ressl_server.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ressl_server.c,v 1.10 2014/10/03 14:09:09 jsing Exp $ */ 1/* $OpenBSD: ressl_server.c,v 1.11 2014/10/15 14:08:26 jsing Exp $ */
2/* 2/*
3 * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> 3 * Copyright (c) 2014 Joel Sing <jsing@openbsd.org>
4 * 4 *
@@ -70,8 +70,8 @@ ressl_configure_server(struct ressl *ctx)
70 ressl_set_error(ctx, "failed to set ECDH curve"); 70 ressl_set_error(ctx, "failed to set ECDH curve");
71 goto err; 71 goto err;
72 } 72 }
73 SSL_CTX_set_tmp_ecdh(ctx->ssl_ctx, ecdh_key);
74 SSL_CTX_set_options(ctx->ssl_ctx, SSL_OP_SINGLE_ECDH_USE); 73 SSL_CTX_set_options(ctx->ssl_ctx, SSL_OP_SINGLE_ECDH_USE);
74 SSL_CTX_set_tmp_ecdh(ctx->ssl_ctx, ecdh_key);
75 EC_KEY_free(ecdh_key); 75 EC_KEY_free(ecdh_key);
76 } 76 }
77 77