diff options
author | jsing <> | 2017-01-24 13:34:26 +0000 |
---|---|---|
committer | jsing <> | 2017-01-24 13:34:26 +0000 |
commit | 72a17d80e1722d32d76a5acd4cf46bbc3a05f610 (patch) | |
tree | 4a85f3ba58507a09f729b2de1727c6624a6fb21c /src | |
parent | 85312d8b04e54852eeb18ff7259df43ab0bc0564 (diff) | |
download | openbsd-72a17d80e1722d32d76a5acd4cf46bbc3a05f610.tar.gz openbsd-72a17d80e1722d32d76a5acd4cf46bbc3a05f610.tar.bz2 openbsd-72a17d80e1722d32d76a5acd4cf46bbc3a05f610.zip |
Within libssl a SSL_CTX * is referred to as a ctx - fix this for
SSL_CTX_free().
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libssl/ssl_lib.c | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/src/lib/libssl/ssl_lib.c b/src/lib/libssl/ssl_lib.c index bc04ea7f9c..21d2d231d1 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.145 2017/01/24 09:03:21 jsing Exp $ */ | 1 | /* $OpenBSD: ssl_lib.c,v 1.146 2017/01/24 13:34:26 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 | * |
@@ -1975,19 +1975,19 @@ err2: | |||
1975 | } | 1975 | } |
1976 | 1976 | ||
1977 | void | 1977 | void |
1978 | SSL_CTX_free(SSL_CTX *a) | 1978 | SSL_CTX_free(SSL_CTX *ctx) |
1979 | { | 1979 | { |
1980 | int i; | 1980 | int i; |
1981 | 1981 | ||
1982 | if (a == NULL) | 1982 | if (ctx == NULL) |
1983 | return; | 1983 | return; |
1984 | 1984 | ||
1985 | i = CRYPTO_add(&a->references, -1, CRYPTO_LOCK_SSL_CTX); | 1985 | i = CRYPTO_add(&ctx->references, -1, CRYPTO_LOCK_SSL_CTX); |
1986 | if (i > 0) | 1986 | if (i > 0) |
1987 | return; | 1987 | return; |
1988 | 1988 | ||
1989 | if (a->param) | 1989 | if (ctx->param) |
1990 | X509_VERIFY_PARAM_free(a->param); | 1990 | X509_VERIFY_PARAM_free(ctx->param); |
1991 | 1991 | ||
1992 | /* | 1992 | /* |
1993 | * Free internal session cache. However: the remove_cb() may reference | 1993 | * Free internal session cache. However: the remove_cb() may reference |
@@ -1998,41 +1998,41 @@ SSL_CTX_free(SSL_CTX *a) | |||
1998 | * free ex_data, then finally free the cache. | 1998 | * free ex_data, then finally free the cache. |
1999 | * (See ticket [openssl.org #212].) | 1999 | * (See ticket [openssl.org #212].) |
2000 | */ | 2000 | */ |
2001 | if (a->internal->sessions != NULL) | 2001 | if (ctx->internal->sessions != NULL) |
2002 | SSL_CTX_flush_sessions(a, 0); | 2002 | SSL_CTX_flush_sessions(ctx, 0); |
2003 | 2003 | ||
2004 | CRYPTO_free_ex_data(CRYPTO_EX_INDEX_SSL_CTX, a, &a->internal->ex_data); | 2004 | CRYPTO_free_ex_data(CRYPTO_EX_INDEX_SSL_CTX, ctx, &ctx->internal->ex_data); |
2005 | 2005 | ||
2006 | if (a->internal->sessions != NULL) | 2006 | if (ctx->internal->sessions != NULL) |
2007 | lh_SSL_SESSION_free(a->internal->sessions); | 2007 | lh_SSL_SESSION_free(ctx->internal->sessions); |
2008 | 2008 | ||
2009 | if (a->cert_store != NULL) | 2009 | if (ctx->cert_store != NULL) |
2010 | X509_STORE_free(a->cert_store); | 2010 | X509_STORE_free(ctx->cert_store); |
2011 | sk_SSL_CIPHER_free(a->cipher_list); | 2011 | sk_SSL_CIPHER_free(ctx->cipher_list); |
2012 | sk_SSL_CIPHER_free(a->internal->cipher_list_by_id); | 2012 | sk_SSL_CIPHER_free(ctx->internal->cipher_list_by_id); |
2013 | ssl_cert_free(a->internal->cert); | 2013 | ssl_cert_free(ctx->internal->cert); |
2014 | if (a->internal->client_CA != NULL) | 2014 | if (ctx->internal->client_CA != NULL) |
2015 | sk_X509_NAME_pop_free(a->internal->client_CA, X509_NAME_free); | 2015 | sk_X509_NAME_pop_free(ctx->internal->client_CA, X509_NAME_free); |
2016 | if (a->extra_certs != NULL) | 2016 | if (ctx->extra_certs != NULL) |
2017 | sk_X509_pop_free(a->extra_certs, X509_free); | 2017 | sk_X509_pop_free(ctx->extra_certs, X509_free); |
2018 | 2018 | ||
2019 | #ifndef OPENSSL_NO_SRTP | 2019 | #ifndef OPENSSL_NO_SRTP |
2020 | if (a->internal->srtp_profiles) | 2020 | if (ctx->internal->srtp_profiles) |
2021 | sk_SRTP_PROTECTION_PROFILE_free(a->internal->srtp_profiles); | 2021 | sk_SRTP_PROTECTION_PROFILE_free(ctx->internal->srtp_profiles); |
2022 | #endif | 2022 | #endif |
2023 | 2023 | ||
2024 | #ifndef OPENSSL_NO_ENGINE | 2024 | #ifndef OPENSSL_NO_ENGINE |
2025 | if (a->internal->client_cert_engine) | 2025 | if (ctx->internal->client_cert_engine) |
2026 | ENGINE_finish(a->internal->client_cert_engine); | 2026 | ENGINE_finish(ctx->internal->client_cert_engine); |
2027 | #endif | 2027 | #endif |
2028 | 2028 | ||
2029 | free(a->internal->tlsext_ecpointformatlist); | 2029 | free(ctx->internal->tlsext_ecpointformatlist); |
2030 | free(a->internal->tlsext_supportedgroups); | 2030 | free(ctx->internal->tlsext_supportedgroups); |
2031 | 2031 | ||
2032 | free(a->internal->alpn_client_proto_list); | 2032 | free(ctx->internal->alpn_client_proto_list); |
2033 | 2033 | ||
2034 | free(a->internal); | 2034 | free(ctx->internal); |
2035 | free(a); | 2035 | free(ctx); |
2036 | } | 2036 | } |
2037 | 2037 | ||
2038 | void | 2038 | void |