mirror of
https://repo.or.cz/socat.git
synced 2024-12-22 15:32:35 +00:00
Guard OPENSSL_INIT_new() for LibreSSL
This commit is contained in:
parent
4565c8e6ac
commit
ffe940041c
5 changed files with 15 additions and 6 deletions
4
CHANGES
4
CHANGES
|
@ -157,6 +157,10 @@ Porting:
|
|||
Solaris derivatives no longer need librt for clock_gettime()
|
||||
Thanks to Andy Fiddaman to directing me to the patch.
|
||||
|
||||
LibreSSL does not have OPENSSL_INIT_new(). This function is now
|
||||
guarded. Socat might build with LibreSSL.
|
||||
Thanks to Orbea for reporting and helping.
|
||||
|
||||
Building:
|
||||
Failure during building documentation, e.g. due to missing Yodl
|
||||
packages, now does not let the build process fail.
|
||||
|
|
|
@ -454,7 +454,10 @@
|
|||
#undef HAVE_OPENSSL_INIT_SSL
|
||||
|
||||
/* Define if you have the SSL_library_init function */
|
||||
#undef HAVE_SSL_LIBRARY_INIT
|
||||
#undef HAVE_SSL_library_init
|
||||
|
||||
/* Define if you have the OPENSSL_INIT_new function */
|
||||
#undef HAVE_OPENSSL_INIT_new
|
||||
|
||||
/* Define if you have the SSLv2 client and server method functions. not in new openssl */
|
||||
#undef HAVE_SSLv2_client_method
|
||||
|
|
|
@ -633,7 +633,7 @@ if test -n "$WITH_OPENSSL"; then
|
|||
fi
|
||||
fi
|
||||
|
||||
AC_CHECK_FUNCS(OPENSSL_init_ssl SSL_library_init)
|
||||
AC_CHECK_FUNCS(OPENSSL_init_ssl SSL_library_init OPENSSL_INIT_new)
|
||||
|
||||
#; sc_cv_have_SSL_library_init='yes'; AC_DEFINE(HAVE_SSL_library_init)
|
||||
#if test -n "$WITH_OPENSSL"; then
|
||||
|
|
4
sslcls.c
4
sslcls.c
|
@ -31,7 +31,7 @@ int sycOPENSSL_init_ssl(uint64_t opts, const OPENSSL_INIT_SETTINGS *settings) {
|
|||
}
|
||||
#endif
|
||||
|
||||
#if !HAVE_OPENSSL_INIT_SSL
|
||||
#if !(defined(HAVE_OPENSSL_INIT_SSL) && defined(HAVE_OPENSSL_INIT_new))
|
||||
void sycSSL_load_error_strings(void) {
|
||||
Debug("SSL_load_error_strings()");
|
||||
SSL_load_error_strings();
|
||||
|
@ -39,7 +39,7 @@ void sycSSL_load_error_strings(void) {
|
|||
}
|
||||
#endif
|
||||
|
||||
#if !HAVE_OPENSSL_INIT_SSL
|
||||
#if HAVE_SSL_library_init
|
||||
int sycSSL_library_init(void) {
|
||||
int result;
|
||||
Debug("SSL_library_init()");
|
||||
|
|
|
@ -962,7 +962,7 @@ int
|
|||
openssl_delete_cert_info();
|
||||
|
||||
/* OpenSSL preparation */
|
||||
#if HAVE_OPENSSL_INIT_SSL
|
||||
#if defined(HAVE_OPENSSL_INIT_SSL) && defined(HAVE_OPENSSL_INIT_new)
|
||||
{
|
||||
uint64_t opts = 0;
|
||||
OPENSSL_INIT_SETTINGS *settings;
|
||||
|
@ -973,12 +973,14 @@ int
|
|||
sycOPENSSL_init_ssl(opts, settings);
|
||||
}
|
||||
#else
|
||||
# if defined(HAVE_SSL_library_init)
|
||||
sycSSL_library_init();
|
||||
# endif
|
||||
OpenSSL_add_all_algorithms();
|
||||
OpenSSL_add_all_ciphers();
|
||||
OpenSSL_add_all_digests();
|
||||
sycSSL_load_error_strings();
|
||||
#endif
|
||||
#endif /* defined(HAVE_OPENSSL_INIT_SSL) && defined(HAVE OPENSSL_INIT_new) */
|
||||
|
||||
/*! actions_to_seed_PRNG();*/
|
||||
|
||||
|
|
Loading…
Reference in a new issue