diff --git a/tests/test-otp b/tests/test-otp index d18b9b4e..4c865b38 100755 --- a/tests/test-otp +++ b/tests/test-otp @@ -59,6 +59,11 @@ echo -n "Connecting with correct password and OTP... " fail $PID "Could not connect with OTP!" echo ok +echo -n "Connecting with empty password and correct OTP (user has password set)... " +( echo -e "\n328482\n" | LD_PRELOAD=libsocket_wrapper.so $OPENCONNECT -q $ADDRESS:$PORT -u test --servercert=pin-sha256:xp3scfzy3rOQsv9NcOve/8YVVv+pHr4qNCXEXrNl5s8= --cookieonly >/dev/null 2>&1 ) && + fail $PID "Connected with empty password when a password is set!" +echo ok + echo -n "Connecting with empty password and wrong OTP... " ( echo -e "999999\n" | LD_PRELOAD=libsocket_wrapper.so $OPENCONNECT -q $ADDRESS:$PORT -u testuser --servercert=pin-sha256:xp3scfzy3rOQsv9NcOve/8YVVv+pHr4qNCXEXrNl5s8= --cookieonly >/dev/null 2>&1 ) && fail $PID "Should have not connected with wrong OTP!"