/*
- * Copyright (C) 1996-2017 The Squid Software Foundation and contributors
+ * Copyright (C) 1996-2020 The Squid Software Foundation and contributors
*
* Squid software is distributed under GPLv2+ license and includes
* contributions from numerous individuals and organizations.
}
ssize_t
-Transport::Write(void *buf, size_t len)
+Transport::Write(const void *buf, size_t len)
{
if (conn < 0)
return -1;
}
#endif
+#if USE_GNUTLS
+static void
+gnutlsDebugHandler(int level, const char *msg)
+{
+ debugVerbose(level, "GnuTLS: " << msg);
+}
+#endif
+
void
Transport::InitTls()
{
Config.tlsEnabled = true;
+#if USE_GNUTLS
+ gnutls_global_set_log_function(&gnutlsDebugHandler);
+ gnutls_global_set_log_level(scParams.verbosityLevel);
+#endif
+
// Initialize for anonymous TLS
gnutls_anon_allocate_client_credentials(&Config.anonCredentials);