Fix build with older OpenSSL versions
Check that SSL_clear_options and SSL_CTX_clear_options are defined before using them to avoid compilation failures with older OpenSSL versions that did not include these macros. Signed-hostap: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
54d4ba427c
commit
d53d2596e4
1 changed files with 4 additions and 0 deletions
|
@ -3018,8 +3018,10 @@ int tls_connection_set_params(void *tls_ctx, struct tls_connection *conn,
|
||||||
#ifdef SSL_OP_NO_TICKET
|
#ifdef SSL_OP_NO_TICKET
|
||||||
if (params->flags & TLS_CONN_DISABLE_SESSION_TICKET)
|
if (params->flags & TLS_CONN_DISABLE_SESSION_TICKET)
|
||||||
SSL_set_options(conn->ssl, SSL_OP_NO_TICKET);
|
SSL_set_options(conn->ssl, SSL_OP_NO_TICKET);
|
||||||
|
#ifdef SSL_clear_options
|
||||||
else
|
else
|
||||||
SSL_clear_options(conn->ssl, SSL_OP_NO_TICKET);
|
SSL_clear_options(conn->ssl, SSL_OP_NO_TICKET);
|
||||||
|
#endif /* SSL_clear_options */
|
||||||
#endif /* SSL_OP_NO_TICKET */
|
#endif /* SSL_OP_NO_TICKET */
|
||||||
|
|
||||||
#ifdef HAVE_OCSP
|
#ifdef HAVE_OCSP
|
||||||
|
@ -3068,8 +3070,10 @@ int tls_global_set_params(void *tls_ctx,
|
||||||
#ifdef SSL_OP_NO_TICKET
|
#ifdef SSL_OP_NO_TICKET
|
||||||
if (params->flags & TLS_CONN_DISABLE_SESSION_TICKET)
|
if (params->flags & TLS_CONN_DISABLE_SESSION_TICKET)
|
||||||
SSL_CTX_set_options(ssl_ctx, SSL_OP_NO_TICKET);
|
SSL_CTX_set_options(ssl_ctx, SSL_OP_NO_TICKET);
|
||||||
|
#ifdef SSL_CTX_clear_options
|
||||||
else
|
else
|
||||||
SSL_CTX_clear_options(ssl_ctx, SSL_OP_NO_TICKET);
|
SSL_CTX_clear_options(ssl_ctx, SSL_OP_NO_TICKET);
|
||||||
|
#endif /* SSL_clear_options */
|
||||||
#endif /* SSL_OP_NO_TICKET */
|
#endif /* SSL_OP_NO_TICKET */
|
||||||
|
|
||||||
#ifdef HAVE_OCSP
|
#ifdef HAVE_OCSP
|
||||||
|
|
Loading…
Reference in a new issue