Skip to content

Commit 8c507db

Browse files
dwsuseigaw
authored andcommitted
build: Update OpenSSL wrap
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 <[email protected]>
1 parent 9285f9f commit 8c507db

2 files changed

Lines changed: 37 additions & 31 deletions

File tree

meson.build

Lines changed: 28 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -61,38 +61,43 @@ else
6161
endif
6262
conf.set('CONFIG_JSONC', json_c_dep.found(), description: 'Is json-c required?')
6363

64-
# Check for OpenSSL availability
65-
openssl_dep = dependency('openssl',
66-
version: '>=1.1.0',
67-
required: get_option('openssl'),
68-
fallback : ['openssl', 'libssl_dep'])
69-
if openssl_dep.found()
70-
conf.set('CONFIG_OPENSSL', true,
71-
description: 'Is OpenSSL/LibreSSL available?')
64+
if get_option('openssl').disabled()
65+
openssl_dep = dependency('', required: false)
66+
else
67+
openssl_dep = dependency('openssl',
68+
version: '>=1.1.0',
69+
required: get_option('openssl'),
70+
fallback : ['openssl', 'libssl_dep'])
7271

73-
if openssl_dep.version().version_compare('<2.0.0')
74-
api_version = 1
75-
endif
72+
if openssl_dep.found()
73+
if openssl_dep.version().version_compare('<2.0.0')
74+
api_version = 1
75+
endif
7676

77-
if openssl_dep.version().version_compare('>=3.0.0')
78-
api_version = 3
77+
if openssl_dep.version().version_compare('>=3.0.0')
78+
api_version = 3
79+
endif
7980

8081
# Test for LibreSSL v3.x with incomplete OpenSSL v3 APIs
81-
is_libressl = cc.has_header_symbol('openssl/opensslv.h',
82-
'LIBRESSL_VERSION_NUMBER',
83-
dependencies: openssl_dep)
84-
has_header = cc.has_header('openssl/core_names.h',
85-
dependencies: openssl_dep)
86-
if is_libressl and not has_header
87-
api_version = 1
82+
if openssl_dep.type_name() != 'internal'
83+
is_libressl = cc.has_header_symbol('openssl/opensslv.h',
84+
'LIBRESSL_VERSION_NUMBER',
85+
dependencies: openssl_dep)
86+
has_header = cc.has_header('openssl/core_names.h',
87+
dependencies: openssl_dep)
88+
if is_libressl and not has_header
89+
api_version = 1
90+
endif
8891
endif
8992

93+
conf.set('CONFIG_OPENSSL_@0@'.format(api_version), true,
94+
description: 'OpenSSL/LibreSSL API version @0@'.format(api_version))
9095
endif
91-
92-
conf.set('CONFIG_OPENSSL_@0@'.format(api_version), true,
93-
description: 'OpenSSL/LibreSSL API version @0@'.format(api_version))
9496
endif
9597

98+
conf.set('CONFIG_OPENSSL', openssl_dep.found(),
99+
description: 'Is OpenSSL/LibreSSL available?')
100+
96101
if get_option('libdbus').disabled()
97102
libdbus_dep = dependency('', required: false)
98103
else

subprojects/openssl.wrap

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
[wrap-file]
2-
directory = openssl-1.1.1l
3-
source_url = https://www.openssl.org/source/openssl-1.1.1l.tar.gz
4-
source_filename = openssl-1.1.1l.tar.gz
5-
source_hash = 0b7a3e5e59c34827fe0c3a74b7ec8baef302b98fa80088d7f9153aa16fa76bd1
6-
patch_filename = openssl_1.1.1l-3_patch.zip
7-
patch_url = https://wrapdb.mesonbuild.com/v2/openssl_1.1.1l-3/get_patch
8-
patch_hash = a0cb8285cda3ae0e1898b4e88427c19bf245184259f41395010182655f9f8ce6
2+
directory = openssl-3.0.7
3+
source_url = https://www.openssl.org/source/openssl-3.0.7.tar.gz
4+
source_filename = openssl-3.0.7.tar.gz
5+
source_hash = 83049d042a260e696f62406ac5c08bf706fd84383f945cf21bd61e9ed95c396e
6+
patch_filename = openssl_3.0.7-2_patch.zip
7+
patch_url = https://wrapdb.mesonbuild.com/v2/openssl_3.0.7-2/get_patch
8+
patch_hash = dcc5d21bb602a5ca43bbaf14de858955f748b2abb2c0102ba193bd3964ac13a4
9+
source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/openssl_3.0.7-2/openssl-3.0.7.tar.gz
10+
wrapdb_version = 3.0.7-2
911

1012
[provide]
1113
libcrypto = libcrypto_dep
1214
libssl = libssl_dep
1315
openssl = openssl_dep
14-

0 commit comments

Comments
 (0)