openfortivpn: add user, key, CA PEM support
Allow authentication inputs by key/cert PEM. Signed-off-by: Matthew Hagan <mnhagan88@gmail.com>
This commit is contained in:
parent
e99afaa97c
commit
008d4afa5f
3 changed files with 11 additions and 1 deletions
|
@ -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))
|
||||||
|
|
|
@ -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
net/openfortivpn/files/openfortivpn.upgrade
Normal file
3
net/openfortivpn/files/openfortivpn.upgrade
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
/etc/openfortivpn/user-cert-*.pem
|
||||||
|
/etc/openfortivpn/user-key-*.pem
|
||||||
|
/etc/openfortivpn/ca-*.pem
|
Loading…
Reference in a new issue