mirror of
https://repo.or.cz/socat.git
synced 2024-12-22 23:42:34 +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()
|
Solaris derivatives no longer need librt for clock_gettime()
|
||||||
Thanks to Andy Fiddaman to directing me to the patch.
|
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:
|
Building:
|
||||||
Failure during building documentation, e.g. due to missing Yodl
|
Failure during building documentation, e.g. due to missing Yodl
|
||||||
packages, now does not let the build process fail.
|
packages, now does not let the build process fail.
|
||||||
|
|
|
@ -454,7 +454,10 @@
|
||||||
#undef HAVE_OPENSSL_INIT_SSL
|
#undef HAVE_OPENSSL_INIT_SSL
|
||||||
|
|
||||||
/* Define if you have the SSL_library_init function */
|
/* 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 */
|
/* Define if you have the SSLv2 client and server method functions. not in new openssl */
|
||||||
#undef HAVE_SSLv2_client_method
|
#undef HAVE_SSLv2_client_method
|
||||||
|
|
|
@ -633,7 +633,7 @@ if test -n "$WITH_OPENSSL"; then
|
||||||
fi
|
fi
|
||||||
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)
|
#; sc_cv_have_SSL_library_init='yes'; AC_DEFINE(HAVE_SSL_library_init)
|
||||||
#if test -n "$WITH_OPENSSL"; then
|
#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
|
#endif
|
||||||
|
|
||||||
#if !HAVE_OPENSSL_INIT_SSL
|
#if !(defined(HAVE_OPENSSL_INIT_SSL) && defined(HAVE_OPENSSL_INIT_new))
|
||||||
void sycSSL_load_error_strings(void) {
|
void sycSSL_load_error_strings(void) {
|
||||||
Debug("SSL_load_error_strings()");
|
Debug("SSL_load_error_strings()");
|
||||||
SSL_load_error_strings();
|
SSL_load_error_strings();
|
||||||
|
@ -39,7 +39,7 @@ void sycSSL_load_error_strings(void) {
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !HAVE_OPENSSL_INIT_SSL
|
#if HAVE_SSL_library_init
|
||||||
int sycSSL_library_init(void) {
|
int sycSSL_library_init(void) {
|
||||||
int result;
|
int result;
|
||||||
Debug("SSL_library_init()");
|
Debug("SSL_library_init()");
|
||||||
|
|
|
@ -962,7 +962,7 @@ int
|
||||||
openssl_delete_cert_info();
|
openssl_delete_cert_info();
|
||||||
|
|
||||||
/* OpenSSL preparation */
|
/* OpenSSL preparation */
|
||||||
#if HAVE_OPENSSL_INIT_SSL
|
#if defined(HAVE_OPENSSL_INIT_SSL) && defined(HAVE_OPENSSL_INIT_new)
|
||||||
{
|
{
|
||||||
uint64_t opts = 0;
|
uint64_t opts = 0;
|
||||||
OPENSSL_INIT_SETTINGS *settings;
|
OPENSSL_INIT_SETTINGS *settings;
|
||||||
|
@ -973,12 +973,14 @@ int
|
||||||
sycOPENSSL_init_ssl(opts, settings);
|
sycOPENSSL_init_ssl(opts, settings);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
# if defined(HAVE_SSL_library_init)
|
||||||
sycSSL_library_init();
|
sycSSL_library_init();
|
||||||
|
# endif
|
||||||
OpenSSL_add_all_algorithms();
|
OpenSSL_add_all_algorithms();
|
||||||
OpenSSL_add_all_ciphers();
|
OpenSSL_add_all_ciphers();
|
||||||
OpenSSL_add_all_digests();
|
OpenSSL_add_all_digests();
|
||||||
sycSSL_load_error_strings();
|
sycSSL_load_error_strings();
|
||||||
#endif
|
#endif /* defined(HAVE_OPENSSL_INIT_SSL) && defined(HAVE OPENSSL_INIT_new) */
|
||||||
|
|
||||||
/*! actions_to_seed_PRNG();*/
|
/*! actions_to_seed_PRNG();*/
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue