aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2015-10-15 15:33:32 -0400
committerJack Lloyd <[email protected]>2015-10-15 15:33:32 -0400
commitbe33a49c734b5b83cbf64fa132c062ba8643bbe1 (patch)
treecb272f47d6629782e378885e594020e50e38ca4b /src/lib
parentdcc448d5004653c52dada3d04fd92db3bd08f10e (diff)
Fix compile of ffi when tls is disabled. GH #300
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/ffi/ffi.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/lib/ffi/ffi.cpp b/src/lib/ffi/ffi.cpp
index 978a76c0f..eb30b4831 100644
--- a/src/lib/ffi/ffi.cpp
+++ b/src/lib/ffi/ffi.cpp
@@ -20,8 +20,6 @@
#include <botan/hex.h>
#include <botan/mem_ops.h>
#include <botan/x509_key.h>
-#include <botan/tls_client.h>
-#include <botan/tls_server.h>
#include <cstring>
#include <memory>
@@ -49,11 +47,15 @@
#include <botan/mceies.h>
#endif
-
#if defined(BOTAN_HAS_BCRYPT)
#include <botan/bcrypt.h>
#endif
+#if defined(BOTAN_HAS_TLS)
+ #include <botan/tls_client.h>
+ #include <botan/tls_server.h>
+#endif
+
namespace {
#define BOTAN_ASSERT_ARG_NON_NULL(p) \
@@ -185,7 +187,10 @@ BOTAN_FFI_DECLARE_STRUCT(botan_pk_op_verify_struct, Botan::PK_Verifier, 0x2B91F9
BOTAN_FFI_DECLARE_STRUCT(botan_pk_op_ka_struct, Botan::PK_Key_Agreement, 0x2939CAB1);
BOTAN_FFI_DECLARE_STRUCT(botan_x509_cert_struct, Botan::X509_Certificate, 0x8F628937);
+
+#if defined(BOTAN_HAS_TLS)
BOTAN_FFI_DECLARE_STRUCT(botan_tls_channel_struct, Botan::TLS::Channel, 0x0212FE99);
+#endif
/*
* Versioning