summaryrefslogtreecommitdiff
path: root/src/lib/libressl/ressl_client.c
diff options
context:
space:
mode:
authorjsing <>2014-09-29 15:11:29 +0000
committerjsing <>2014-09-29 15:11:29 +0000
commit0211c1396ff6d4dc401cabef56c2af3202f043f9 (patch)
tree50bbaa9e38aefb427b0f0162ccd9eefee6d46b85 /src/lib/libressl/ressl_client.c
parentc9beabec633f1cc45215bc550b7370c475785a2b (diff)
downloadopenbsd-0211c1396ff6d4dc401cabef56c2af3202f043f9.tar.gz
openbsd-0211c1396ff6d4dc401cabef56c2af3202f043f9.tar.bz2
openbsd-0211c1396ff6d4dc401cabef56c2af3202f043f9.zip
Add an option that allows the enabled SSL protocols to be explicitly
configured. Discussed with several. ok bcook@
Diffstat (limited to 'src/lib/libressl/ressl_client.c')
-rw-r--r--src/lib/libressl/ressl_client.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lib/libressl/ressl_client.c b/src/lib/libressl/ressl_client.c
index 5969a104f7..8723a35ae0 100644
--- a/src/lib/libressl/ressl_client.c
+++ b/src/lib/libressl/ressl_client.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ressl_client.c,v 1.3 2014/08/05 12:46:16 jsing Exp $ */ 1/* $OpenBSD: ressl_client.c,v 1.4 2014/09/29 15:11:29 jsing Exp $ */
2/* 2/*
3 * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> 3 * Copyright (c) 2014 Joel Sing <jsing@openbsd.org>
4 * 4 *
@@ -134,11 +134,14 @@ ressl_connect_socket(struct ressl *ctx, int socket, const char *hostname)
134 134
135 ctx->socket = socket; 135 ctx->socket = socket;
136 136
137 /* XXX - add a configuration option to control versions. */
138 if ((ctx->ssl_ctx = SSL_CTX_new(SSLv23_client_method())) == NULL) { 137 if ((ctx->ssl_ctx = SSL_CTX_new(SSLv23_client_method())) == NULL) {
139 ressl_set_error(ctx, "ssl context failure"); 138 ressl_set_error(ctx, "ssl context failure");
140 goto err; 139 goto err;
141 } 140 }
141
142 if (ressl_configure_ssl(ctx) != 0)
143 goto err;
144
142 if (ctx->config->verify) { 145 if (ctx->config->verify) {
143 if (hostname == NULL) { 146 if (hostname == NULL) {
144 ressl_set_error(ctx, "server name not specified"); 147 ressl_set_error(ctx, "server name not specified");