mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-02-09 16:26:59 +08:00
test-pass-opt-cert: updated for enable-auth config option
This commit is contained in:
committed by
Nikos Mavrogiannopoulos
parent
afef74fa23
commit
507d6cc502
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -1,3 +1,2 @@
|
||||
iroute = 192.168.1.0/24
|
||||
|
||||
require-cert = true
|
||||
|
||||
Reference in New Issue
Block a user