1
0
mirror of http://git.haproxy.org/git/haproxy.git/ synced 2024-12-18 17:34:45 +00:00

MINOR: ssl: define SSL_CTX_set1_curves_list to itself on BoringSSL

OpenSSL 1.0.2 and onwards define SSL_CTX_set1_curves_list which is both a
function and a macro. OpenSSL 1.0.2 to 1.1.0 define SSL_CTRL_SET_CURVES_LIST
as a macro, which disappeared from 1.1.1. BoringSSL only has that one and
not the former macro but it does have the function. Let's keep the test on
the macro matching the function name by defining the macro to itself when
needed.
This commit is contained in:
Willy Tarreau 2020-11-05 15:03:45 +01:00
parent 99e0bb997f
commit 5b8af1e30c

View File

@ -383,5 +383,15 @@ static inline void SSL_CTX_up_ref(SSL_CTX *ctx)
#define EVP_MD_CTX_free EVP_MD_CTX_destroy
#endif
/* OpenSSL 1.0.2 and onwards define SSL_CTX_set1_curves_list which is both a
* function and a macro. OpenSSL 1.0.2 to 1.1.0 define SSL_CTRL_SET_CURVES_LIST
* as a macro, which disappeared from 1.1.1. BoringSSL only has that one and
* not the former macro but it does have the function. Let's keep the test on
* the macro matching the function name.
*/
#if !defined(SSL_CTX_set1_curves_list) && defined(SSL_CTRL_SET_CURVES_LIST)
#define SSL_CTX_set1_curves_list SSL_CTX_set1_curves_list
#endif
#endif /* USE_OPENSSL */
#endif /* _HAPROXY_OPENSSL_COMPAT_H */