Browse Source

openfortivpn: add user, key, CA PEM support

Allow authentication inputs by key/cert PEM.

Signed-off-by: Matthew Hagan <mnhagan88@gmail.com>
lilik-openwrt-22.03
Matthew Hagan 3 years ago
committed by Rosen Penev
parent
commit
008d4afa5f
3 changed files with 11 additions and 1 deletions
  1. +4
    -1
      net/openfortivpn/Makefile
  2. +4
    -0
      net/openfortivpn/files/openfortivpn.sh
  3. +3
    -0
      net/openfortivpn/files/openfortivpn.upgrade

+ 4
- 1
net/openfortivpn/Makefile View File

@ -54,12 +54,15 @@ define Package/openfortivpn/install
$(INSTALL_DIR) \ $(INSTALL_DIR) \
$(1)/usr/sbin \ $(1)/usr/sbin \
$(1)/lib/netifd/proto \ $(1)/lib/netifd/proto \
$(1)/etc/hotplug.d/iface
$(1)/etc/hotplug.d/iface \
$(1)/etc/openfortivpn \
$(1)/lib/upgrade/keep.d
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/openfortivpn $(1)/usr/sbin/ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/openfortivpn $(1)/usr/sbin/
$(INSTALL_BIN) ./files/openfortivpn-wrapper $(1)/usr/sbin/ $(INSTALL_BIN) ./files/openfortivpn-wrapper $(1)/usr/sbin/
$(INSTALL_BIN) ./files/openfortivpn.sh $(1)/lib/netifd/proto/ $(INSTALL_BIN) ./files/openfortivpn.sh $(1)/lib/netifd/proto/
$(INSTALL_BIN) ./files/openfortivpn-ppp-up $(1)/lib/netifd/openfortivpn-ppp-up $(INSTALL_BIN) ./files/openfortivpn-ppp-up $(1)/lib/netifd/openfortivpn-ppp-up
$(INSTALL_DATA) ./files/openfortivpn.upgrade $(1)/lib/upgrade/keep.d/openfortivpn
endef endef
$(eval $(call BuildPackage,openfortivpn)) $(eval $(call BuildPackage,openfortivpn))

+ 4
- 0
net/openfortivpn/files/openfortivpn.sh View File

@ -132,6 +132,10 @@ proto_openfortivpn_setup() {
mkdir -p '/var/etc/openfortivpn/peers' mkdir -p '/var/etc/openfortivpn/peers'
} }
[ -f /etc/openfortivpn/user-cert-$config.pem ] && append_args "--user-cert=/etc/openfortivpn/user-cert-$config.pem"
[ -f /etc/openfortivpn/user-key-$config.pem ] && append_args "--user-key=/etc/openfortivpn/user-key-$config.pem"
[ -f /etc/openfortivpn/ca-$config.pem ] && append_args "--ca-file=/etc/openfortivpn/ca-$config.pem"
callfile="/var/etc/openfortivpn/peers/$config" callfile="/var/etc/openfortivpn/peers/$config"
echo "115200 echo "115200
:$local_ip :$local_ip


+ 3
- 0
net/openfortivpn/files/openfortivpn.upgrade View File

@ -0,0 +1,3 @@
/etc/openfortivpn/user-cert-*.pem
/etc/openfortivpn/user-key-*.pem
/etc/openfortivpn/ca-*.pem

Loading…
Cancel
Save