mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-20 04:13:07 +02:00
Certificates
- Stores the host name in the session, for handѕhake validation.
This commit is contained in:
parent
eda9ac56da
commit
7c08ce749f
1 changed files with 4 additions and 0 deletions
|
@ -182,6 +182,10 @@ void TLSClient::init (
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
void TLSClient::connect (const std::string& host, const std::string& port)
|
void TLSClient::connect (const std::string& host, const std::string& port)
|
||||||
{
|
{
|
||||||
|
// Store the host name, so the verification callback can access it during the
|
||||||
|
// handshake below.
|
||||||
|
gnutls_session_set_ptr (_session, (void*) host.c_str ());
|
||||||
|
|
||||||
// use IPv4 or IPv6, does not matter.
|
// use IPv4 or IPv6, does not matter.
|
||||||
struct addrinfo hints = {0};
|
struct addrinfo hints = {0};
|
||||||
hints.ai_family = AF_UNSPEC;
|
hints.ai_family = AF_UNSPEC;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue