0
0
mirror of https://github.com/OpenVPN/openvpn3.git synced 2024-09-20 12:12:15 +02:00

ovpncli: support CR_TEXT type challenge/response

Support CR_TEXT type challenge/response exchanges. The challenge flags are
ignored currently, but displayed with the challenge text for debug purposes.
Thus, input is always echoed and it is assumed that a response is
required.

Signed-off-by: Heiko Hund <heiko@openvpn.net>
This commit is contained in:
Heiko Hund 2021-08-10 14:17:30 +02:00
parent bff784ab25
commit 0c57e23aca

View File

@ -310,6 +310,13 @@ private:
open_url(url, flags);
}
}
else if (string::starts_with(ev.info, "CR_TEXT:"))
{
std::string cr_response;
std::cout << "\n\n" << ev.info.substr(8) << ": ";
std::getline(std::cin, cr_response);
post_cc_msg("CR_RESPONSE," + base64->encode(cr_response));
}
}
}