From 88c24edd8f7a793561104be50b6ecf2c85b42956 Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Thu, 29 Jan 2015 13:12:22 +0100 Subject: Raise GnuTLS requirements to 3.x This allows us to simplify things by getting rid of some old compatibility code. People should really be using current versions of GnuTLS anyway to stay secure. --- common/rdr/TLSInStream.cxx | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'common/rdr/TLSInStream.cxx') diff --git a/common/rdr/TLSInStream.cxx b/common/rdr/TLSInStream.cxx index 4d2c9ecb..ef030c17 100644 --- a/common/rdr/TLSInStream.cxx +++ b/common/rdr/TLSInStream.cxx @@ -25,7 +25,6 @@ #include #include #include -#include #include #ifdef HAVE_GNUTLS @@ -33,14 +32,14 @@ using namespace rdr; enum { DEFAULT_BUF_SIZE = 16384 }; -ssize_t TLSInStream::pull(gnutls_transport_ptr str, void* data, size_t size) +ssize_t TLSInStream::pull(gnutls_transport_ptr_t str, void* data, size_t size) { TLSInStream* self= (TLSInStream*) str; InStream *in = self->in; try { if (!in->check(1, 1, false)) { - gnutls_errno_helper(self->session, EAGAIN); + gnutls_transport_set_errno(self->session, EAGAIN); return -1; } @@ -50,17 +49,17 @@ ssize_t TLSInStream::pull(gnutls_transport_ptr str, void* data, size_t size) in->readBytes(data, size); } catch (Exception& e) { - gnutls_errno_helper(self->session, EINVAL); + gnutls_transport_set_errno(self->session, EINVAL); return -1; } return size; } -TLSInStream::TLSInStream(InStream* _in, gnutls_session _session) +TLSInStream::TLSInStream(InStream* _in, gnutls_session_t _session) : session(_session), in(_in), bufSize(DEFAULT_BUF_SIZE), offset(0) { - gnutls_transport_ptr recv, send; + gnutls_transport_ptr_t recv, send; ptr = end = start = new U8[bufSize]; -- cgit v1.2.3