botan: Fix build without AES and its modes
This commit is contained in:
@@ -25,6 +25,10 @@
|
|||||||
|
|
||||||
#include "botan_crypter.h"
|
#include "botan_crypter.h"
|
||||||
|
|
||||||
|
#include <botan/build.h>
|
||||||
|
|
||||||
|
#if defined(BOTAN_HAS_AES) && defined(BOTAN_HAS_MODE_CBC)
|
||||||
|
|
||||||
#include <botan/ffi.h>
|
#include <botan/ffi.h>
|
||||||
|
|
||||||
typedef struct private_botan_crypter_t private_botan_crypter_t;
|
typedef struct private_botan_crypter_t private_botan_crypter_t;
|
||||||
@@ -189,3 +193,5 @@ botan_crypter_t *botan_crypter_create(encryption_algorithm_t algo,
|
|||||||
this->key = chunk_alloc(key_size);
|
this->key = chunk_alloc(key_size);
|
||||||
return &this->public;
|
return &this->public;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|||||||
@@ -103,6 +103,7 @@ METHOD(plugin_t, get_features, int,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* crypters */
|
/* crypters */
|
||||||
|
#if defined(BOTAN_HAS_AES) && defined(BOTAN_HAS_MODE_CBC)
|
||||||
PLUGIN_REGISTER(CRYPTER, botan_crypter_create),
|
PLUGIN_REGISTER(CRYPTER, botan_crypter_create),
|
||||||
#ifdef BOTAN_HAS_AES
|
#ifdef BOTAN_HAS_AES
|
||||||
#ifdef BOTAN_HAS_MODE_CBC
|
#ifdef BOTAN_HAS_MODE_CBC
|
||||||
@@ -110,9 +111,13 @@ METHOD(plugin_t, get_features, int,
|
|||||||
PLUGIN_PROVIDE(CRYPTER, ENCR_AES_CBC, 24),
|
PLUGIN_PROVIDE(CRYPTER, ENCR_AES_CBC, 24),
|
||||||
PLUGIN_PROVIDE(CRYPTER, ENCR_AES_CBC, 32),
|
PLUGIN_PROVIDE(CRYPTER, ENCR_AES_CBC, 32),
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* AEAD */
|
/* AEAD */
|
||||||
|
#if (defined(BOTAN_HAS_AES) && \
|
||||||
|
(defined(BOTAN_HAS_AEAD_GCM) || defined(BOTAN_HAS_AEAD_CCM))) || \
|
||||||
|
defined(BOTAN_HAS_AEAD_CHACHA20_POLY1305)
|
||||||
PLUGIN_REGISTER(AEAD, botan_aead_create),
|
PLUGIN_REGISTER(AEAD, botan_aead_create),
|
||||||
#ifdef BOTAN_HAS_AES
|
#ifdef BOTAN_HAS_AES
|
||||||
#ifdef BOTAN_HAS_AEAD_GCM
|
#ifdef BOTAN_HAS_AEAD_GCM
|
||||||
@@ -140,6 +145,7 @@ METHOD(plugin_t, get_features, int,
|
|||||||
#endif
|
#endif
|
||||||
#ifdef BOTAN_HAS_AEAD_CHACHA20_POLY1305
|
#ifdef BOTAN_HAS_AEAD_CHACHA20_POLY1305
|
||||||
PLUGIN_PROVIDE(AEAD, ENCR_CHACHA20_POLY1305, 32),
|
PLUGIN_PROVIDE(AEAD, ENCR_CHACHA20_POLY1305, 32),
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* hashers */
|
/* hashers */
|
||||||
|
|||||||
Reference in New Issue
Block a user