aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2017-09-30 12:45:12 -0400
committerJack Lloyd <[email protected]>2017-09-30 12:45:12 -0400
commitae3ee48ba91961299ec68e1b6a55e9e9d91a2491 (patch)
tree9467b74bd50c63a57e51ce8841ce09ae524ebd19
parent353331954e806a8d336132c740b8888bc7bf3650 (diff)
FFI objects have to be structs because we expose them to C
-rw-r--r--src/lib/ffi/ffi_cipher.cpp7
-rw-r--r--src/lib/ffi/ffi_util.h2
2 files changed, 4 insertions, 5 deletions
diff --git a/src/lib/ffi/ffi_cipher.cpp b/src/lib/ffi/ffi_cipher.cpp
index 44e42aa29..23e277166 100644
--- a/src/lib/ffi/ffi_cipher.cpp
+++ b/src/lib/ffi/ffi_cipher.cpp
@@ -12,11 +12,10 @@ extern "C" {
using namespace Botan_FFI;
-class botan_cipher_struct final : public botan_struct<Botan::Cipher_Mode, 0xB4A2BF9C>
+struct botan_cipher_struct final : public botan_struct<Botan::Cipher_Mode, 0xB4A2BF9C>
{
- public:
- explicit botan_cipher_struct(Botan::Cipher_Mode* x) : botan_struct(x) {}
- Botan::secure_vector<uint8_t> m_buf;
+ explicit botan_cipher_struct(Botan::Cipher_Mode* x) : botan_struct(x) {}
+ Botan::secure_vector<uint8_t> m_buf;
};
int botan_cipher_init(botan_cipher_t* cipher, const char* cipher_name, uint32_t flags)
diff --git a/src/lib/ffi/ffi_util.h b/src/lib/ffi/ffi_util.h
index eb6d22786..a5310f7d3 100644
--- a/src/lib/ffi/ffi_util.h
+++ b/src/lib/ffi/ffi_util.h
@@ -25,7 +25,7 @@ class FFI_Error final : public Botan::Exception
};
template<typename T, uint32_t MAGIC>
-class botan_struct
+struct botan_struct
{
public:
botan_struct(T* obj) : m_magic(MAGIC), m_obj(obj) {}