From: Fred Morcos Date: Wed, 16 Aug 2023 12:14:02 +0000 (+0200) Subject: Meson: Cleanup libssl module X-Git-Tag: rec-5.1.0-alpha1~80^2~212 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5eb0271433b4b48f24b4624a628495b090e4e0f8;p=thirdparty%2Fpdns.git Meson: Cleanup libssl module --- diff --git a/meson.build b/meson.build index ed8ac40267..e6d5f370ab 100644 --- a/meson.build +++ b/meson.build @@ -191,6 +191,7 @@ deps = [ dep_libsodium, dep_libdecaf, dep_libcrypto, + dep_libssl, dep_gss_tsig, dep_pkcs11, dep_yahttp, diff --git a/meson/libssl/meson.build b/meson/libssl/meson.build index e6b274cc99..d852add885 100644 --- a/meson/libssl/meson.build +++ b/meson/libssl/meson.build @@ -1,9 +1,5 @@ -# OpenSSL libssl -# Inputs: conf deps - opt_libssl = get_option('tls-libssl') dep_libssl = dependency('libssl', required: opt_libssl) -deps += dep_libssl if dep_libssl.found() funcs = [ @@ -22,13 +18,20 @@ if dep_libssl.found() foreach func: funcs has = cxx.has_function(func, dependencies: dep_libssl) - conf.set10('HAVE_' + func.to_upper(), has, description: 'Whether we have ' + func) + conf.set('HAVE_' + func.to_upper(), has, description: 'Have OpenSSL libssl ' + func) endforeach endif -has = cxx.has_header_symbol('openssl/ssl.h', 'SSL_CTX_set_min_proto_version', dependencies: dep_libssl) -conf.set10('HAVE_SSL_CTX_SET_MIN_PROTO_VERSION', has, description: 'Whether we have SSL_CTX_set_min_proto_version') +has = cxx.has_header_symbol( + 'openssl/ssl.h', + 'SSL_CTX_set_min_proto_version', + dependencies: dep_libssl, +) +conf.set( + 'HAVE_SSL_CTX_SET_MIN_PROTO_VERSION', + has, + description: 'Have OpenSSL libssl SSL_CTX_set_min_proto_version', +) -deps += dep_libssl -conf.set10('HAVE_LIBSSL', dep_libssl.found(), description: 'Whether we support OpenSSL libssl') -summary('OpenSSL libssl', dep_libssl.found(), bool_yn: dep_libssl.found() or not opt_libssl.auto(), section: 'Configuration') +conf.set('HAVE_LIBSSL', dep_libssl.found(), description: 'OpenSSL libssl') +summary('OpenSSL libssl', dep_libssl.found(), bool_yn: true, section: 'Crypto') diff --git a/meson_options.txt b/meson_options.txt index 42c4d97ecd..5d31f485a2 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -6,10 +6,10 @@ option('signers-libsodium', type: 'feature', value: 'auto', description: 'Enable option('signers-libdecaf', type: 'feature', value: 'auto', description: 'Enable libdecaf-based signers') option('signers-libcrypto', type: 'feature', value: 'auto', description: 'Enable OpenSSL libcrypto-based signers)') option('signers-libcrypto-path', type: 'string', value: '', description: 'Custom path to find OpenSSL libcrypto') -option('tls-libssl', type: 'feature', value: 'auto', description: 'Enable OpenSSL-based TLS') option('tls-gnutls', type: 'feature', value: 'auto', description: 'Enable GnuTLS-based TLS') option('dns-over-tls', type: 'boolean', value: false, description: 'Enable DNS over TLS (requires GnuTLS or OpenSSL)') option('ipcipher', type: 'feature', value: 'auto', description: 'Enable ipcipher (requires libcrypto)') +option('tls-libssl', type: 'feature', value: 'auto', description: 'OpenSSL-based TLS') option('unit-tests', type: 'boolean', value: false, description: 'Build and run unit tests') option('unit-tests-backends', type: 'boolean', value: false, description: 'Build and run backend unit tests') option('reproducible', type: 'boolean', value: false, description: 'Create reproducible builds (for distribution maintainers, makes debugging more difficult)')