test-pass-opt-cert: updated for enable-auth config option

This commit is contained in:
Nikos Mavrogiannopoulos
2015-02-11 21:05:09 +01:00
committed by Nikos Mavrogiannopoulos
parent afef74fa23
commit 507d6cc502
3 changed files with 5 additions and 6 deletions

View File

@@ -65,20 +65,20 @@ echo ok
echo -n "Connecting to obtain cookie (without certificate)... "
connect "-u test" "test"
if test $? = 0;then
fail $PID "Connected without certificate!"
if test $? != 0;then
fail $PID "Failed to connect with user without certificate!"
fi
echo ok
echo -n "Connecting to obtain cookie (with certificate)... "
connect "-u test --sslkey ./user-key.pem -c ./user-cert.pem" "test"
connect "-u test --sslkey ./user-key.pem -c ./user-cert.pem"
if test $? != 0;then
fail $PID "Failed to connect with certificate!"
fi
echo ok
echo -n "Connecting to obtain cookie (with incorrect certificate)... "
connect "-u test --sslkey ./user-key.pem -c ./user-cert-wrong.pem" "test"
connect "-u test --sslkey ./user-key.pem -c ./user-cert-wrong.pem" ""
if test $? = 0;then
fail $PID "Should not have connected with wrong certificate!"
fi

View File

@@ -1,7 +1,7 @@
# User authentication method. Could be set multiple times and in that case
# all should succeed.
# Options: certificate, pam.
auth = "certificate[optional]"
enable-auth = "certificate"
auth = "plain[./test1.passwd]"
#auth = "pam"

View File

@@ -1,3 +1,2 @@
iroute = 192.168.1.0/24
require-cert = true