@@ -1482,50 +1482,18 @@ endif
14821482dmi_arches = [' x86' , ' x86_64' , ' aarch64' , ' arm' , ' ia64' , ' loongarch64' , ' mips' , ' riscv64' ]
14831483conf.set10(' HAVE_DMI' , host_machine .cpu_family() in dmi_arches)
14841484
1485- # We support one or the other. If gcrypt is available, we assume it's there to
1486- # be used, and use it in preference.
1487- opt = get_option (' cryptolib' )
1488- if opt == ' openssl' and conf.get(' HAVE_OPENSSL' ) == 0
1489- error (' openssl requested as the default cryptolib, but not available' )
1490- endif
1491- conf.set10(' PREFER_OPENSSL' ,
1492- opt == ' openssl' or (opt == ' auto' and conf.get(' HAVE_OPENSSL' ) == 1 and conf.get(' HAVE_GCRYPT' ) == 0 ))
1493- conf.set10(' HAVE_OPENSSL_OR_GCRYPT' ,
1494- conf.get(' HAVE_OPENSSL' ) == 1 or conf.get(' HAVE_GCRYPT' ) == 1 )
1495- lib_openssl_or_gcrypt = conf.get(' PREFER_OPENSSL' ) == 1 ? [libopenssl] : [libgcrypt, libgpg_error]
1496-
14971485dns_over_tls = get_option (' dns-over-tls' )
1498- if dns_over_tls != ' false'
1499- if dns_over_tls == ' gnutls' and conf.get(' PREFER_OPENSSL' ) == 1
1500- error (' Sorry, -Ddns-over-tls=gnutls is not supported when openssl is used as the cryptolib' )
1501- endif
1502-
1503- if dns_over_tls == ' gnutls'
1504- have_openssl = false
1505- else
1506- have_openssl = conf.get(' HAVE_OPENSSL' ) == 1
1507- if dns_over_tls == ' openssl' and not have_openssl
1508- error (' DNS-over-TLS support was requested with openssl, but dependencies are not available' )
1509- endif
1510- endif
1511- if dns_over_tls == ' openssl' or have_openssl
1512- have_gnutls = false
1513- else
1514- have_gnutls = conf.get(' HAVE_GNUTLS' ) == 1 and libgnutls.version().version_compare(' >= 3.6.0' )
1515- if dns_over_tls != ' auto' and not have_gnutls
1516- str = dns_over_tls == ' gnutls' ? ' with gnutls' : ''
1517- error (' DNS-over-TLS support was requested@0@, but dependencies are not available' .format(str))
1518- endif
1519- endif
1520- have = have_gnutls or have_openssl
1521- else
1486+ have_openssl = conf.get(' HAVE_OPENSSL' ) == 1
1487+ if dns_over_tls == ' false'
15221488 have = false
1523- have_gnutls = false
1524- have_openssl = false
1489+ elif dns_over_tls == ' auto'
1490+ have = have_openssl
1491+ elif have_openssl
1492+ have = true
1493+ else
1494+ error (' DNS-over-TLS support was requested, but OpenSSL support is disabled.' )
15251495endif
15261496conf.set10(' ENABLE_DNS_OVER_TLS' , have)
1527- conf.set10(' DNS_OVER_TLS_USE_GNUTLS' , have_gnutls)
1528- conf.set10(' DNS_OVER_TLS_USE_OPENSSL' , have_openssl)
15291497
15301498default_dns_over_tls = get_option (' default-dns-over-tls' )
15311499if default_dns_over_tls != ' no' and conf.get(' ENABLE_DNS_OVER_TLS' ) == 0
@@ -1552,8 +1520,8 @@ have = get_option('repart').require(
15521520conf.set10(' ENABLE_REPART' , have)
15531521
15541522default_dnssec = get_option (' default-dnssec' )
1555- if default_dnssec != ' no' and conf.get(' HAVE_OPENSSL_OR_GCRYPT ' ) == 0
1556- message (' default-dnssec cannot be set to yes or allow-downgrade openssl and gcrypt are disabled. Setting default-dnssec to no.' )
1523+ if default_dnssec != ' no' and conf.get(' HAVE_OPENSSL ' ) == 0
1524+ message (' default-dnssec cannot be set to yes or allow-downgrade when openssl is disabled. Setting default-dnssec to no.' )
15571525 default_dnssec = ' no'
15581526endif
15591527conf.set(' DEFAULT_DNSSEC_MODE' ,
@@ -1584,7 +1552,7 @@ conf.set10('ENABLE_STORAGETM', get_option('storagetm'))
15841552
15851553have = get_option (' importd' ).require(
15861554 conf.get(' HAVE_LIBCURL' ) == 1 and
1587- conf.get(' HAVE_OPENSSL_OR_GCRYPT ' ) == 1 and
1555+ conf.get(' HAVE_OPENSSL ' ) == 1 and
15881556 conf.get(' HAVE_ZLIB' ) == 1 and
15891557 conf.get(' HAVE_XZ' ) == 1 ,
15901558 error_message : ' curl, openssl/grypt, zlib and xz required' ).allowed()
@@ -3097,6 +3065,7 @@ foreach tuple : [
30973065
30983066 # optional features
30993067 [' dmi' ],
3068+ [' DNS-over-TLS' ],
31003069 [' idn' ],
31013070 [' polkit' ],
31023071 [' legacy-pkla' , install_polkit_pkla],
@@ -3161,22 +3130,6 @@ else
31613130 found += ' static-libudev(@0@)' .format(static_libudev)
31623131endif
31633132
3164- if conf.get(' HAVE_OPENSSL_OR_GCRYPT' ) == 1 and conf.get(' PREFER_OPENSSL' ) == 1
3165- found += ' cryptolib(openssl)'
3166- elif conf.get(' HAVE_OPENSSL_OR_GCRYPT' ) == 1
3167- found += ' cryptolib(gcrypt)'
3168- else
3169- missing += ' cryptolib'
3170- endif
3171-
3172- if conf.get(' DNS_OVER_TLS_USE_GNUTLS' ) == 1
3173- found += ' DNS-over-TLS(gnutls)'
3174- elif conf.get(' DNS_OVER_TLS_USE_OPENSSL' ) == 1
3175- found += ' DNS-over-TLS(openssl)'
3176- else
3177- missing += ' DNS-over-TLS'
3178- endif
3179-
31803133summary ({
31813134 ' enabled' : ' , ' .join(found),
31823135 ' disabled' : ' , ' .join(missing)},
0 commit comments