diff options
Diffstat (limited to 'src/lib/libtls/tls_server.c')
| -rw-r--r-- | src/lib/libtls/tls_server.c | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/src/lib/libtls/tls_server.c b/src/lib/libtls/tls_server.c index f13c9db083..bba15aae7e 100644 --- a/src/lib/libtls/tls_server.c +++ b/src/lib/libtls/tls_server.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: tls_server.c,v 1.20 2016/08/01 17:32:19 jsing Exp $ */ | 1 | /* $OpenBSD: tls_server.c,v 1.21 2016/08/02 07:47:11 jsing Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> |
| 4 | * | 4 | * |
| @@ -48,20 +48,6 @@ tls_server_conn(struct tls *ctx) | |||
| 48 | return (conn_ctx); | 48 | return (conn_ctx); |
| 49 | } | 49 | } |
| 50 | 50 | ||
| 51 | static int | ||
| 52 | tls_server_alpn_cb(SSL *ssl, const unsigned char **out, unsigned char *outlen, | ||
| 53 | const unsigned char *in, unsigned int inlen, void *arg) | ||
| 54 | { | ||
| 55 | struct tls *ctx = arg; | ||
| 56 | |||
| 57 | if (SSL_select_next_proto((unsigned char**)out, outlen, | ||
| 58 | ctx->config->alpn, ctx->config->alpn_len, in, inlen) == | ||
| 59 | OPENSSL_NPN_NEGOTIATED) | ||
| 60 | return (SSL_TLSEXT_ERR_OK); | ||
| 61 | |||
| 62 | return (SSL_TLSEXT_ERR_NOACK); | ||
| 63 | } | ||
| 64 | |||
| 65 | int | 51 | int |
| 66 | tls_configure_server(struct tls *ctx) | 52 | tls_configure_server(struct tls *ctx) |
| 67 | { | 53 | { |
| @@ -85,10 +71,6 @@ tls_configure_server(struct tls *ctx) | |||
| 85 | goto err; | 71 | goto err; |
| 86 | } | 72 | } |
| 87 | 73 | ||
| 88 | if (ctx->config->alpn != NULL) | ||
| 89 | SSL_CTX_set_alpn_select_cb(ctx->ssl_ctx, tls_server_alpn_cb, | ||
| 90 | ctx); | ||
| 91 | |||
| 92 | if (ctx->config->dheparams == -1) | 74 | if (ctx->config->dheparams == -1) |
| 93 | SSL_CTX_set_dh_auto(ctx->ssl_ctx, 1); | 75 | SSL_CTX_set_dh_auto(ctx->ssl_ctx, 1); |
| 94 | else if (ctx->config->dheparams == 1024) | 76 | else if (ctx->config->dheparams == 1024) |
