]> www.infradead.org Git - users/sagi/libnvme.git/commitdiff
build: Update OpenSSL wrap
authorDaniel Wagner <dwagner@suse.de>
Fri, 24 Mar 2023 15:50:48 +0000 (16:50 +0100)
committerDaniel Wagner <wagi@monom.org>
Fri, 24 Mar 2023 16:09:56 +0000 (17:09 +0100)
Update to OpenSSL 3.0.7.

When the fallback was using v1 we never went into the v3 testing. With
updating to v3 we are going to figure out if we have LibreSSL spin of
the API. But cc.has_header_symbol() and cc.has_header() only work on
external library and not on fallbacks.

Thus if we use the fallback (internal) we just know it is API version 3
and don't do any crazy testing.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
meson.build
subprojects/openssl.wrap

index 9b1abe0f9ee9fa3d19ee92d8fb0aa3d473ec7a5a..1b663554b70ced2e1c2dbe43cd0c2d6c59b0b319 100644 (file)
@@ -61,38 +61,43 @@ else
 endif
 conf.set('CONFIG_JSONC', json_c_dep.found(), description: 'Is json-c required?')
 
-# Check for OpenSSL availability
-openssl_dep = dependency('openssl',
-                         version: '>=1.1.0',
-                         required: get_option('openssl'),
-                         fallback : ['openssl', 'libssl_dep'])
-if openssl_dep.found()
-  conf.set('CONFIG_OPENSSL', true,
-           description: 'Is OpenSSL/LibreSSL available?')
+if get_option('openssl').disabled()
+  openssl_dep = dependency('', required: false)
+else
+  openssl_dep = dependency('openssl',
+                           version: '>=1.1.0',
+                           required: get_option('openssl'),
+                           fallback : ['openssl', 'libssl_dep'])
 
-  if openssl_dep.version().version_compare('<2.0.0')
-    api_version = 1
-  endif
+  if openssl_dep.found()
+    if openssl_dep.version().version_compare('<2.0.0')
+      api_version = 1
+    endif
 
-  if openssl_dep.version().version_compare('>=3.0.0')
-    api_version = 3
+    if openssl_dep.version().version_compare('>=3.0.0')
+      api_version = 3
+    endif
 
     # Test for LibreSSL v3.x with incomplete OpenSSL v3 APIs
-    is_libressl = cc.has_header_symbol('openssl/opensslv.h',
-                                       'LIBRESSL_VERSION_NUMBER',
-                                       dependencies: openssl_dep)
-    has_header = cc.has_header('openssl/core_names.h',
-                               dependencies: openssl_dep)
-    if is_libressl and not has_header
-      api_version = 1
+    if openssl_dep.type_name() != 'internal'
+      is_libressl = cc.has_header_symbol('openssl/opensslv.h',
+                                         'LIBRESSL_VERSION_NUMBER',
+                                         dependencies: openssl_dep)
+      has_header = cc.has_header('openssl/core_names.h',
+                                 dependencies: openssl_dep)
+      if is_libressl and not has_header
+        api_version = 1
+      endif
     endif
 
+    conf.set('CONFIG_OPENSSL_@0@'.format(api_version), true,
+             description: 'OpenSSL/LibreSSL API version @0@'.format(api_version))
   endif
-
-  conf.set('CONFIG_OPENSSL_@0@'.format(api_version), true,
-           description: 'OpenSSL/LibreSSL API version @0@'.format(api_version))
 endif
 
+conf.set('CONFIG_OPENSSL', openssl_dep.found(),
+         description: 'Is OpenSSL/LibreSSL available?')
+
 if get_option('libdbus').disabled()
     libdbus_dep = dependency('', required: false)
 else
index ed29373619a9dc244b657c640bc1ae611c64cb6e..1354406738a393441526f47a3e22c85c995860ff 100644 (file)
@@ -1,14 +1,15 @@
 [wrap-file]
-directory = openssl-1.1.1l
-source_url = https://www.openssl.org/source/openssl-1.1.1l.tar.gz
-source_filename = openssl-1.1.1l.tar.gz
-source_hash = 0b7a3e5e59c34827fe0c3a74b7ec8baef302b98fa80088d7f9153aa16fa76bd1
-patch_filename = openssl_1.1.1l-3_patch.zip
-patch_url = https://wrapdb.mesonbuild.com/v2/openssl_1.1.1l-3/get_patch
-patch_hash = a0cb8285cda3ae0e1898b4e88427c19bf245184259f41395010182655f9f8ce6
+directory = openssl-3.0.7
+source_url = https://www.openssl.org/source/openssl-3.0.7.tar.gz
+source_filename = openssl-3.0.7.tar.gz
+source_hash = 83049d042a260e696f62406ac5c08bf706fd84383f945cf21bd61e9ed95c396e
+patch_filename = openssl_3.0.7-2_patch.zip
+patch_url = https://wrapdb.mesonbuild.com/v2/openssl_3.0.7-2/get_patch
+patch_hash = dcc5d21bb602a5ca43bbaf14de858955f748b2abb2c0102ba193bd3964ac13a4
+source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/openssl_3.0.7-2/openssl-3.0.7.tar.gz
+wrapdb_version = 3.0.7-2
 
 [provide]
 libcrypto = libcrypto_dep
 libssl = libssl_dep
 openssl = openssl_dep
-