mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-15 17:14:46 +00:00
openvpn: proper style and a TODO for zapping OpenSSL (#42)
This commit is contained in:
parent
65ab157cd6
commit
9314298f10
@ -1,14 +1,14 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ "$1" = "tls" ]; then
|
||||
(/usr/local/bin/php /usr/local/etc/inc/openvpn.tls-verify.php -d "$2" "$3")
|
||||
exit $?
|
||||
/usr/local/bin/php /usr/local/etc/inc/openvpn.tls-verify.php -d "$2" "$3"
|
||||
else
|
||||
# Single quoting $password breaks getting the value from the variable.
|
||||
password=$(echo -n "${password}" | openssl enc -base64 | sed -e 's/=/%3D/g')
|
||||
username=$(echo -n "${username}" | openssl enc -base64 | sed -e 's/=/%3D/g')
|
||||
# XXX I really don't like going through openssl for this...
|
||||
password=$(echo -n "${password}" | /usr/local/bin/openssl enc -base64 | sed -e 's/=/%3D/g')
|
||||
username=$(echo -n "${username}" | /usr/local/bin/openssl enc -base64 | sed -e 's/=/%3D/g')
|
||||
|
||||
(/usr/local/bin/php /usr/local/etc/inc/openvpn.auth-user.php "$username" "$password" "$common_name" "$3" "$2" "$4")
|
||||
exit $?
|
||||
/usr/local/bin/php /usr/local/etc/inc/openvpn.auth-user.php "$username" "$password" "$common_name" "$3" "$2" "$4"
|
||||
fi
|
||||
|
||||
exit 1
|
||||
exit $?
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user