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.

742 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)
  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. x509 \
  95. xauth-eap \
  96. xauth-generic \
  97. xcbc
  98. PKG_CONFIG_DEPENDS:= \
  99. CONFIG_STRONGSWAN_ROUTING_TABLE \
  100. CONFIG_STRONGSWAN_ROUTING_TABLE_PRIO \
  101. $(patsubst %,CONFIG_PACKAGE_strongswan-mod-%,$(PKG_MOD_AVAILABLE)) \
  102. PKG_FIXUP:=autoreconf
  103. PKG_INSTALL:=1
  104. PKG_BUILD_PARALLEL:=1
  105. include $(INCLUDE_DIR)/package.mk
  106. # strongswan-mod-mysql needs iconv
  107. include $(INCLUDE_DIR)/nls.mk
  108. define Package/strongswan/Default
  109. SUBMENU:=VPN
  110. SECTION:=net
  111. CATEGORY:=Network
  112. TITLE:=StrongSwan
  113. URL:=http://www.strongswan.org/
  114. endef
  115. define Package/strongswan/description/Default
  116. StrongSwan is an OpenSource IPsec implementation for the Linux operating system.
  117. endef
  118. define Package/strongswan
  119. $(call Package/strongswan/Default)
  120. MENU:=1
  121. DEPENDS:= +libpthread +ip \
  122. +kmod-crypto-authenc \
  123. +kmod-ipsec +kmod-ipsec4 +IPV6:kmod-ipsec6 \
  124. +kmod-ipt-ipsec +iptables-mod-ipsec
  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-x509 \
  215. +strongswan-mod-xauth-eap \
  216. +strongswan-mod-xauth-generic \
  217. +strongswan-mod-xcbc \
  218. +strongswan-pki \
  219. +strongswan-scepclient \
  220. +strongswan-swanctl \
  221. @DEVEL
  222. endef
  223. define Package/strongswan-full/description
  224. $(call Package/strongswan/description/Default)
  225. This meta-package contains dependencies for all of the strongswan plugins
  226. except kernel-libipsec,
  227. socket-dynamic and which are omitted in favor of the kernel-netlink and
  228. socket-default plugins.
  229. endef
  230. define Package/strongswan-default
  231. $(call Package/strongswan/Default)
  232. TITLE+= (default)
  233. DEPENDS:= strongswan \
  234. +strongswan-charon \
  235. +strongswan-mod-aes \
  236. +strongswan-mod-attr \
  237. +strongswan-mod-connmark \
  238. +strongswan-mod-constraints \
  239. +strongswan-mod-des \
  240. +strongswan-mod-dnskey \
  241. +strongswan-mod-fips-prf \
  242. +strongswan-mod-gmp \
  243. +strongswan-mod-hmac \
  244. +strongswan-mod-kernel-netlink \
  245. +strongswan-mod-md5 \
  246. +strongswan-mod-nonce \
  247. +strongswan-mod-pem \
  248. +strongswan-mod-pgp \
  249. +strongswan-mod-pkcs1 \
  250. +strongswan-mod-pubkey \
  251. +strongswan-mod-random \
  252. +strongswan-mod-rc2 \
  253. +strongswan-mod-resolve \
  254. +strongswan-mod-revocation \
  255. +strongswan-mod-sha1 \
  256. +strongswan-mod-sha2 \
  257. +strongswan-mod-socket-default \
  258. +strongswan-mod-sshkey \
  259. +strongswan-mod-updown \
  260. +strongswan-mod-x509 \
  261. +strongswan-mod-xauth-generic \
  262. +strongswan-mod-xcbc \
  263. +strongswan-swanctl
  264. endef
  265. define Package/strongswan-default/description
  266. $(call Package/strongswan/description/Default)
  267. This meta-package contains only dependencies to match upstream defaults.
  268. endef
  269. define Package/strongswan-isakmp
  270. $(call Package/strongswan/Default)
  271. TITLE+= (isakmp)
  272. DEPENDS:= strongswan \
  273. +strongswan-charon \
  274. +strongswan-ipsec \
  275. +strongswan-mod-aes \
  276. +strongswan-mod-des \
  277. +strongswan-mod-gmpdh \
  278. +strongswan-mod-hmac \
  279. +strongswan-mod-kernel-netlink \
  280. +strongswan-mod-md5 \
  281. +strongswan-mod-nonce \
  282. +strongswan-mod-pubkey \
  283. +strongswan-mod-random \
  284. +strongswan-mod-sha1 \
  285. +strongswan-mod-socket-default \
  286. +strongswan-mod-stroke \
  287. +strongswan-mod-uci \
  288. +strongswan-mod-updown
  289. endef
  290. define Package/strongswan-isakmp/description
  291. $(call Package/strongswan/description/Default)
  292. This meta-package contains only dependencies to establish ISAKMP /
  293. IKE PSK connections, dropping other capabilities in favor of small size
  294. Can fit most routers even with 4Mb flash (after removing IPv6 support).
  295. endef
  296. define Package/strongswan-minimal
  297. $(call Package/strongswan/Default)
  298. TITLE+= (minimal)
  299. DEPENDS:= strongswan \
  300. +strongswan-charon \
  301. +strongswan-mod-aes \
  302. +strongswan-mod-gmp \
  303. +strongswan-mod-hmac \
  304. +strongswan-mod-kernel-netlink \
  305. +strongswan-mod-nonce \
  306. +strongswan-mod-pubkey \
  307. +strongswan-mod-random \
  308. +strongswan-mod-sha1 \
  309. +strongswan-mod-socket-default \
  310. +strongswan-mod-stroke \
  311. +strongswan-mod-updown \
  312. +strongswan-mod-x509 \
  313. +strongswan-mod-xcbc
  314. endef
  315. define Package/strongswan-minimal/description
  316. $(call Package/strongswan/description/Default)
  317. This meta-package contains only dependencies for a minimal IKEv2 setup.
  318. endef
  319. define Package/strongswan-charon
  320. $(call Package/strongswan/Default)
  321. TITLE+= IKEv1/IKEv2 keying daemon
  322. DEPENDS:= strongswan
  323. endef
  324. define Package/strongswan-charon/description
  325. $(call Package/strongswan/description/Default)
  326. This package contains charon, an IKEv2 keying daemon.
  327. endef
  328. define Package/strongswan-charon-cmd
  329. $(call Package/strongswan/Default)
  330. TITLE+= charon-cmd utility
  331. DEPENDS:= strongswan +strongswan-charon
  332. endef
  333. define Package/strongswan-charon-cmd/description
  334. $(call Package/strongswan/description/Default)
  335. This package contains the charon-cmd utility.
  336. endef
  337. define Package/strongswan-ipsec
  338. $(call Package/strongswan/Default)
  339. TITLE+= utilities
  340. DEPENDS:= strongswan
  341. endef
  342. define Package/strongswan-ipsec/description
  343. $(call Package/strongswan/description/Default)
  344. This package contains the ipsec utility.
  345. endef
  346. define Package/strongswan-libnttfft
  347. $(call Package/strongswan/Default)
  348. TITLE+= nttfft library
  349. DEPENDS:= strongswan
  350. endef
  351. define Package/strongswan-libnttfft/description
  352. $(call Package/strongswan/description/Default)
  353. This package contains the Number Theoretic Transforms library.
  354. endef
  355. define Package/strongswan-pki
  356. $(call Package/strongswan/Default)
  357. TITLE+= PKI tool
  358. DEPENDS:= strongswan
  359. endef
  360. define Package/strongswan-pki/description
  361. $(call Package/strongswan/description/Default)
  362. This package contains the pki tool.
  363. endef
  364. define Package/strongswan-scepclient
  365. $(call Package/strongswan/Default)
  366. TITLE+= SCEP client
  367. DEPENDS:= strongswan
  368. endef
  369. define Package/strongswan-scepclient/description
  370. $(call Package/strongswan/description/Default)
  371. This package contains the SCEP client.
  372. endef
  373. define Package/strongswan-swanctl
  374. $(call Package/strongswan/Default)
  375. TITLE+= swanctl utility
  376. DEPENDS:= strongswan +strongswan-mod-vici
  377. endef
  378. define Package/strongswan-swanctl/description
  379. $(call Package/strongswan/description/Default)
  380. This package contains the swanctl utility.
  381. endef
  382. define Package/strongswan-gencerts
  383. $(call Package/strongswan/Default)
  384. TITLE+= X.509 certificate generation utility
  385. DEPENDS:= strongswan +strongswan-pki bash
  386. endef
  387. define Package/strongswan-gencerts/description
  388. $(call Package/strongswan/description/Default)
  389. This package contains the X.509 certificate generation utility.
  390. endef
  391. define Package/strongswan-libtls
  392. $(call Package/strongswan/Default)
  393. TITLE+= libtls
  394. DEPENDS:= strongswan
  395. endef
  396. define Package/strongswan-libtls/description
  397. $(call Package/strongswan/description/Default)
  398. This package contains libtls for strongSwan plugins eap-tls, eap-ttls,
  399. eap-peap, tnc-tnccs
  400. endef
  401. define BuildPlugin
  402. define Package/strongswan-mod-$(1)
  403. $$(call Package/strongswan/Default)
  404. TITLE:= StrongSwan $(2) plugin
  405. DEPENDS:= strongswan $(3)
  406. endef
  407. define Package/strongswan-mod-$(1)/install
  408. $(INSTALL_DIR) $$(1)/etc/strongswan.d/charon
  409. if [ -f $(PKG_INSTALL_DIR)/etc/strongswan.d/charon/$(1).conf ]; then \
  410. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/strongswan.d/charon/$(1).conf $$(1)/etc/strongswan.d/charon/; fi
  411. $(INSTALL_DIR) $$(1)/usr/lib/ipsec/plugins
  412. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ipsec/plugins/libstrongswan-$(1).so \
  413. $$(1)/usr/lib/ipsec/plugins/
  414. $(call Plugin/$(1)/install,$$(1))
  415. endef
  416. $$(eval $$(call BuildPackage,strongswan-mod-$(1)))
  417. endef
  418. CONFIGURE_ARGS+= \
  419. --disable-scripts \
  420. --disable-static \
  421. --disable-fast \
  422. --enable-mediation \
  423. --with-systemdsystemunitdir=no \
  424. $(if $(CONFIG_PACKAGE_strongswan-charon-cmd),--enable-cmd,--disable-cmd) \
  425. $(if $(CONFIG_PACKAGE_strongswan-pki),--enable-pki,--disable-pki) \
  426. $(if $(CONFIG_PACKAGE_strongswan-scepclient),--enable-scepclient,--disable-scepclient) \
  427. --with-random-device=/dev/random \
  428. --with-urandom-device=/dev/urandom \
  429. --with-routing-table="$(call qstrip,$(CONFIG_STRONGSWAN_ROUTING_TABLE))" \
  430. --with-routing-table-prio="$(call qstrip,$(CONFIG_STRONGSWAN_ROUTING_TABLE_PRIO))" \
  431. $(foreach m,$(PKG_MOD_AVAILABLE), \
  432. $(if $(CONFIG_PACKAGE_strongswan-mod-$(m)),--enable-$(m),--disable-$(m)) \
  433. ) \
  434. ac_cv_search___atomic_load=no
  435. define Package/strongswan/conffiles
  436. /etc/strongswan.conf
  437. /etc/strongswan.d/
  438. endef
  439. define Package/strongswan/install
  440. $(INSTALL_DIR) $(1)/etc
  441. $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/strongswan.conf $(1)/etc/
  442. echo -e "\ninclude /var/ipsec/strongswan.conf" >> $(1)/etc/strongswan.conf
  443. $(INSTALL_DIR) $(1)/usr/lib/ipsec
  444. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ipsec/libstrongswan.so.* $(1)/usr/lib/ipsec/
  445. endef
  446. define Package/strongswan-default/install
  447. true
  448. endef
  449. define Package/strongswan-full/install
  450. true
  451. endef
  452. define Package/strongswan-isakmp/install
  453. true
  454. endef
  455. define Package/strongswan-minimal/install
  456. true
  457. endef
  458. define Package/strongswan-charon/install
  459. $(INSTALL_DIR) $(1)/etc/strongswan.d
  460. $(CP) $(PKG_INSTALL_DIR)/etc/strongswan.d/charon.conf $(1)/etc/strongswan.d
  461. $(CP) $(PKG_INSTALL_DIR)/etc/strongswan.d/charon-logging.conf $(1)/etc/strongswan.d
  462. $(INSTALL_DIR) $(1)/usr/lib/ipsec
  463. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/ipsec/charon $(1)/usr/lib/ipsec/
  464. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ipsec/libcharon.so.* $(1)/usr/lib/ipsec/
  465. endef
  466. define Package/strongswan-charon-cmd/install
  467. $(INSTALL_DIR) $(1)/usr/sbin
  468. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/charon-cmd $(1)/usr/sbin/
  469. endef
  470. define Package/strongswan-ipsec/conffiles
  471. /etc/ipsec.d/
  472. /etc/ipsec.conf
  473. /etc/ipsec.secrets
  474. /etc/ipsec.user
  475. endef
  476. define Package/strongswan-ipsec/install
  477. $(INSTALL_DIR) $(1)/etc/ $(1)/usr/sbin
  478. $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/ipsec.conf $(1)/etc/
  479. echo -e "\ninclude /var/ipsec/ipsec.conf" >> $(1)/etc/ipsec.conf
  480. $(INSTALL_CONF) ./files/ipsec.secrets $(1)/etc/
  481. echo -e "\ninclude /var/ipsec/ipsec.secrets" >> $(1)/etc/ipsec.secrets
  482. $(INSTALL_CONF) ./files/ipsec.user $(1)/etc/
  483. $(INSTALL_DIR) $(1)/etc/init.d
  484. $(INSTALL_BIN) ./files/ipsec.init $(1)/etc/init.d/ipsec
  485. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ipsec $(1)/usr/sbin/
  486. endef
  487. define Package/strongswan-ipsec/postinst
  488. #!/bin/sh
  489. [ -z "$${IPKG_INSTROOT}" ] || exit 0
  490. opkg list-changed-conffiles | grep -qx /etc/ipsec.conf || {
  491. rm -f /etc/ipsec.conf-opkg
  492. }
  493. endef
  494. define Package/strongswan-libnttfft/install
  495. $(INSTALL_DIR) $(1)/usr/lib/ipsec
  496. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ipsec/libnttfft.so.* $(1)/usr/lib/ipsec/
  497. endef
  498. define Package/strongswan-pki/install
  499. $(INSTALL_DIR) $(1)/etc/strongswan.d
  500. $(CP) $(PKG_INSTALL_DIR)/etc/strongswan.d/pki.conf $(1)/etc/strongswan.d/
  501. $(INSTALL_DIR) $(1)/usr/bin
  502. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/pki $(1)/usr/bin/
  503. endef
  504. define Package/strongswan-scepclient/install
  505. $(INSTALL_DIR) $(1)/etc/strongswan.d
  506. $(CP) $(PKG_INSTALL_DIR)/etc/strongswan.d/scepclient.conf $(1)/etc/strongswan.d/
  507. $(INSTALL_DIR) $(1)/usr/lib/ipsec
  508. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/ipsec/scepclient $(1)/usr/lib/ipsec/
  509. endef
  510. define Package/strongswan-swanctl/conffiles
  511. /etc/config/ipsec
  512. /etc/swanctl/
  513. endef
  514. define Package/strongswan-swanctl/install
  515. $(INSTALL_DIR) $(1)/etc/init.d
  516. $(INSTALL_DIR) $(1)/etc/swanctl/{bliss,conf.d,ecdsa,pkcs{12,8},private,pubkey,rsa}
  517. $(INSTALL_DIR) $(1)/etc/swanctl/x509{,aa,ac,ca,crl,ocsp}
  518. $(CP) $(PKG_INSTALL_DIR)/etc/swanctl/swanctl.conf $(1)/etc/swanctl/
  519. echo "include /var/swanctl/swanctl.conf" >> $(1)/etc/swanctl/swanctl.conf
  520. $(INSTALL_DIR) $(1)/usr/sbin
  521. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/swanctl $(1)/usr/sbin/
  522. $(INSTALL_BIN) ./files/swanctl.init $(1)/etc/init.d/swanctl
  523. endef
  524. define Package/strongswan-gencerts/install
  525. $(INSTALL_DIR) $(1)/usr/bin
  526. $(INSTALL_BIN) ./files/gencerts.sh $(1)/usr/bin/gencerts
  527. endef
  528. define Package/strongswan-libtls/install
  529. $(INSTALL_DIR) $(1)/usr/lib/ipsec
  530. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ipsec/libtls.so.* $(1)/usr/lib/ipsec/
  531. endef
  532. define Plugin/duplicheck/install
  533. $(INSTALL_DIR) $(1)/usr/lib/ipsec/plugins
  534. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ipsec/duplicheck $(1)/usr/lib/ipsec/
  535. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ipsec/plugins/libstrongswan-duplicheck.so $(1)/usr/lib/ipsec/plugins/
  536. endef
  537. define Plugin/eap-radius/install
  538. $(INSTALL_DIR) $(1)/usr/lib/ipsec/plugins
  539. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ipsec/libradius.so.* $(1)/usr/lib/ipsec/
  540. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ipsec/plugins/libstrongswan-eap-radius.so $(1)/usr/lib/ipsec/plugins/
  541. endef
  542. define Plugin/attr-sql/install
  543. $(INSTALL_DIR) $(1)/usr/lib/ipsec
  544. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ipsec/pool $(1)/usr/lib/ipsec/
  545. endef
  546. define Plugin/stroke/install
  547. $(INSTALL_DIR) $(1)/etc/ipsec.d/{aacerts,acerts,cacerts,certs,crls,ocspcerts,private,reqs}
  548. $(INSTALL_DIR) $(1)/usr/lib/ipsec/plugins
  549. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/ipsec/{starter,stroke} $(1)/usr/lib/ipsec/
  550. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ipsec/plugins/libstrongswan-stroke.so $(1)/usr/lib/ipsec/plugins/
  551. endef
  552. define Plugin/updown/install
  553. $(INSTALL_DIR) $(1)/usr/lib/ipsec/plugins
  554. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ipsec/_updown $(1)/usr/lib/ipsec/
  555. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ipsec/plugins/libstrongswan-updown.so $(1)/usr/lib/ipsec/plugins/
  556. $(INSTALL_DIR) $(1)/etc/hotplug.d/ipsec
  557. $(CP) ./files/etc/hotplug.d/ipsec/01-user \
  558. $(1)/etc/hotplug.d/ipsec/01-user
  559. endef
  560. define Plugin/vici/install
  561. $(INSTALL_DIR) $(1)/usr/lib/ipsec/plugins
  562. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ipsec/libvici.so.* $(1)/usr/lib/ipsec/
  563. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ipsec/plugins/libstrongswan-vici.so $(1)/usr/lib/ipsec/plugins/
  564. endef
  565. define Plugin/whitelist/install
  566. $(INSTALL_DIR) $(1)/usr/lib/ipsec/plugins
  567. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ipsec/whitelist $(1)/usr/lib/ipsec/
  568. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ipsec/plugins/libstrongswan-whitelist.so $(1)/usr/lib/ipsec/plugins/
  569. endef
  570. define Plugin/kernel-libipsec/install
  571. $(INSTALL_DIR) $(1)/usr/lib/ipsec
  572. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ipsec/libipsec.so.* $(1)/usr/lib/ipsec/
  573. endef
  574. $(eval $(call BuildPackage,strongswan))
  575. $(eval $(call BuildPackage,strongswan-default))
  576. $(eval $(call BuildPackage,strongswan-full))
  577. $(eval $(call BuildPackage,strongswan-minimal))
  578. $(eval $(call BuildPackage,strongswan-isakmp))
  579. $(eval $(call BuildPackage,strongswan-charon))
  580. $(eval $(call BuildPackage,strongswan-charon-cmd))
  581. $(eval $(call BuildPackage,strongswan-ipsec))
  582. $(eval $(call BuildPackage,strongswan-libnttfft))
  583. $(eval $(call BuildPackage,strongswan-pki))
  584. $(eval $(call BuildPackage,strongswan-scepclient))
  585. $(eval $(call BuildPackage,strongswan-swanctl))
  586. $(eval $(call BuildPackage,strongswan-gencerts))
  587. $(eval $(call BuildPackage,strongswan-libtls))
  588. $(eval $(call BuildPlugin,addrblock,RFC 3779 address block constraint support,))
  589. $(eval $(call BuildPlugin,aes,AES crypto,))
  590. $(eval $(call BuildPlugin,af-alg,AF_ALG crypto interface to Linux Crypto API,+kmod-crypto-user))
  591. $(eval $(call BuildPlugin,agent,SSH agent signing,))
  592. $(eval $(call BuildPlugin,attr,file based config,))
  593. $(eval $(call BuildPlugin,attr-sql,SQL based config,+strongswan-charon))
  594. $(eval $(call BuildPlugin,bliss,BLISS crypto,+strongswan-libnttfft +strongswan-mod-mgf1 +strongswan-mod-hmac))
  595. $(eval $(call BuildPlugin,blowfish,Blowfish crypto,))
  596. $(eval $(call BuildPlugin,ccm,CCM AEAD wrapper crypto,))
  597. $(eval $(call BuildPlugin,chapoly,ChaCha20-Poly1305 AEAD crypto,))
  598. $(eval $(call BuildPlugin,cmac,CMAC crypto,))
  599. $(eval $(call BuildPlugin,connmark,netfilter connection marking,+iptables-legacy))
  600. $(eval $(call BuildPlugin,constraints,advanced X509 constraint checking,))
  601. $(eval $(call BuildPlugin,coupling,IKEv2 plugin to couple peer certificates permanently to authentication,))
  602. $(eval $(call BuildPlugin,ctr,Counter Mode wrapper crypto,))
  603. $(eval $(call BuildPlugin,curl,cURL fetcher plugin,+PACKAGE_strongswan-mod-curl:libcurl))
  604. $(eval $(call BuildPlugin,curve25519,Curve25519 Diffie-Hellman,))
  605. $(eval $(call BuildPlugin,des,DES crypto,))
  606. $(eval $(call BuildPlugin,dhcp,DHCP based attribute provider,))
  607. $(eval $(call BuildPlugin,dnskey,DNS RR key decoding,))
  608. $(eval $(call BuildPlugin,duplicheck,advanced duplicate checking,))
  609. $(eval $(call BuildPlugin,eap-identity,EAP identity helper,))
  610. $(eval $(call BuildPlugin,eap-md5,EAP MD5 (CHAP) EAP auth,))
  611. $(eval $(call BuildPlugin,eap-mschapv2,EAP MS-CHAPv2 EAP auth,+strongswan-mod-md4 +strongswan-mod-des))
  612. $(eval $(call BuildPlugin,eap-radius,EAP RADIUS auth,))
  613. $(eval $(call BuildPlugin,eap-tls,EAP TLS auth,+strongswan-libtls))
  614. $(eval $(call BuildPlugin,farp,fake arp respsonses,))
  615. $(eval $(call BuildPlugin,fips-prf,FIPS PRF crypto,+strongswan-mod-sha1))
  616. $(eval $(call BuildPlugin,forecast,forward multi/broadcast traffic,+iptables-legacy +kmod-ipt-conntrack-extra))
  617. $(eval $(call BuildPlugin,gcm,GCM AEAD wrapper crypto,))
  618. $(eval $(call BuildPlugin,gcrypt,libgcrypt,+PACKAGE_strongswan-mod-gcrypt:libgcrypt))
  619. $(eval $(call BuildPlugin,gmp,libgmp,+PACKAGE_strongswan-mod-gmp:libgmp))
  620. $(eval $(call BuildPlugin,gmpdh,DH-Groups; no libgmp dep,))
  621. $(eval $(call BuildPlugin,ha,high availability cluster,))
  622. $(eval $(call BuildPlugin,hmac,HMAC crypto,))
  623. $(eval $(call BuildPlugin,kernel-libipsec,libipsec kernel interface,))
  624. $(eval $(call BuildPlugin,kernel-netlink,netlink kernel interface,))
  625. $(eval $(call BuildPlugin,ldap,LDAP,+PACKAGE_strongswan-mod-ldap:libopenldap))
  626. $(eval $(call BuildPlugin,led,LED blink on IKE activity,))
  627. $(eval $(call BuildPlugin,load-tester,load testing,))
  628. $(eval $(call BuildPlugin,nonce,nonce genereation,))
  629. $(eval $(call BuildPlugin,md4,MD4 crypto,))
  630. $(eval $(call BuildPlugin,md5,MD5 crypto,))
  631. $(eval $(call BuildPlugin,mgf1,MGF1 crypto,))
  632. $(eval $(call BuildPlugin,mysql,MySQL database interface,+strongswan-mod-sql +PACKAGE_strongswan-mod-mysql:libmysqlclient-r))
  633. $(eval $(call BuildPlugin,newhope,New Hope crypto,+strongswan-libnttfft +strongswan-mod-chapoly +strongswan-mod-sha3))
  634. $(eval $(call BuildPlugin,ntru,NTRU crypto,+strongswan-mod-mgf1))
  635. $(eval $(call BuildPlugin,openssl,OpenSSL crypto,+PACKAGE_strongswan-mod-openssl:libopenssl))
  636. $(eval $(call BuildPlugin,pem,PEM decoding,))
  637. $(eval $(call BuildPlugin,pgp,PGP key decoding,))
  638. $(eval $(call BuildPlugin,pkcs1,PKCS1 key decoding,))
  639. $(eval $(call BuildPlugin,pkcs7,PKCS7 key decoding,))
  640. $(eval $(call BuildPlugin,pkcs8,PKCS8 key decoding,))
  641. $(eval $(call BuildPlugin,pkcs11,PKCS11 key decoding,))
  642. $(eval $(call BuildPlugin,pkcs12,PKCS12 key decoding,))
  643. $(eval $(call BuildPlugin,pubkey,raw public key,))
  644. $(eval $(call BuildPlugin,random,RNG,))
  645. $(eval $(call BuildPlugin,rc2,RC2 crypto,))
  646. $(eval $(call BuildPlugin,resolve,DNS resolver,))
  647. $(eval $(call BuildPlugin,revocation,X509 CRL/OCSP revocation,))
  648. $(eval $(call BuildPlugin,sha1,SHA1 crypto,))
  649. $(eval $(call BuildPlugin,sha2,SHA2 crypto,))
  650. $(eval $(call BuildPlugin,sha3,SHA3 and SHAKE crypto,))
  651. $(eval $(call BuildPlugin,smp,SMP configuration and control interface,+PACKAGE_strongswan-mod-smp:libxml2))
  652. $(eval $(call BuildPlugin,socket-default,default socket implementation for charon,))
  653. $(eval $(call BuildPlugin,socket-dynamic,dynamic socket implementation for charon,))
  654. $(eval $(call BuildPlugin,sql,SQL database interface,))
  655. $(eval $(call BuildPlugin,sqlite,SQLite database interface,+strongswan-mod-sql +PACKAGE_strongswan-mod-sqlite:libsqlite3))
  656. $(eval $(call BuildPlugin,sshkey,SSH key decoding,))
  657. $(eval $(call BuildPlugin,stroke,Stroke,+strongswan-charon +strongswan-ipsec))
  658. $(eval $(call BuildPlugin,test-vectors,crypto test vectors,))
  659. $(eval $(call BuildPlugin,uci,UCI config interface,+PACKAGE_strongswan-mod-uci:libuci))
  660. $(eval $(call BuildPlugin,unity,Cisco Unity extension,))
  661. $(eval $(call BuildPlugin,updown,updown firewall,))
  662. $(eval $(call BuildPlugin,vici,Versatile IKE Configuration Interface,))
  663. $(eval $(call BuildPlugin,whitelist,peer identity whitelisting,))
  664. $(eval $(call BuildPlugin,x509,x509 certificate,))
  665. $(eval $(call BuildPlugin,xauth-eap,EAP XAuth backend,))
  666. $(eval $(call BuildPlugin,xauth-generic,generic XAuth backend,))
  667. $(eval $(call BuildPlugin,xcbc,xcbc crypto,))