mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-27 00:57:19 +02:00
Sync
- Default TLS cipher selection, with override (thanks to Zed Jorarard). - Updated documentation.
This commit is contained in:
parent
c6032d99f9
commit
0df30a5be0
9 changed files with 31 additions and 3 deletions
|
@ -154,6 +154,12 @@ void TLSClient::trust (bool value)
|
|||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
void TLSClient::ciphers (const std::string& cipher_list)
|
||||
{
|
||||
_ciphers = cipher_list;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
void TLSClient::init (
|
||||
const std::string& ca,
|
||||
|
@ -181,9 +187,12 @@ void TLSClient::init (
|
|||
#endif
|
||||
gnutls_init (&_session, GNUTLS_CLIENT);
|
||||
|
||||
// Use default priorities.
|
||||
// Use default priorities unless overridden.
|
||||
if (_ciphers == "")
|
||||
_ciphers = "NORMAL";
|
||||
|
||||
const char *err;
|
||||
int ret = gnutls_priority_set_direct (_session, "NORMAL", &err);
|
||||
int ret = gnutls_priority_set_direct (_session, _ciphers.c_str (), &err);
|
||||
if (ret < 0)
|
||||
{
|
||||
if (_debug && ret == GNUTLS_E_INVALID_REQUEST)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue