mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
TLSClient: No longer calls gnutls_global_{de,}init for 3.3.0+
This commit is contained in:
parent
bcfebffa7f
commit
688d6b658b
1 changed files with 6 additions and 1 deletions
|
@ -86,7 +86,9 @@ TLSClient::~TLSClient ()
|
|||
{
|
||||
gnutls_deinit (_session);
|
||||
gnutls_certificate_free_credentials (_credentials);
|
||||
#if GNUTLS_VERSION_NUMBER < 0x030300
|
||||
gnutls_global_deinit ();
|
||||
#endif
|
||||
|
||||
if (_socket)
|
||||
{
|
||||
|
@ -144,9 +146,12 @@ void TLSClient::init (
|
|||
_cert = cert;
|
||||
_key = key;
|
||||
|
||||
int ret = gnutls_global_init ();
|
||||
int ret;
|
||||
#if GNUTLS_VERSION_NUMBER < 0x030300
|
||||
ret = gnutls_global_init ();
|
||||
if (ret < 0)
|
||||
throw format ("TLS init error. {1}", gnutls_strerror (ret));
|
||||
#endif
|
||||
|
||||
ret = gnutls_certificate_allocate_credentials (&_credentials);
|
||||
if (ret < 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue