summaryrefslogtreecommitdiff
path: root/src/lib/libssl/ssl_lib.c
diff options
context:
space:
mode:
authorjsing <>2014-12-14 14:34:43 +0000
committerjsing <>2014-12-14 14:34:43 +0000
commitb303e332970ffd772a791a3a52b851697dd671bc (patch)
treed5225f7d83af44c76a58e948450d586798882cf9 /src/lib/libssl/ssl_lib.c
parent8c353d1cc8300944b77e9bee6d4be75bd546eec1 (diff)
downloadopenbsd-b303e332970ffd772a791a3a52b851697dd671bc.tar.gz
openbsd-b303e332970ffd772a791a3a52b851697dd671bc.tar.bz2
openbsd-b303e332970ffd772a791a3a52b851697dd671bc.zip
unifdef OPENSSL_NO_NEXTPROTONEG, which is one of the last standing #ifndef
mazes in libssl. NPN is being replaced by ALPN, however it is still going to be around for a while yet. ok miod@
Diffstat (limited to 'src/lib/libssl/ssl_lib.c')
-rw-r--r--src/lib/libssl/ssl_lib.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/lib/libssl/ssl_lib.c b/src/lib/libssl/ssl_lib.c
index 4369ba587a..e809ff0bc0 100644
--- a/src/lib/libssl/ssl_lib.c
+++ b/src/lib/libssl/ssl_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssl_lib.c,v 1.92 2014/12/10 15:36:47 jsing Exp $ */ 1/* $OpenBSD: ssl_lib.c,v 1.93 2014/12/14 14:34:43 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -333,9 +333,7 @@ SSL_new(SSL_CTX *ctx)
333 s->tlsext_ocsp_resplen = -1; 333 s->tlsext_ocsp_resplen = -1;
334 CRYPTO_add(&ctx->references, 1, CRYPTO_LOCK_SSL_CTX); 334 CRYPTO_add(&ctx->references, 1, CRYPTO_LOCK_SSL_CTX);
335 s->initial_ctx = ctx; 335 s->initial_ctx = ctx;
336# ifndef OPENSSL_NO_NEXTPROTONEG
337 s->next_proto_negotiated = NULL; 336 s->next_proto_negotiated = NULL;
338# endif
339 337
340 if (s->ctx->alpn_client_proto_list != NULL) { 338 if (s->ctx->alpn_client_proto_list != NULL) {
341 s->alpn_client_proto_list = 339 s->alpn_client_proto_list =
@@ -560,9 +558,7 @@ SSL_free(SSL *s)
560 SSL_CTX_free(s->ctx); 558 SSL_CTX_free(s->ctx);
561 559
562 560
563#ifndef OPENSSL_NO_NEXTPROTONEG
564 free(s->next_proto_negotiated); 561 free(s->next_proto_negotiated);
565#endif
566 free(s->alpn_client_proto_list); 562 free(s->alpn_client_proto_list);
567 563
568#ifndef OPENSSL_NO_SRTP 564#ifndef OPENSSL_NO_SRTP
@@ -1509,7 +1505,6 @@ SSL_get_servername_type(const SSL *s)
1509 return (-1); 1505 return (-1);
1510} 1506}
1511 1507
1512# ifndef OPENSSL_NO_NEXTPROTONEG
1513/* 1508/*
1514 * SSL_select_next_proto implements the standard protocol selection. It is 1509 * SSL_select_next_proto implements the standard protocol selection. It is
1515 * expected that this function is called from the callback set by 1510 * expected that this function is called from the callback set by
@@ -1640,7 +1635,6 @@ SSL_CTX_set_next_proto_select_cb(SSL_CTX *ctx, int (*cb) (SSL *s,
1640 ctx->next_proto_select_cb = cb; 1635 ctx->next_proto_select_cb = cb;
1641 ctx->next_proto_select_cb_arg = arg; 1636 ctx->next_proto_select_cb_arg = arg;
1642} 1637}
1643# endif
1644 1638
1645/* 1639/*
1646 * SSL_CTX_set_alpn_protos sets the ALPN protocol list to the specified 1640 * SSL_CTX_set_alpn_protos sets the ALPN protocol list to the specified
@@ -1879,10 +1873,8 @@ SSL_CTX_new(const SSL_METHOD *meth)
1879 ret->tlsext_status_cb = 0; 1873 ret->tlsext_status_cb = 0;
1880 ret->tlsext_status_arg = NULL; 1874 ret->tlsext_status_arg = NULL;
1881 1875
1882# ifndef OPENSSL_NO_NEXTPROTONEG
1883 ret->next_protos_advertised_cb = 0; 1876 ret->next_protos_advertised_cb = 0;
1884 ret->next_proto_select_cb = 0; 1877 ret->next_proto_select_cb = 0;
1885# endif
1886#ifndef OPENSSL_NO_ENGINE 1878#ifndef OPENSSL_NO_ENGINE
1887 ret->client_cert_engine = NULL; 1879 ret->client_cert_engine = NULL;
1888#ifdef OPENSSL_SSL_CLIENT_ENGINE_AUTO 1880#ifdef OPENSSL_SSL_CLIENT_ENGINE_AUTO