mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
TLS
- Reworded error messages for bad PEM files (thanks to catern).
This commit is contained in:
parent
23f02b2268
commit
7f3e42e4e1
2 changed files with 3 additions and 2 deletions
1
AUTHORS
1
AUTHORS
|
@ -104,6 +104,7 @@ The following submitted code, packages or analysis, and deserve special thanks:
|
||||||
Alexander Sulfrian
|
Alexander Sulfrian
|
||||||
David Binderman
|
David Binderman
|
||||||
atomicules
|
atomicules
|
||||||
|
catern
|
||||||
|
|
||||||
Thanks to the following, who submitted detailed bug reports and excellent
|
Thanks to the following, who submitted detailed bug reports and excellent
|
||||||
suggestions:
|
suggestions:
|
||||||
|
|
|
@ -148,12 +148,12 @@ void TLSClient::init (
|
||||||
|
|
||||||
if (_ca != "" &&
|
if (_ca != "" &&
|
||||||
gnutls_certificate_set_x509_trust_file (_credentials, _ca.c_str (), GNUTLS_X509_FMT_PEM) < 0)
|
gnutls_certificate_set_x509_trust_file (_credentials, _ca.c_str (), GNUTLS_X509_FMT_PEM) < 0)
|
||||||
throw std::string ("Missing CA file.");
|
throw std::string ("Bad CA file.");
|
||||||
|
|
||||||
if (_cert != "" &&
|
if (_cert != "" &&
|
||||||
_key != "" &&
|
_key != "" &&
|
||||||
gnutls_certificate_set_x509_key_file (_credentials, _cert.c_str (), _key.c_str (), GNUTLS_X509_FMT_PEM) < 0)
|
gnutls_certificate_set_x509_key_file (_credentials, _cert.c_str (), _key.c_str (), GNUTLS_X509_FMT_PEM) < 0)
|
||||||
throw std::string ("Missing CERT file.");
|
throw std::string ("Bad CERT file.");
|
||||||
|
|
||||||
#if GNUTLS_VERSION_NUMBER >= 0x02090a
|
#if GNUTLS_VERSION_NUMBER >= 0x02090a
|
||||||
// The automatic verification for the server certificate with
|
// The automatic verification for the server certificate with
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue