Attention is currently required from: flichtenheld, plaisthos.
Hello plaisthos, flichtenheld,
I'd like you to do a code review.
Please visit
http://gerrit.openvpn.net/c/openvpn/+/666?usp=email
to review the following change.
Change subject: Add test for static-challenge concatenation option
......................................................................
Add test for static-challenge concatenation option
Change-Id: I41f6c1f7acb58f30fc4db0e32505018f64fcad28
---
M tests/unit_tests/openvpn/test_user_pass.c
1 file changed, 19 insertions(+), 1 deletion(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/66/666/1
diff --git a/tests/unit_tests/openvpn/test_user_pass.c
b/tests/unit_tests/openvpn/test_user_pass.c
index b43e655..35fe60d 100644
--- a/tests/unit_tests/openvpn/test_user_pass.c
+++ b/tests/unit_tests/openvpn/test_user_pass.c
@@ -311,7 +311,25 @@
reset_user_pass(&up);
- flags |= GET_USER_PASS_INLINE_CREDS;
+ flags |= GET_USER_PASS_STATIC_CHALLENGE_CONCAT;
+
+ expect_string(query_user_exec_builtin, query_user[i].prompt, "Enter UT
Username:");
+ will_return(query_user_exec_builtin, "c1user");
+ expect_string(query_user_exec_builtin, query_user[i].prompt, "Enter UT
Password:");
+ will_return(query_user_exec_builtin, "c1password");
+ will_return(query_user_exec_builtin, true);
+ expect_string(query_user_exec_builtin, query_user[i].prompt, "CHALLENGE:
Please enter token PIN");
+ will_return(query_user_exec_builtin, "0123456");
+ will_return(query_user_exec_builtin, true);
+ assert_true(get_user_pass_cr(&up, NULL, "UT", flags, challenge));
+ assert_true(up.defined);
+ assert_string_equal(up.username, "c1user");
+ /* password and response concatenated */
+ assert_string_equal(up.password, "c1password0123456");
+
+ reset_user_pass(&up);
+
+ flags = GET_USER_PASS_STATIC_CHALLENGE|GET_USER_PASS_INLINE_CREDS;
/*FIXME: query_user_exec() called even though nothing queued */
will_return(query_user_exec_builtin, true);
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/666?usp=email
To unsubscribe, or for help writing mail filters, visit
http://gerrit.openvpn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I41f6c1f7acb58f30fc4db0e32505018f64fcad28
Gerrit-Change-Number: 666
Gerrit-PatchSet: 1
Gerrit-Owner: selvanair <[email protected]>
Gerrit-Reviewer: flichtenheld <[email protected]>
Gerrit-Reviewer: plaisthos <[email protected]>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]>
Gerrit-Attention: flichtenheld <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel