summaryrefslogtreecommitdiff
path: root/src/lib/libressl/ressl.c
diff options
context:
space:
mode:
authorjsing <>2014-09-29 15:31:38 +0000
committerjsing <>2014-09-29 15:31:38 +0000
commitd6e71b083fa61b1862bf1a93af6a8628d87a3c72 (patch)
treeede825387bedc401b11c74d25733718e1c84df5e /src/lib/libressl/ressl.c
parent0211c1396ff6d4dc401cabef56c2af3202f043f9 (diff)
downloadopenbsd-d6e71b083fa61b1862bf1a93af6a8628d87a3c72.tar.gz
openbsd-d6e71b083fa61b1862bf1a93af6a8628d87a3c72.tar.bz2
openbsd-d6e71b083fa61b1862bf1a93af6a8628d87a3c72.zip
Move cipher configuration handling to the shared SSL configuration function
so that applies to both the ressl client and server.
Diffstat (limited to 'src/lib/libressl/ressl.c')
-rw-r--r--src/lib/libressl/ressl.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/lib/libressl/ressl.c b/src/lib/libressl/ressl.c
index 516afa53d6..b85fe04415 100644
--- a/src/lib/libressl/ressl.c
+++ b/src/lib/libressl/ressl.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ressl.c,v 1.15 2014/09/29 15:11:29 jsing Exp $ */ 1/* $OpenBSD: ressl.c,v 1.16 2014/09/29 15:31:38 jsing Exp $ */
2/* 2/*
3 * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> 3 * Copyright (c) 2014 Joel Sing <jsing@openbsd.org>
4 * 4 *
@@ -182,7 +182,18 @@ ressl_configure_ssl(struct ressl *ctx)
182 if ((ctx->config->protocols & RESSL_PROTOCOL_TLSv1_2) == 0) 182 if ((ctx->config->protocols & RESSL_PROTOCOL_TLSv1_2) == 0)
183 SSL_CTX_set_options(ctx->ssl_ctx, SSL_OP_NO_TLSv1_2); 183 SSL_CTX_set_options(ctx->ssl_ctx, SSL_OP_NO_TLSv1_2);
184 184
185 if (ctx->config->ciphers != NULL) {
186 if (SSL_CTX_set_cipher_list(ctx->ssl_ctx,
187 ctx->config->ciphers) != 1) {
188 ressl_set_error(ctx, "failed to set ciphers");
189 goto err;
190 }
191 }
192
185 return (0); 193 return (0);
194
195err:
196 return (-1);
186} 197}
187 198
188void 199void