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

WS::Client::Host: added key parameter for client-side TLS session caching

In InfraJson::SetupTemplate allow key parameter to be
controlled via "cache-key" directive.

Signed-off-by: James Yonan <james@openvpn.net>
This commit is contained in:
James Yonan 2019-04-29 10:13:29 -06:00 committed by Lev Stipakov
parent aee28239ab
commit 734032f04a
No known key found for this signature in database
GPG Key ID: 88670BE258B9C258

View File

@ -191,6 +191,7 @@ namespace openvpn {
std::string host;
std::string hint; // overrides host for transport, may be IP address
std::string cn; // host for CN verification, defaults to host if empty
std::string key; // host for TLS session ticket cache key, defaults to host if empty
std::string head; // host to send in HTTP header, defaults to host if empty
std::string port;
@ -241,7 +242,7 @@ namespace openvpn {
std::string cache_key() const
{
return host + '/' + port;
return key.empty() ? (host + '/' + port ) : key;
}
};