diff options
| author | Wang Mingyu <wangmy@fujitsu.com> | 2025-07-16 14:41:01 +0800 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2025-07-15 23:54:16 -0700 |
| commit | 2b9e429a242d8899c77281b6c2387b63534b8d82 (patch) | |
| tree | c2b70f0085019775cca12b3ddf297ba35ad585a8 /meta-networking/recipes-support/strongswan/strongswan_6.0.2.bb | |
| parent | f77f1072da45ecbecc74bcc7203b92bc353eb097 (diff) | |
| download | meta-openembedded-2b9e429a242d8899c77281b6c2387b63534b8d82.tar.gz | |
strongswan: upgrade 6.0.1 -> 6.0.2
0001-pki-Fix-signature-of-help-to-match-that-of-a-callbac.patch
0002-callback-job-Replace-return_false-in-constructors-wi.patch
0003-Cast-uses-of-return_-nop-and-enumerator_create_empty.patch
removed since they're included in 6.0.2
Changelog:
=============
- Support for per-CPU SAs (RFC 9611) has been added (Linux 6.13+).
- Basic support for AGGFRAG mode (RFC 9347) has been added (Linux 6.14+).
- POSIX regular expressions can be used to match remote identities.
- Switching configs based on EAP-Identities is supported. Setting
'remote.eap_id' now always initiates an EAP-Identity exchange.
- On Linux, sequence numbers from acquires are used when installing SAs. This
allows handling narrowing properly.
- During rekeying, the narrowed traffic selectors are now proposed instead of
the configured ones.
- The default AH/ESP proposals contain all supported key exchange methods plus
'none' to make PFS optional and accept proposals of older peers.
- GRO for ESP in enabled for NAT-T UDP sockets, which can improve performance
if the esp4|6_offload modules are loaded.
- charon-nm sets the VPN connection as persistent, preventing NetworkManager
from tearing down the connection if the network connectivity changes.
- ML-KEM is supported via OpenSSL 3.5+.
- The wolfssl plugin is now compatible to wolfSSL's FIPS module.
- The libsoup plugin has been migrated to libsoup 3, libsoup 2 is not supported
anymore.
- The long defunct uci plugin has been removed.
- Log messages by watcher_t are now logged in a separate log group ('wch').
Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-networking/recipes-support/strongswan/strongswan_6.0.2.bb')
| -rw-r--r-- | meta-networking/recipes-support/strongswan/strongswan_6.0.2.bb | 191 |
1 files changed, 191 insertions, 0 deletions
diff --git a/meta-networking/recipes-support/strongswan/strongswan_6.0.2.bb b/meta-networking/recipes-support/strongswan/strongswan_6.0.2.bb new file mode 100644 index 0000000000..aa4524ab3e --- /dev/null +++ b/meta-networking/recipes-support/strongswan/strongswan_6.0.2.bb | |||
| @@ -0,0 +1,191 @@ | |||
| 1 | DESCRIPTION = "strongSwan is an OpenSource IPsec implementation for the \ | ||
| 2 | Linux operating system." | ||
| 3 | SUMMARY = "strongSwan is an OpenSource IPsec implementation" | ||
| 4 | HOMEPAGE = "http://www.strongswan.org" | ||
| 5 | SECTION = "net" | ||
| 6 | LICENSE = "GPL-2.0-only" | ||
| 7 | LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" | ||
| 8 | DEPENDS = "flex-native flex bison-native" | ||
| 9 | DEPENDS:append = "${@bb.utils.contains('DISTRO_FEATURES', 'tpm2', ' tpm2-tss', '', d)}" | ||
| 10 | |||
| 11 | SRC_URI = "https://download.strongswan.org/strongswan-${PV}.tar.bz2" | ||
| 12 | |||
| 13 | SRC_URI[sha256sum] = "b8bfc897b84001fd810a281918d6c9ce37503cae0f41b39c43d4aba0201277cf" | ||
| 14 | |||
| 15 | UPSTREAM_CHECK_REGEX = "strongswan-(?P<pver>\d+(\.\d+)+)\.tar" | ||
| 16 | |||
| 17 | EXTRA_OECONF = " \ | ||
| 18 | --without-lib-prefix \ | ||
| 19 | --with-dev-headers=${includedir}/strongswan \ | ||
| 20 | " | ||
| 21 | |||
| 22 | EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '--with-systemdsystemunitdir=${systemd_unitdir}/system/', '--without-systemdsystemunitdir', d)}" | ||
| 23 | |||
| 24 | PACKAGECONFIG ?= "curl openssl sqlite3 swanctl \ | ||
| 25 | ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd-charon', 'charon', d)} \ | ||
| 26 | ${@bb.utils.contains('DISTRO_FEATURES', 'tpm2', 'tpm2', '', d)} \ | ||
| 27 | ${@bb.utils.contains('DISTRO_FEATURES', 'ima', 'tnc-imc imc-hcd imc-os imc-scanner imc-attestation', '', d)} \ | ||
| 28 | ${@bb.utils.contains('DISTRO_FEATURES', 'ima', 'tnc-imv imv-hcd imv-os imv-scanner imv-attestation', '', d)} \ | ||
| 29 | " | ||
| 30 | |||
| 31 | PACKAGECONFIG[aes] = "--enable-aes,--disable-aes,,${PN}-plugin-aes" | ||
| 32 | PACKAGECONFIG[aesni] = "--enable-aesni,--disable-aesni,,${PN}-plugin-aesni" | ||
| 33 | PACKAGECONFIG[bfd] = "--enable-bfd-backtraces,--disable-bfd-backtraces,binutils" | ||
| 34 | PACKAGECONFIG[charon] = "--enable-charon,--disable-charon," | ||
| 35 | PACKAGECONFIG[curl] = "--enable-curl,--disable-curl,curl,${PN}-plugin-curl" | ||
| 36 | PACKAGECONFIG[des] = "--enable-des,--disable-des,,${PN}-plugin-des" | ||
| 37 | PACKAGECONFIG[eap-identity] = "--enable-eap-identity,--disable-eap-identity,,${PN}-plugin-eap-identity" | ||
| 38 | PACKAGECONFIG[eap-mschapv2] = "--enable-eap-mschapv2,--disable-eap-mschapv2,,${PN}-plugin-eap-mschapv2" | ||
| 39 | PACKAGECONFIG[fips-prf] = "--enable-fips-prf,--disable-fips-prf,,${PN}-plugin-fips-prf" | ||
| 40 | PACKAGECONFIG[gmp] = "--enable-gmp,--disable-gmp,gmp,${PN}-plugin-gmp" | ||
| 41 | PACKAGECONFIG[hmac] = "--enable-hmac,--disable-hmac,,${PN}-plugin-hmac" | ||
| 42 | PACKAGECONFIG[ldap] = "--enable-ldap,--disable-ldap,openldap,${PN}-plugin-ldap" | ||
| 43 | PACKAGECONFIG[md5] = "--enable-md5,--disable-md5,,${PN}-plugin-md5" | ||
| 44 | PACKAGECONFIG[mysql] = "--enable-mysql,--disable-mysql,mysql5,${PN}-plugin-mysql" | ||
| 45 | PACKAGECONFIG[nm] = "--enable-nm,--disable-nm,networkmanager,${PN}-nm" | ||
| 46 | PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl,${PN}-plugin-openssl" | ||
| 47 | PACKAGECONFIG[pkcs12] = "--enable-pkcs12,--disable-pkcs12,,${PN}-plugin-pkcs12" | ||
| 48 | PACKAGECONFIG[rc2] = "--enable-rc2,--disable-rc2,,${PN}-plugin-rc2" | ||
| 49 | PACKAGECONFIG[sha1] = "--enable-sha1,--disable-sha1,,${PN}-plugin-sha1" | ||
| 50 | PACKAGECONFIG[sha2] = "--enable-sha2,--disable-sha2,,${PN}-plugin-sha2" | ||
| 51 | PACKAGECONFIG[soup] = "--enable-soup,--disable-soup,libsoup-2.4,${PN}-plugin-soup" | ||
| 52 | PACKAGECONFIG[sqlite3] = "--enable-sqlite,--disable-sqlite,sqlite3,${PN}-plugin-sqlite" | ||
| 53 | PACKAGECONFIG[stroke] = "--enable-stroke,--disable-stroke,,${PN}-plugin-stroke" | ||
| 54 | PACKAGECONFIG[swanctl] = "--enable-swanctl,--disable-swanctl,,libgcc" | ||
| 55 | PACKAGECONFIG[curve25519] = "--enable-curve25519,--disable-curve25519,, ${PN}-plugin-curve25519" | ||
| 56 | |||
| 57 | # requires swanctl | ||
| 58 | PACKAGECONFIG[systemd-charon] = "--enable-systemd,--disable-systemd,systemd," | ||
| 59 | |||
| 60 | # tpm needs meta-tpm layer | ||
| 61 | PACKAGECONFIG[tpm2] = "--enable-tpm,--disable-tpm,,${PN}-plugin-tpm" | ||
| 62 | |||
| 63 | |||
| 64 | # integraty configuration needs meta-integraty | ||
| 65 | #imc | ||
| 66 | PACKAGECONFIG[tnc-imc] = "--enable-tnc-imc,--disable-tnc-imc,, ${PN}-plugin-tnc-imc ${PN}-plugin-tnc-tnccs" | ||
| 67 | PACKAGECONFIG[imc-test] = "--enable-imc-test,--disable-imc-test,," | ||
| 68 | PACKAGECONFIG[imc-scanner] = "--enable-imc-scanner,--disable-imc-scanner,," | ||
| 69 | PACKAGECONFIG[imc-os] = "--enable-imc-os,--disable-imc-os,," | ||
| 70 | PACKAGECONFIG[imc-attestation] = "--enable-imc-attestation,--disable-imc-attestation,," | ||
| 71 | PACKAGECONFIG[imc-swima] = "--enable-imc-swima, --disable-imc-swima, json-c," | ||
| 72 | PACKAGECONFIG[imc-hcd] = "--enable-imc-hcd, --disable-imc-hcd,," | ||
| 73 | |||
| 74 | #imv set | ||
| 75 | PACKAGECONFIG[tnc-imv] = "--enable-tnc-imv,--disable-tnc-imv,, ${PN}-plugin-tnc-imv ${PN}-plugin-tnc-tnccs" | ||
| 76 | PACKAGECONFIG[imv-test] = "--enable-imv-test,--disable-imv-test,," | ||
| 77 | PACKAGECONFIG[imv-scanner] = "--enable-imv-scanner,--disable-imv-scanner,," | ||
| 78 | PACKAGECONFIG[imv-os] = "--enable-imv-os,--disable-imv-os,," | ||
| 79 | PACKAGECONFIG[imv-attestation] = "--enable-imv-attestation,--disable-imv-attestation,," | ||
| 80 | PACKAGECONFIG[imv-swima] = "--enable-imv-swima, --disable-imv-swima, json-c," | ||
| 81 | PACKAGECONFIG[imv-hcd] = "--enable-imv-hcd, --disable-imv-hcd,," | ||
| 82 | |||
| 83 | PACKAGECONFIG[tnc-ifmap] = "--enable-tnc-ifmap,--disable-tnc-ifmap, libxml2, ${PN}-plugin-tnc-ifmap" | ||
| 84 | PACKAGECONFIG[tnc-pdp] = "--enable-tnc-pdp,--disable-tnc-pdp,, ${PN}-plugin-tnc-pdp" | ||
| 85 | |||
| 86 | PACKAGECONFIG[tnccs-11] = "--enable-tnccs-11,--disable-tnccs-11,libxml2, ${PN}-plugin-tnccs-11" | ||
| 87 | PACKAGECONFIG[tnccs-20] = "--enable-tnccs-20,--disable-tnccs-20,, ${PN}-plugin-tnccs-20" | ||
| 88 | PACKAGECONFIG[tnccs-dynamic] = "--enable-tnccs-dynamic,--disable-tnccs-dynamic,,${PN}-plugin-tnccs-dynamic" | ||
| 89 | |||
| 90 | inherit autotools systemd pkgconfig | ||
| 91 | |||
| 92 | RRECOMMENDS:${PN} = "kernel-module-ah4 \ | ||
| 93 | kernel-module-esp4 \ | ||
| 94 | kernel-module-xfrm-user \ | ||
| 95 | " | ||
| 96 | |||
| 97 | FILES:${PN} += "${libdir}/ipsec/lib*${SOLIBS}" | ||
| 98 | FILES:${PN}-dbg += "${bindir}/.debug ${sbindir}/.debug ${libdir}/ipsec/.debug ${libexecdir}/ipsec/.debug" | ||
| 99 | FILES:${PN}-dev += "${libdir}/ipsec/lib*${SOLIBSDEV} ${libdir}/ipsec/*.la ${libdir}/ipsec/include/config.h" | ||
| 100 | FILES:${PN}-staticdev += "${libdir}/ipsec/*.a" | ||
| 101 | |||
| 102 | CONFFILES:${PN} = "${sysconfdir}/*.conf ${sysconfdir}/ipsec.d/*.conf ${sysconfdir}/strongswan.d/*.conf" | ||
| 103 | |||
| 104 | PACKAGES += "${PN}-plugins" | ||
| 105 | ALLOW_EMPTY:${PN}-plugins = "1" | ||
| 106 | |||
| 107 | PACKAGE_BEFORE_PN = "${PN}-imcvs ${PN}-imcvs-dbg" | ||
| 108 | ALLOW_EMPTY:${PN}-imcvs = "1" | ||
| 109 | |||
| 110 | FILES:${PN}-imcvs = "${libdir}/ipsec/imcvs/*.so" | ||
| 111 | FILES:${PN}-imcvs-dbg += "${libdir}/ipsec/imcvs/.debug" | ||
| 112 | |||
| 113 | PACKAGES =+ "${PN}-nm ${PN}-nm-dbg" | ||
| 114 | FILES:${PN}-nm = "${libexecdir}/ipsec/charon-nm ${datadir}/dbus-1/system.d/nm-strongswan-service.conf" | ||
| 115 | FILES:${PN}-nm-dbg = "${libexecdir}/ipsec/.debug/charon-nm" | ||
| 116 | |||
| 117 | PACKAGES_DYNAMIC += "^${PN}-plugin-.*$" | ||
| 118 | NOAUTOPACKAGEDEBUG = "1" | ||
| 119 | |||
| 120 | python split_strongswan_plugins () { | ||
| 121 | sysconfdir = d.expand('${sysconfdir}/strongswan.d/charon') | ||
| 122 | libdir = d.expand('${libdir}/ipsec/plugins') | ||
| 123 | dbglibdir = os.path.join(libdir, '.debug') | ||
| 124 | |||
| 125 | def add_plugin_conf(f, pkg, file_regex, output_pattern, modulename): | ||
| 126 | dvar = d.getVar('PKGD') | ||
| 127 | oldfiles = d.getVar('CONFFILES:' + pkg) | ||
| 128 | newfile = '/' + os.path.relpath(f, dvar) | ||
| 129 | |||
| 130 | if not oldfiles: | ||
| 131 | d.setVar('CONFFILES:' + pkg, newfile) | ||
| 132 | else: | ||
| 133 | d.setVar('CONFFILES:' + pkg, oldfiles + " " + newfile) | ||
| 134 | |||
| 135 | split_packages = do_split_packages(d, libdir, r'libstrongswan-(.*)\.so', '${PN}-plugin-%s', 'strongSwan %s plugin', prepend=True) | ||
| 136 | do_split_packages(d, sysconfdir, r'(.*)\.conf', '${PN}-plugin-%s', 'strongSwan %s plugin', prepend=True, hook=add_plugin_conf) | ||
| 137 | |||
| 138 | split_dbg_packages = do_split_packages(d, dbglibdir, r'libstrongswan-(.*)\.so', '${PN}-plugin-%s-dbg', 'strongSwan %s plugin - Debugging files', prepend=True, extra_depends='${PN}-dbg') | ||
| 139 | split_dev_packages = do_split_packages(d, libdir, r'libstrongswan-(.*)\.la', '${PN}-plugin-%s-dev', 'strongSwan %s plugin - Development files', prepend=True, extra_depends='${PN}-dev') | ||
| 140 | split_staticdev_packages = do_split_packages(d, libdir, r'libstrongswan-(.*)\.a', '${PN}-plugin-%s-staticdev', 'strongSwan %s plugin - Development files (Static Libraries)', prepend=True, extra_depends='${PN}-staticdev') | ||
| 141 | |||
| 142 | if split_packages: | ||
| 143 | pn = d.getVar('PN') | ||
| 144 | d.setVar('RRECOMMENDS:' + pn + '-plugins', ' '.join(split_packages)) | ||
| 145 | d.appendVar('RRECOMMENDS:' + pn + '-dbg', ' ' + ' '.join(split_dbg_packages)) | ||
| 146 | d.appendVar('RRECOMMENDS:' + pn + '-dev', ' ' + ' '.join(split_dev_packages)) | ||
| 147 | d.appendVar('RRECOMMENDS:' + pn + '-staticdev', ' ' + ' '.join(split_staticdev_packages)) | ||
| 148 | } | ||
| 149 | |||
| 150 | PACKAGESPLITFUNCS:prepend = "split_strongswan_plugins " | ||
| 151 | |||
| 152 | # Install some default plugins based on default strongSwan ./configure options | ||
| 153 | # See https://wiki.strongswan.org/projects/strongswan/wiki/Pluginlist | ||
| 154 | RDEPENDS:${PN} += "\ | ||
| 155 | ${PN}-plugin-attr \ | ||
| 156 | ${PN}-plugin-cmac \ | ||
| 157 | ${PN}-plugin-constraints \ | ||
| 158 | ${PN}-plugin-dnskey \ | ||
| 159 | ${PN}-plugin-drbg \ | ||
| 160 | ${PN}-plugin-kdf \ | ||
| 161 | ${PN}-plugin-kernel-netlink \ | ||
| 162 | ${PN}-plugin-nonce \ | ||
| 163 | ${PN}-plugin-pem \ | ||
| 164 | ${PN}-plugin-pgp \ | ||
| 165 | ${PN}-plugin-pkcs1 \ | ||
| 166 | ${PN}-plugin-pkcs7 \ | ||
| 167 | ${PN}-plugin-pkcs8 \ | ||
| 168 | ${PN}-plugin-pubkey \ | ||
| 169 | ${PN}-plugin-random \ | ||
| 170 | ${PN}-plugin-resolve \ | ||
| 171 | ${PN}-plugin-revocation \ | ||
| 172 | ${PN}-plugin-socket-default \ | ||
| 173 | ${PN}-plugin-sshkey \ | ||
| 174 | ${PN}-plugin-updown \ | ||
| 175 | ${PN}-plugin-vici \ | ||
| 176 | ${PN}-plugin-x509 \ | ||
| 177 | ${PN}-plugin-xauth-generic \ | ||
| 178 | ${PN}-plugin-xcbc \ | ||
| 179 | " | ||
| 180 | |||
| 181 | RPROVIDES:${PN} += "${PN}-systemd" | ||
| 182 | RREPLACES:${PN} += "${PN}-systemd" | ||
| 183 | RCONFLICTS:${PN} += "${PN}-systemd" | ||
| 184 | |||
| 185 | # The deprecated legacy 'strongswan-starter' service should only be used when charon and | ||
| 186 | # stroke are enabled. When swanctl is in use, 'strongswan.service' is needed. | ||
| 187 | # See: https://wiki.strongswan.org/projects/strongswan/wiki/Charon-systemd | ||
| 188 | SYSTEMD_SERVICE:${PN} = " \ | ||
| 189 | ${@bb.utils.contains('PACKAGECONFIG', 'swanctl', '${BPN}.service', '', d)} \ | ||
| 190 | ${@bb.utils.contains('PACKAGECONFIG', 'charon', '${BPN}-starter.service', '', d)} \ | ||
| 191 | " | ||
