You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

744 lines
23 KiB

  1. #
  2. # Copyright (C) 2012-2018 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=strongswan
  9. PKG_VERSION:=5.9.5
  10. PKG_RELEASE:=$(AUTORELEASE).1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  12. PKG_SOURCE_URL:=https://download.strongswan.org/ https://download2.strongswan.org/
  13. PKG_HASH:=983e4ef4a4c6c9d69f5fe6707c7fe0b2b9a9291943bbf4e008faab6bf91c0bdd
  14. PKG_LICENSE:=GPL-2.0-or-later
  15. PKG_MAINTAINER:=Philip Prindeville <philipp@redfish-solutions.com>, Noel Kuntze <noel.kuntze@thermi.consulting>
  16. PKG_CPE_ID:=cpe:/a:strongswan:strongswan
  17. PKG_MOD_AVAILABLE:= \
  18. addrblock \
  19. aes \
  20. af-alg \
  21. agent \
  22. attr \
  23. attr-sql \
  24. bliss \
  25. blowfish \
  26. ccm \
  27. chapoly \
  28. cmac \
  29. constraints \
  30. connmark \
  31. coupling \
  32. ctr \
  33. curl \
  34. curve25519 \
  35. des \
  36. dhcp \
  37. dnskey \
  38. duplicheck \
  39. eap-identity \
  40. eap-md5 \
  41. eap-mschapv2 \
  42. eap-radius \
  43. eap-tls \
  44. farp \
  45. fips-prf \
  46. forecast \
  47. gcm \
  48. gcrypt \
  49. gmp \
  50. gmpdh \
  51. ha \
  52. hmac \
  53. kernel-libipsec \
  54. kernel-netlink \
  55. ldap \
  56. led \
  57. load-tester \
  58. nonce \
  59. md4 \
  60. md5 \
  61. mgf1 \
  62. mysql \
  63. newhope \
  64. ntru \
  65. openssl \
  66. pem \
  67. pgp \
  68. pkcs1 \
  69. pkcs7 \
  70. pkcs8 \
  71. pkcs11 \
  72. pkcs12 \
  73. pubkey \
  74. random \
  75. rc2 \
  76. resolve \
  77. revocation \
  78. sha1 \
  79. sha2 \
  80. sha3 \
  81. smp \
  82. socket-default \
  83. socket-dynamic \
  84. sql \
  85. sqlite \
  86. sshkey \
  87. stroke \
  88. test-vectors \
  89. unity \
  90. uci \
  91. updown \
  92. vici \
  93. whitelist \
  94. wolfssl \
  95. x509 \
  96. xauth-eap \
  97. xauth-generic \
  98. xcbc
  99. PKG_CONFIG_DEPENDS:= \
  100. CONFIG_STRONGSWAN_ROUTING_TABLE \
  101. CONFIG_STRONGSWAN_ROUTING_TABLE_PRIO \
  102. $(patsubst %,CONFIG_PACKAGE_strongswan-mod-%,$(PKG_MOD_AVAILABLE)) \
  103. PKG_FIXUP:=autoreconf
  104. PKG_INSTALL:=1
  105. PKG_BUILD_PARALLEL:=1
  106. include $(INCLUDE_DIR)/package.mk
  107. # strongswan-mod-mysql needs iconv
  108. include $(INCLUDE_DIR)/nls.mk
  109. define Package/strongswan/Default
  110. SUBMENU:=VPN
  111. SECTION:=net
  112. CATEGORY:=Network
  113. TITLE:=StrongSwan
  114. URL:=http://www.strongswan.org/
  115. endef
  116. define Package/strongswan/description/Default
  117. StrongSwan is an OpenSource IPsec implementation for the Linux operating system.
  118. endef
  119. define Package/strongswan
  120. $(call Package/strongswan/Default)
  121. MENU:=1
  122. DEPENDS:= +libpthread +ip \
  123. +kmod-crypto-authenc \
  124. +kmod-ipsec +kmod-ipsec4 +IPV6:kmod-ipsec6
  125. endef
  126. define Package/strongswan/config
  127. source "$(SOURCE)/Config.in"
  128. endef
  129. define Package/strongswan/description
  130. $(call Package/strongswan/description/Default)
  131. This package contains shared libraries and scripts.
  132. endef
  133. define Package/strongswan-full
  134. $(call Package/strongswan/Default)
  135. TITLE+= (full)
  136. DEPENDS:= strongswan \
  137. +strongswan-charon \
  138. +strongswan-charon-cmd \
  139. +strongswan-ipsec \
  140. +strongswan-libnttfft \
  141. +strongswan-mod-addrblock \
  142. +strongswan-mod-aes \
  143. +strongswan-mod-af-alg \
  144. +strongswan-mod-agent \
  145. +strongswan-mod-attr \
  146. +strongswan-mod-attr-sql \
  147. +strongswan-mod-bliss \
  148. +strongswan-mod-blowfish \
  149. +strongswan-mod-ccm \
  150. +strongswan-mod-chapoly \
  151. +strongswan-mod-cmac \
  152. +strongswan-mod-constraints \
  153. +strongswan-mod-connmark \
  154. +strongswan-mod-coupling \
  155. +strongswan-mod-ctr \
  156. +strongswan-mod-curl \
  157. +strongswan-mod-curve25519 \
  158. +strongswan-mod-des \
  159. +strongswan-mod-dhcp \
  160. +strongswan-mod-dnskey \
  161. +strongswan-mod-duplicheck \
  162. +strongswan-mod-eap-identity \
  163. +strongswan-mod-eap-md5 \
  164. +strongswan-mod-eap-mschapv2 \
  165. +strongswan-mod-eap-radius \
  166. +strongswan-mod-eap-tls \
  167. +strongswan-mod-farp \
  168. +strongswan-mod-fips-prf \
  169. +strongswan-mod-forecast \
  170. +strongswan-mod-gcm \
  171. +strongswan-mod-gcrypt \
  172. +strongswan-mod-gmp \
  173. +strongswan-mod-ha \
  174. +strongswan-mod-hmac \
  175. +strongswan-mod-kernel-netlink \
  176. +strongswan-mod-ldap \
  177. +strongswan-mod-led \
  178. +strongswan-mod-load-tester \
  179. +strongswan-mod-nonce \
  180. +strongswan-mod-md4 \
  181. +strongswan-mod-md5 \
  182. +strongswan-mod-mgf1 \
  183. +strongswan-mod-mysql \
  184. +strongswan-mod-newhope \
  185. +strongswan-mod-ntru \
  186. +strongswan-mod-openssl \
  187. +strongswan-mod-pem \
  188. +strongswan-mod-pgp \
  189. +strongswan-mod-pkcs1 \
  190. +strongswan-mod-pkcs7 \
  191. +strongswan-mod-pkcs8 \
  192. +strongswan-mod-pkcs11 \
  193. +strongswan-mod-pkcs12 \
  194. +strongswan-mod-pubkey \
  195. +strongswan-mod-random \
  196. +strongswan-mod-rc2 \
  197. +strongswan-mod-resolve \
  198. +strongswan-mod-revocation \
  199. +strongswan-mod-sha1 \
  200. +strongswan-mod-sha2 \
  201. +strongswan-mod-sha3 \
  202. +strongswan-mod-smp \
  203. +strongswan-mod-socket-default \
  204. +strongswan-mod-sql \
  205. +strongswan-mod-sqlite \
  206. +strongswan-mod-sshkey \
  207. +strongswan-mod-stroke \
  208. +strongswan-mod-test-vectors \
  209. +strongswan-mod-uci \
  210. +strongswan-mod-unity \
  211. +strongswan-mod-updown \
  212. +strongswan-mod-vici \
  213. +strongswan-mod-whitelist \
  214. +strongswan-mod-wolfssl \
  215. +strongswan-mod-x509 \
  216. +strongswan-mod-xauth-eap \
  217. +strongswan-mod-xauth-generic \
  218. +strongswan-mod-xcbc \
  219. +strongswan-pki \
  220. +strongswan-scepclient \
  221. +strongswan-swanctl \
  222. @DEVEL
  223. endef
  224. define Package/strongswan-full/description
  225. $(call Package/strongswan/description/Default)
  226. This meta-package contains dependencies for all of the strongswan plugins
  227. except kernel-libipsec,
  228. socket-dynamic and which are omitted in favor of the kernel-netlink and
  229. socket-default plugins.
  230. endef
  231. define Package/strongswan-default
  232. $(call Package/strongswan/Default)
  233. TITLE+= (default)
  234. DEPENDS:= strongswan \
  235. +strongswan-charon \
  236. +strongswan-mod-aes \
  237. +strongswan-mod-attr \
  238. +strongswan-mod-connmark \
  239. +strongswan-mod-constraints \
  240. +strongswan-mod-des \
  241. +strongswan-mod-dnskey \
  242. +strongswan-mod-fips-prf \
  243. +strongswan-mod-gmp \
  244. +strongswan-mod-hmac \
  245. +strongswan-mod-kernel-netlink \
  246. +strongswan-mod-md5 \
  247. +strongswan-mod-nonce \
  248. +strongswan-mod-pem \
  249. +strongswan-mod-pgp \
  250. +strongswan-mod-pkcs1 \
  251. +strongswan-mod-pubkey \
  252. +strongswan-mod-random \
  253. +strongswan-mod-rc2 \
  254. +strongswan-mod-resolve \
  255. +strongswan-mod-revocation \
  256. +strongswan-mod-sha1 \
  257. +strongswan-mod-sha2 \
  258. +strongswan-mod-socket-default \
  259. +strongswan-mod-sshkey \
  260. +strongswan-mod-updown \
  261. +strongswan-mod-x509 \
  262. +strongswan-mod-xauth-generic \
  263. +strongswan-mod-xcbc \
  264. +strongswan-swanctl
  265. endef
  266. define Package/strongswan-default/description
  267. $(call Package/strongswan/description/Default)
  268. This meta-package contains only dependencies to match upstream defaults.
  269. endef
  270. define Package/strongswan-isakmp
  271. $(call Package/strongswan/Default)
  272. TITLE+= (isakmp)
  273. DEPENDS:= strongswan \
  274. +strongswan-charon \
  275. +strongswan-ipsec \
  276. +strongswan-mod-aes \
  277. +strongswan-mod-des \
  278. +strongswan-mod-gmpdh \
  279. +strongswan-mod-hmac \
  280. +strongswan-mod-kernel-netlink \
  281. +strongswan-mod-md5 \
  282. +strongswan-mod-nonce \
  283. +strongswan-mod-pubkey \
  284. +strongswan-mod-random \
  285. +strongswan-mod-sha1 \
  286. +strongswan-mod-socket-default \
  287. +strongswan-mod-stroke \
  288. +strongswan-mod-uci \
  289. +strongswan-mod-updown
  290. endef
  291. define Package/strongswan-isakmp/description
  292. $(call Package/strongswan/description/Default)
  293. This meta-package contains only dependencies to establish ISAKMP /
  294. IKE PSK connections, dropping other capabilities in favor of small size
  295. Can fit most routers even with 4Mb flash (after removing IPv6 support).
  296. endef
  297. define Package/strongswan-minimal
  298. $(call Package/strongswan/Default)
  299. TITLE+= (minimal)
  300. DEPENDS:= strongswan \
  301. +strongswan-charon \
  302. +strongswan-mod-aes \
  303. +strongswan-mod-gmp \
  304. +strongswan-mod-hmac \
  305. +strongswan-mod-kernel-netlink \
  306. +strongswan-mod-nonce \
  307. +strongswan-mod-pubkey \
  308. +strongswan-mod-random \
  309. +strongswan-mod-sha1 \
  310. +strongswan-mod-socket-default \
  311. +strongswan-mod-stroke \
  312. +strongswan-mod-updown \
  313. +strongswan-mod-x509 \
  314. +strongswan-mod-xcbc
  315. endef
  316. define Package/strongswan-minimal/description
  317. $(call Package/strongswan/description/Default)
  318. This meta-package contains only dependencies for a minimal IKEv2 setup.
  319. endef
  320. define Package/strongswan-charon
  321. $(call Package/strongswan/Default)
  322. TITLE+= IKEv1/IKEv2 keying daemon
  323. DEPENDS:= strongswan
  324. endef
  325. define Package/strongswan-charon/description
  326. $(call Package/strongswan/description/Default)
  327. This package contains charon, an IKEv2 keying daemon.
  328. endef
  329. define Package/strongswan-charon-cmd
  330. $(call Package/strongswan/Default)
  331. TITLE+= charon-cmd utility
  332. DEPENDS:= strongswan +strongswan-charon
  333. endef
  334. define Package/strongswan-charon-cmd/description
  335. $(call Package/strongswan/description/Default)
  336. This package contains the charon-cmd utility.
  337. endef
  338. define Package/strongswan-ipsec
  339. $(call Package/strongswan/Default)
  340. TITLE+= utilities
  341. DEPENDS:= strongswan
  342. endef
  343. define Package/strongswan-ipsec/description
  344. $(call Package/strongswan/description/Default)
  345. This package contains the ipsec utility.
  346. endef
  347. define Package/strongswan-libnttfft
  348. $(call Package/strongswan/Default)
  349. TITLE+= nttfft library
  350. DEPENDS:= strongswan
  351. endef
  352. define Package/strongswan-libnttfft/description
  353. $(call Package/strongswan/description/Default)
  354. This package contains the Number Theoretic Transforms library.
  355. endef
  356. define Package/strongswan-pki
  357. $(call Package/strongswan/Default)
  358. TITLE+= PKI tool
  359. DEPENDS:= strongswan
  360. endef
  361. define Package/strongswan-pki/description
  362. $(call Package/strongswan/description/Default)
  363. This package contains the pki tool.
  364. endef
  365. define Package/strongswan-scepclient
  366. $(call Package/strongswan/Default)
  367. TITLE+= SCEP client
  368. DEPENDS:= strongswan
  369. endef
  370. define Package/strongswan-scepclient/description
  371. $(call Package/strongswan/description/Default)
  372. This package contains the SCEP client.
  373. endef
  374. define Package/strongswan-swanctl
  375. $(call Package/strongswan/Default)
  376. TITLE+= swanctl utility
  377. DEPENDS:= strongswan +strongswan-mod-vici
  378. endef
  379. define Package/strongswan-swanctl/description
  380. $(call Package/strongswan/description/Default)
  381. This package contains the swanctl utility.
  382. endef
  383. define Package/strongswan-gencerts
  384. $(call Package/strongswan/Default)
  385. TITLE+= X.509 certificate generation utility
  386. DEPENDS:= strongswan +strongswan-pki bash
  387. endef
  388. define Package/strongswan-gencerts/description
  389. $(call Package/strongswan/description/Default)
  390. This package contains the X.509 certificate generation utility.
  391. endef
  392. define Package/strongswan-libtls
  393. $(call Package/strongswan/Default)
  394. TITLE+= libtls
  395. DEPENDS:= strongswan
  396. endef
  397. define Package/strongswan-libtls/description
  398. $(call Package/strongswan/description/Default)
  399. This package contains libtls for strongSwan plugins eap-tls, eap-ttls,
  400. eap-peap, tnc-tnccs
  401. endef
  402. define BuildPlugin
  403. define Package/strongswan-mod-$(1)
  404. $$(call Package/strongswan/Default)
  405. TITLE:= StrongSwan $(2) plugin
  406. DEPENDS:= strongswan $(3)
  407. endef
  408. define Package/strongswan-mod-$(1)/install
  409. $(INSTALL_DIR) $$(1)/etc/strongswan.d/charon
  410. if [ -f $(PKG_INSTALL_DIR)/etc/strongswan.d/charon/$(1).conf ]; then \
  411. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/strongswan.d/charon/$(1).conf $$(1)/etc/strongswan.d/charon/; fi
  412. $(INSTALL_DIR) $$(1)/usr/lib/ipsec/plugins
  413. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ipsec/plugins/libstrongswan-$(1).so \
  414. $$(1)/usr/lib/ipsec/plugins/
  415. $(call Plugin/$(1)/install,$$(1))
  416. endef
  417. $$(eval $$(call BuildPackage,strongswan-mod-$(1)))
  418. endef
  419. CONFIGURE_ARGS+= \
  420. --disable-scripts \
  421. --disable-static \
  422. --disable-fast \
  423. --enable-mediation \
  424. --with-systemdsystemunitdir=no \
  425. $(if $(CONFIG_PACKAGE_strongswan-charon-cmd),--enable-cmd,--disable-cmd) \
  426. $(if $(CONFIG_PACKAGE_strongswan-pki),--enable-pki,--disable-pki) \
  427. $(if $(CONFIG_PACKAGE_strongswan-scepclient),--enable-scepclient,--disable-scepclient) \
  428. --with-random-device=/dev/random \
  429. --with-urandom-device=/dev/urandom \
  430. --with-routing-table="$(call qstrip,$(CONFIG_STRONGSWAN_ROUTING_TABLE))" \
  431. --with-routing-table-prio="$(call qstrip,$(CONFIG_STRONGSWAN_ROUTING_TABLE_PRIO))" \
  432. $(foreach m,$(PKG_MOD_AVAILABLE), \
  433. $(if $(CONFIG_PACKAGE_strongswan-mod-$(m)),--enable-$(m),--disable-$(m)) \
  434. ) \
  435. ac_cv_search___atomic_load=no
  436. define Package/strongswan/conffiles
  437. /etc/strongswan.conf
  438. /etc/strongswan.d/
  439. endef
  440. define Package/strongswan/install
  441. $(INSTALL_DIR) $(1)/etc
  442. $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/strongswan.conf $(1)/etc/
  443. echo -e "\ninclude /var/ipsec/strongswan.conf" >> $(1)/etc/strongswan.conf
  444. $(INSTALL_DIR) $(1)/usr/lib/ipsec
  445. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ipsec/libstrongswan.so.* $(1)/usr/lib/ipsec/
  446. endef
  447. define Package/strongswan-default/install
  448. true
  449. endef
  450. define Package/strongswan-full/install
  451. true
  452. endef
  453. define Package/strongswan-isakmp/install
  454. true
  455. endef
  456. define Package/strongswan-minimal/install
  457. true
  458. endef
  459. define Package/strongswan-charon/install
  460. $(INSTALL_DIR) $(1)/etc/strongswan.d
  461. $(CP) $(PKG_INSTALL_DIR)/etc/strongswan.d/charon.conf $(1)/etc/strongswan.d
  462. $(CP) $(PKG_INSTALL_DIR)/etc/strongswan.d/charon-logging.conf $(1)/etc/strongswan.d
  463. $(INSTALL_DIR) $(1)/usr/lib/ipsec
  464. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/ipsec/charon $(1)/usr/lib/ipsec/
  465. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ipsec/libcharon.so.* $(1)/usr/lib/ipsec/
  466. endef
  467. define Package/strongswan-charon-cmd/install
  468. $(INSTALL_DIR) $(1)/usr/sbin
  469. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/charon-cmd $(1)/usr/sbin/
  470. endef
  471. define Package/strongswan-ipsec/conffiles
  472. /etc/ipsec.d/
  473. /etc/ipsec.conf
  474. /etc/ipsec.secrets
  475. /etc/ipsec.user
  476. endef
  477. define Package/strongswan-ipsec/install
  478. $(INSTALL_DIR) $(1)/etc/ $(1)/usr/sbin
  479. $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/ipsec.conf $(1)/etc/
  480. echo -e "\ninclude /var/ipsec/ipsec.conf" >> $(1)/etc/ipsec.conf
  481. $(INSTALL_CONF) ./files/ipsec.secrets $(1)/etc/
  482. echo -e "\ninclude /var/ipsec/ipsec.secrets" >> $(1)/etc/ipsec.secrets
  483. $(INSTALL_CONF) ./files/ipsec.user $(1)/etc/
  484. $(INSTALL_DIR) $(1)/etc/init.d
  485. $(INSTALL_BIN) ./files/ipsec.init $(1)/etc/init.d/ipsec
  486. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ipsec $(1)/usr/sbin/
  487. endef
  488. define Package/strongswan-ipsec/postinst
  489. #!/bin/sh
  490. [ -z "$${IPKG_INSTROOT}" ] || exit 0
  491. opkg list-changed-conffiles | grep -qx /etc/ipsec.conf || {
  492. rm -f /etc/ipsec.conf-opkg
  493. }
  494. endef
  495. define Package/strongswan-libnttfft/install
  496. $(INSTALL_DIR) $(1)/usr/lib/ipsec
  497. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ipsec/libnttfft.so.* $(1)/usr/lib/ipsec/
  498. endef
  499. define Package/strongswan-pki/install
  500. $(INSTALL_DIR) $(1)/etc/strongswan.d
  501. $(CP) $(PKG_INSTALL_DIR)/etc/strongswan.d/pki.conf $(1)/etc/strongswan.d/
  502. $(INSTALL_DIR) $(1)/usr/bin
  503. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/pki $(1)/usr/bin/
  504. endef
  505. define Package/strongswan-scepclient/install
  506. $(INSTALL_DIR) $(1)/etc/strongswan.d
  507. $(CP) $(PKG_INSTALL_DIR)/etc/strongswan.d/scepclient.conf $(1)/etc/strongswan.d/
  508. $(INSTALL_DIR) $(1)/usr/lib/ipsec
  509. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/ipsec/scepclient $(1)/usr/lib/ipsec/
  510. endef
  511. define Package/strongswan-swanctl/conffiles
  512. /etc/config/ipsec
  513. /etc/swanctl/
  514. endef
  515. define Package/strongswan-swanctl/install
  516. $(INSTALL_DIR) $(1)/etc/init.d
  517. $(INSTALL_DIR) $(1)/etc/swanctl/{bliss,conf.d,ecdsa,pkcs{12,8},private,pubkey,rsa}
  518. $(INSTALL_DIR) $(1)/etc/swanctl/x509{,aa,ac,ca,crl,ocsp}
  519. $(CP) $(PKG_INSTALL_DIR)/etc/swanctl/swanctl.conf $(1)/etc/swanctl/
  520. echo "include /var/swanctl/swanctl.conf" >> $(1)/etc/swanctl/swanctl.conf
  521. $(INSTALL_DIR) $(1)/usr/sbin
  522. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/swanctl $(1)/usr/sbin/
  523. $(INSTALL_BIN) ./files/swanctl.init $(1)/etc/init.d/swanctl
  524. endef
  525. define Package/strongswan-gencerts/install
  526. $(INSTALL_DIR) $(1)/usr/bin
  527. $(INSTALL_BIN) ./files/gencerts.sh $(1)/usr/bin/gencerts
  528. endef
  529. define Package/strongswan-libtls/install
  530. $(INSTALL_DIR) $(1)/usr/lib/ipsec
  531. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ipsec/libtls.so.* $(1)/usr/lib/ipsec/
  532. endef
  533. define Plugin/duplicheck/install
  534. $(INSTALL_DIR) $(1)/usr/lib/ipsec/plugins
  535. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ipsec/duplicheck $(1)/usr/lib/ipsec/
  536. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ipsec/plugins/libstrongswan-duplicheck.so $(1)/usr/lib/ipsec/plugins/
  537. endef
  538. define Plugin/eap-radius/install
  539. $(INSTALL_DIR) $(1)/usr/lib/ipsec/plugins
  540. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ipsec/libradius.so.* $(1)/usr/lib/ipsec/
  541. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ipsec/plugins/libstrongswan-eap-radius.so $(1)/usr/lib/ipsec/plugins/
  542. endef
  543. define Plugin/attr-sql/install
  544. $(INSTALL_DIR) $(1)/usr/lib/ipsec
  545. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ipsec/pool $(1)/usr/lib/ipsec/
  546. endef
  547. define Plugin/stroke/install
  548. $(INSTALL_DIR) $(1)/etc/ipsec.d/{aacerts,acerts,cacerts,certs,crls,ocspcerts,private,reqs}
  549. $(INSTALL_DIR) $(1)/usr/lib/ipsec/plugins
  550. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/ipsec/{starter,stroke} $(1)/usr/lib/ipsec/
  551. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ipsec/plugins/libstrongswan-stroke.so $(1)/usr/lib/ipsec/plugins/
  552. endef
  553. define Plugin/updown/install
  554. $(INSTALL_DIR) $(1)/usr/lib/ipsec/plugins
  555. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ipsec/_updown $(1)/usr/lib/ipsec/
  556. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ipsec/plugins/libstrongswan-updown.so $(1)/usr/lib/ipsec/plugins/
  557. $(INSTALL_DIR) $(1)/etc/hotplug.d/ipsec
  558. $(CP) ./files/etc/hotplug.d/ipsec/01-user \
  559. $(1)/etc/hotplug.d/ipsec/01-user
  560. endef
  561. define Plugin/vici/install
  562. $(INSTALL_DIR) $(1)/usr/lib/ipsec/plugins
  563. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ipsec/libvici.so.* $(1)/usr/lib/ipsec/
  564. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ipsec/plugins/libstrongswan-vici.so $(1)/usr/lib/ipsec/plugins/
  565. endef
  566. define Plugin/whitelist/install
  567. $(INSTALL_DIR) $(1)/usr/lib/ipsec/plugins
  568. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ipsec/whitelist $(1)/usr/lib/ipsec/
  569. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ipsec/plugins/libstrongswan-whitelist.so $(1)/usr/lib/ipsec/plugins/
  570. endef
  571. define Plugin/kernel-libipsec/install
  572. $(INSTALL_DIR) $(1)/usr/lib/ipsec
  573. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ipsec/libipsec.so.* $(1)/usr/lib/ipsec/
  574. endef
  575. $(eval $(call BuildPackage,strongswan))
  576. $(eval $(call BuildPackage,strongswan-default))
  577. $(eval $(call BuildPackage,strongswan-full))
  578. $(eval $(call BuildPackage,strongswan-minimal))
  579. $(eval $(call BuildPackage,strongswan-isakmp))
  580. $(eval $(call BuildPackage,strongswan-charon))
  581. $(eval $(call BuildPackage,strongswan-charon-cmd))
  582. $(eval $(call BuildPackage,strongswan-ipsec))
  583. $(eval $(call BuildPackage,strongswan-libnttfft))
  584. $(eval $(call BuildPackage,strongswan-pki))
  585. $(eval $(call BuildPackage,strongswan-scepclient))
  586. $(eval $(call BuildPackage,strongswan-swanctl))
  587. $(eval $(call BuildPackage,strongswan-gencerts))
  588. $(eval $(call BuildPackage,strongswan-libtls))
  589. $(eval $(call BuildPlugin,addrblock,RFC 3779 address block constraint support,))
  590. $(eval $(call BuildPlugin,aes,AES crypto,))
  591. $(eval $(call BuildPlugin,af-alg,AF_ALG crypto interface to Linux Crypto API,+kmod-crypto-user))
  592. $(eval $(call BuildPlugin,agent,SSH agent signing,))
  593. $(eval $(call BuildPlugin,attr,file based config,))
  594. $(eval $(call BuildPlugin,attr-sql,SQL based config,+strongswan-charon))
  595. $(eval $(call BuildPlugin,bliss,BLISS crypto,+strongswan-libnttfft +strongswan-mod-mgf1 +strongswan-mod-hmac))
  596. $(eval $(call BuildPlugin,blowfish,Blowfish crypto,))
  597. $(eval $(call BuildPlugin,ccm,CCM AEAD wrapper crypto,))
  598. $(eval $(call BuildPlugin,chapoly,ChaCha20-Poly1305 AEAD crypto,+kmod-crypto-chacha20poly1305))
  599. $(eval $(call BuildPlugin,cmac,CMAC crypto,))
  600. $(eval $(call BuildPlugin,connmark,netfilter connection marking,+libip4tc))
  601. $(eval $(call BuildPlugin,constraints,advanced X509 constraint checking,))
  602. $(eval $(call BuildPlugin,coupling,IKEv2 plugin to couple peer certificates permanently to authentication,))
  603. $(eval $(call BuildPlugin,ctr,Counter Mode wrapper crypto,))
  604. $(eval $(call BuildPlugin,curl,cURL fetcher plugin,+PACKAGE_strongswan-mod-curl:libcurl))
  605. $(eval $(call BuildPlugin,curve25519,Curve25519 Diffie-Hellman,))
  606. $(eval $(call BuildPlugin,des,DES crypto,))
  607. $(eval $(call BuildPlugin,dhcp,DHCP based attribute provider,))
  608. $(eval $(call BuildPlugin,dnskey,DNS RR key decoding,))
  609. $(eval $(call BuildPlugin,duplicheck,advanced duplicate checking,))
  610. $(eval $(call BuildPlugin,eap-identity,EAP identity helper,))
  611. $(eval $(call BuildPlugin,eap-md5,EAP MD5 (CHAP) EAP auth,))
  612. $(eval $(call BuildPlugin,eap-mschapv2,EAP MS-CHAPv2 EAP auth,+strongswan-mod-md4 +strongswan-mod-des))
  613. $(eval $(call BuildPlugin,eap-radius,EAP RADIUS auth,))
  614. $(eval $(call BuildPlugin,eap-tls,EAP TLS auth,+strongswan-libtls))
  615. $(eval $(call BuildPlugin,farp,fake arp respsonses,))
  616. $(eval $(call BuildPlugin,fips-prf,FIPS PRF crypto,+strongswan-mod-sha1))
  617. $(eval $(call BuildPlugin,forecast,forward multi/broadcast traffic,+libip4tc +kmod-ipt-conntrack-extra))
  618. $(eval $(call BuildPlugin,gcm,GCM AEAD wrapper crypto,))
  619. $(eval $(call BuildPlugin,gcrypt,libgcrypt,+PACKAGE_strongswan-mod-gcrypt:libgcrypt))
  620. $(eval $(call BuildPlugin,gmp,libgmp,+PACKAGE_strongswan-mod-gmp:libgmp))
  621. $(eval $(call BuildPlugin,gmpdh,DH-Groups; no libgmp dep,))
  622. $(eval $(call BuildPlugin,ha,high availability cluster,))
  623. $(eval $(call BuildPlugin,hmac,HMAC crypto,))
  624. $(eval $(call BuildPlugin,kernel-libipsec,libipsec kernel interface,))
  625. $(eval $(call BuildPlugin,kernel-netlink,netlink kernel interface,))
  626. $(eval $(call BuildPlugin,ldap,LDAP,+PACKAGE_strongswan-mod-ldap:libopenldap))
  627. $(eval $(call BuildPlugin,led,LED blink on IKE activity,))
  628. $(eval $(call BuildPlugin,load-tester,load testing,))
  629. $(eval $(call BuildPlugin,nonce,nonce genereation,))
  630. $(eval $(call BuildPlugin,md4,MD4 crypto,))
  631. $(eval $(call BuildPlugin,md5,MD5 crypto,))
  632. $(eval $(call BuildPlugin,mgf1,MGF1 crypto,))
  633. $(eval $(call BuildPlugin,mysql,MySQL database interface,+strongswan-mod-sql +PACKAGE_strongswan-mod-mysql:libmysqlclient-r))
  634. $(eval $(call BuildPlugin,newhope,New Hope crypto,+strongswan-libnttfft +strongswan-mod-chapoly +strongswan-mod-sha3))
  635. $(eval $(call BuildPlugin,ntru,NTRU crypto,+strongswan-mod-mgf1))
  636. $(eval $(call BuildPlugin,openssl,OpenSSL crypto,+PACKAGE_strongswan-mod-openssl:libopenssl))
  637. $(eval $(call BuildPlugin,pem,PEM decoding,))
  638. $(eval $(call BuildPlugin,pgp,PGP key decoding,))
  639. $(eval $(call BuildPlugin,pkcs1,PKCS1 key decoding,))
  640. $(eval $(call BuildPlugin,pkcs7,PKCS7 key decoding,))
  641. $(eval $(call BuildPlugin,pkcs8,PKCS8 key decoding,))
  642. $(eval $(call BuildPlugin,pkcs11,PKCS11 key decoding,))
  643. $(eval $(call BuildPlugin,pkcs12,PKCS12 key decoding,))
  644. $(eval $(call BuildPlugin,pubkey,raw public key,))
  645. $(eval $(call BuildPlugin,random,RNG,))
  646. $(eval $(call BuildPlugin,rc2,RC2 crypto,))
  647. $(eval $(call BuildPlugin,resolve,DNS resolver,))
  648. $(eval $(call BuildPlugin,revocation,X509 CRL/OCSP revocation,))
  649. $(eval $(call BuildPlugin,sha1,SHA1 crypto,))
  650. $(eval $(call BuildPlugin,sha2,SHA2 crypto,))
  651. $(eval $(call BuildPlugin,sha3,SHA3 and SHAKE crypto,))
  652. $(eval $(call BuildPlugin,smp,SMP configuration and control interface,+PACKAGE_strongswan-mod-smp:libxml2))
  653. $(eval $(call BuildPlugin,socket-default,default socket implementation for charon,))
  654. $(eval $(call BuildPlugin,socket-dynamic,dynamic socket implementation for charon,))
  655. $(eval $(call BuildPlugin,sql,SQL database interface,))
  656. $(eval $(call BuildPlugin,sqlite,SQLite database interface,+strongswan-mod-sql +PACKAGE_strongswan-mod-sqlite:libsqlite3))
  657. $(eval $(call BuildPlugin,sshkey,SSH key decoding,))
  658. $(eval $(call BuildPlugin,stroke,Stroke,+strongswan-charon +strongswan-ipsec))
  659. $(eval $(call BuildPlugin,test-vectors,crypto test vectors,))
  660. $(eval $(call BuildPlugin,uci,UCI config interface,+PACKAGE_strongswan-mod-uci:libuci))
  661. $(eval $(call BuildPlugin,unity,Cisco Unity extension,))
  662. $(eval $(call BuildPlugin,updown,updown firewall,+iptables-legacy +iptables-mod-ipsec +kmod-ipt-ipsec))
  663. $(eval $(call BuildPlugin,vici,Versatile IKE Configuration Interface,))
  664. $(eval $(call BuildPlugin,whitelist,peer identity whitelisting,))
  665. $(eval $(call BuildPlugin,wolfssl,WolfSSL crypto,+PACKAGE_strongswan-mod-wolfssl:libwolfssl))
  666. $(eval $(call BuildPlugin,x509,x509 certificate,))
  667. $(eval $(call BuildPlugin,xauth-eap,EAP XAuth backend,))
  668. $(eval $(call BuildPlugin,xauth-generic,generic XAuth backend,))
  669. $(eval $(call BuildPlugin,xcbc,xcbc crypto,))