summaryrefslogtreecommitdiffstats
path: root/methods/connect.cc
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 10:16:57 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 10:16:57 +0000
commit5fbfcdad1efbea3ce6580c682d813daa79c3653a (patch)
tree8a1d7c6b9c1bed457a7ee50b5919da8b9852b8f9 /methods/connect.cc
parentAdding upstream version 2.7.13. (diff)
downloadapt-5fbfcdad1efbea3ce6580c682d813daa79c3653a.tar.xz
apt-5fbfcdad1efbea3ce6580c682d813daa79c3653a.zip
Adding upstream version 2.7.14.upstream/2.7.14
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'methods/connect.cc')
-rw-r--r--methods/connect.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/methods/connect.cc b/methods/connect.cc
index 110f2fc..f3e199d 100644
--- a/methods/connect.cc
+++ b/methods/connect.cc
@@ -19,8 +19,10 @@
#include <apt-pkg/srvrec.h>
#include <apt-pkg/strutl.h>
+#ifdef HAVE_GNUTLS
#include <gnutls/gnutls.h>
#include <gnutls/x509.h>
+#endif
#include <cerrno>
#include <cstdio>
@@ -798,7 +800,8 @@ ResultState UnwrapSocks(std::string Host, int Port, URI Proxy, std::unique_ptr<M
return ResultState::SUCCESSFUL;
}
- /*}}}*/
+
+#ifdef HAVE_GNUTLS /*}}}*/
// UnwrapTLS - Handle TLS connections /*{{{*/
// ---------------------------------------------------------------------
/* Performs a TLS handshake on the socket */
@@ -1050,4 +1053,4 @@ ResultState UnwrapTLS(std::string const &Host, std::unique_ptr<MethodFd> &Fd,
return ResultState::SUCCESSFUL;
}
- /*}}}*/
+#endif /*}}}*/