mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-27 10:07:19 +02:00
TD-79
- TD-79 Bad error message for wrong hostname configuration (thanks to Jens Erat).
This commit is contained in:
parent
959df159fa
commit
2c6b3b3991
3 changed files with 11 additions and 7 deletions
1
AUTHORS
1
AUTHORS
|
@ -233,3 +233,4 @@ suggestions:
|
||||||
dev-zero
|
dev-zero
|
||||||
Petteri
|
Petteri
|
||||||
Black Ops Testing
|
Black Ops Testing
|
||||||
|
Jens Erat
|
||||||
|
|
|
@ -8,6 +8,8 @@
|
||||||
- TD-56 File.cpp needs to include <string.h> on Solaris (thanks to Tatjana
|
- TD-56 File.cpp needs to include <string.h> on Solaris (thanks to Tatjana
|
||||||
Heuѕer).
|
Heuѕer).
|
||||||
- TD-57 taskdctl script assumes /bin/sh is /bin/bash (thanks to Tatjana Heuser).
|
- TD-57 taskdctl script assumes /bin/sh is /bin/bash (thanks to Tatjana Heuser).
|
||||||
|
- TD-79 Bad error message for wrong hostname configuration (thanks to Jens
|
||||||
|
Erat).
|
||||||
- #1255 l10n translation utility improvements (thanks to Renato Alves).
|
- #1255 l10n translation utility improvements (thanks to Renato Alves).
|
||||||
- #1473 Make TASK_RCDIR customizable (thanks to Elias Probst).
|
- #1473 Make TASK_RCDIR customizable (thanks to Elias Probst).
|
||||||
- #1486 Truncated sentence in task-sync(5) manpage (thanks to Jakub Wilk).
|
- #1486 Truncated sentence in task-sync(5) manpage (thanks to Jakub Wilk).
|
||||||
|
|
|
@ -42,6 +42,7 @@
|
||||||
#include <sys/errno.h>
|
#include <sys/errno.h>
|
||||||
#endif
|
#endif
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
#include <sys/socket.h>
|
||||||
#include <netdb.h>
|
#include <netdb.h>
|
||||||
#include <TLSClient.h>
|
#include <TLSClient.h>
|
||||||
#include <gnutls/x509.h>
|
#include <gnutls/x509.h>
|
||||||
|
@ -119,11 +120,11 @@ void TLSClient::trust (const enum trust_level value)
|
||||||
if (_debug)
|
if (_debug)
|
||||||
{
|
{
|
||||||
if (_trust == allow_all)
|
if (_trust == allow_all)
|
||||||
std::cout << "c: INFO Server certificate trusted automatically.\n";
|
std::cout << "c: INFO Server certificate will be trusted automatically.\n";
|
||||||
else if (_trust == ignore_hostname)
|
else if (_trust == ignore_hostname)
|
||||||
std::cout << "c: INFO Server certificate trust verified but hostname ignored.\n";
|
std::cout << "c: INFO Server certificate will be verified but hostname ignored.\n";
|
||||||
else
|
else
|
||||||
std::cout << "c: INFO Server certificate trust verified.\n";
|
std::cout << "c: INFO Server certificate will be verified.\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -208,8 +209,9 @@ void TLSClient::connect (const std::string& host, const std::string& port)
|
||||||
hints.ai_flags = AI_PASSIVE; // use my IP
|
hints.ai_flags = AI_PASSIVE; // use my IP
|
||||||
|
|
||||||
struct addrinfo* res;
|
struct addrinfo* res;
|
||||||
if (::getaddrinfo (host.c_str (), port.c_str (), &hints, &res) != 0)
|
int ret = ::getaddrinfo (host.c_str (), port.c_str (), &hints, &res);
|
||||||
throw std::string (::gai_strerror (errno));
|
if (ret != 0)
|
||||||
|
throw std::string (::gai_strerror (ret));
|
||||||
|
|
||||||
// Try them all, stop on success.
|
// Try them all, stop on success.
|
||||||
struct addrinfo* p;
|
struct addrinfo* p;
|
||||||
|
@ -247,7 +249,6 @@ void TLSClient::connect (const std::string& host, const std::string& port)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Perform the TLS handshake
|
// Perform the TLS handshake
|
||||||
int ret;
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
ret = gnutls_handshake (_session);
|
ret = gnutls_handshake (_session);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue