]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Meson: OpenSSL libssl
authorFred Morcos <fred.morcos@open-xchange.com>
Tue, 4 Jul 2023 11:21:32 +0000 (13:21 +0200)
committerFred Morcos <fred.morcos@open-xchange.com>
Wed, 20 Mar 2024 12:28:26 +0000 (13:28 +0100)
meson.build
meson/libssl/meson.build [new file with mode: 0644]
meson_options.txt

index 212de81c31a700d68dd6c1f892d7be4745f96604..eb166f803400f92e1b02e4b0a3657873936553ab 100644 (file)
@@ -34,6 +34,7 @@ subdir('meson/mmap')            # Check for mmap
 subdir('meson/libsodium')       # Libsodium-based signers
 subdir('meson/libdecaf')        # Libdecaf-based signers
 subdir('meson/libcrypto')       # OpenSSL-based signers
+subdir('meson/libssl')          # OpenSSL libssl
 
 # Generate config.h ----------------------------------------------------------------------
 config_h = configure_file(configuration: conf, output: 'config.h')
diff --git a/meson/libssl/meson.build b/meson/libssl/meson.build
new file mode 100644 (file)
index 0000000..873bd0a
--- /dev/null
@@ -0,0 +1,34 @@
+# OpenSSL libssl
+# Inputs: conf deps
+
+opt_libssl = get_option('libssl')
+dep_libssl = dependency('libssl', required: opt_libssl)
+deps += dep_libssl
+
+if dep_libssl.found()
+  funcs = [
+    'SSL_CTX_set_ciphersuites',
+    'SSL_CTX_set_num_tickets',
+    'SSL_CTX_set_keylog_callback',
+    'SSL_CTX_get0_privatekey',
+    'SSL_set_hostflags',
+    'SSL_CTX_set_alpn_protos',
+    'SSL_CTX_set_next_proto_select_cb',
+    'SSL_get0_alpn_selected',
+    'SSL_get0_next_proto_negotiated',
+    'SSL_CTX_set_alpn_select_cb',
+    'SSL_CTX_use_cert_and_key',
+  ]
+
+  foreach func: funcs
+    has = cxx.has_function(func, dependencies: dep_libssl)
+    conf.set10('HAVE_' + func.to_upper(), has, description: 'Whether we have ' + 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')
+
+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')
index ec654aacd3348d07ee7dc368fb9dca0e54582c14..45829cf0b936829dbc0d979073b158f1d0aaccf9 100644 (file)
@@ -5,3 +5,4 @@ option('kiss-rng', type: 'boolean', value: false, description: 'Use the unsafe K
 option('libsodium', type: 'feature', value: 'auto', description: 'Build support for libsodium-based signers')
 option('libdecaf', type: 'feature', value: 'auto', description: 'Build support for libdecaf-based signers')
 option('libcrypto', type: 'string', value: 'auto', description: 'Build support for libcrypto-based signers (auto, yes, no, or a path)')
+option('libssl', type: 'feature', value: 'auto', description: 'Build support for libssl')