ericpaulbishop/gargoyle — pull request #123 by datadeflator (2013-04-17 06:31:42+00:00)
Title: OpenVPN Client Manual: add missing ca, cert, key

Config Client Manually: currently, enabling tls-auth adds a dummy template line "tls-auth ta.key 1" to the conf text. Server-side, openvpn_upload_client.sh: sed changes it to "tls-auth /etc/openvpn/[clientName]_ta.key 1".

openvpn_upload_client.sh is written to do the same for ca, cert, key. However, the web client currently doesn't add such template lines to the conf text for {ca,cert,key}.

Fix: before saving, if any of the {ca,cert,key} lines are missing, append a template line to conf text so it can later be properly rewritten.