mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2025-12-26 06:32:44 +00:00
reds: Fix SSL_CTX_set_ecdh_auto call for some old OpenSSL
SSL_CTX_set_ecdh_auto is not defined in some old versions of OpenSSL Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Jeremy White <jwhite@codeweavers.com>
This commit is contained in:
parent
89b0a07c72
commit
214736dce6
@ -209,6 +209,15 @@ AC_SUBST(SSL_CFLAGS)
|
||||
AC_SUBST(SSL_LIBS)
|
||||
AS_VAR_APPEND([SPICE_REQUIRES], [" openssl"])
|
||||
|
||||
save_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS $SSL_CFLAGS"
|
||||
AC_CHECK_DECLS([SSL_CTX_set_ecdh_auto], [], [], [
|
||||
AC_INCLUDES_DEFAULT
|
||||
#include <openssl/err.h>
|
||||
#include <openssl/ssl.h>
|
||||
])
|
||||
CFLAGS="$save_CFLAGS"
|
||||
|
||||
AC_CHECK_LIB(jpeg, jpeg_destroy_decompress,
|
||||
AC_MSG_CHECKING([for jpeglib.h])
|
||||
AC_TRY_CPP(
|
||||
|
||||
@ -2937,7 +2937,9 @@ static int reds_init_ssl(RedsState *reds)
|
||||
}
|
||||
|
||||
SSL_CTX_set_options(reds->ctx, ssl_options);
|
||||
#if HAVE_DECL_SSL_CTX_SET_ECDH_AUTO || defined(SSL_CTX_set_ecdh_auto)
|
||||
SSL_CTX_set_ecdh_auto(reds->ctx, 1);
|
||||
#endif
|
||||
|
||||
/* Load our keys and certificates*/
|
||||
return_code = SSL_CTX_use_certificate_chain_file(reds->ctx, reds->config->ssl_parameters.certs_file);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user