From 507d6cc5023679ae45ce3ecf4a2ee9f53c754e18 Mon Sep 17 00:00:00 2001 From: Nikos Mavrogiannopoulos Date: Wed, 11 Feb 2015 21:05:09 +0100 Subject: [PATCH] test-pass-opt-cert: updated for enable-auth config option --- tests/test-pass-opt-cert | 8 ++++---- tests/test-pass-opt-cert.config | 2 +- tests/user-config-opt/test | 1 - 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/tests/test-pass-opt-cert b/tests/test-pass-opt-cert index 9fc6e2ce..35c12088 100755 --- a/tests/test-pass-opt-cert +++ b/tests/test-pass-opt-cert @@ -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 diff --git a/tests/test-pass-opt-cert.config b/tests/test-pass-opt-cert.config index bce9e3d4..2feb306c 100644 --- a/tests/test-pass-opt-cert.config +++ b/tests/test-pass-opt-cert.config @@ -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" diff --git a/tests/user-config-opt/test b/tests/user-config-opt/test index 6f351715..aae92e17 100644 --- a/tests/user-config-opt/test +++ b/tests/user-config-opt/test @@ -1,3 +1,2 @@ iroute = 192.168.1.0/24 -require-cert = true