aboutsummaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/libstate/eng_def.h13
-rw-r--r--src/core/libstate/engine.cpp10
-rw-r--r--src/core/libstate/engine.h26
3 files changed, 42 insertions, 7 deletions
diff --git a/src/core/libstate/eng_def.h b/src/core/libstate/eng_def.h
index 7d7ecce58..66cb774d2 100644
--- a/src/core/libstate/eng_def.h
+++ b/src/core/libstate/eng_def.h
@@ -16,16 +16,27 @@ namespace Botan {
class BOTAN_DLL Default_Engine : public Engine
{
public:
+#if defined(BOTAN_HAS_IF_PUBLIC_KEY_FAMILY)
IF_Operation* if_op(const BigInt&, const BigInt&, const BigInt&,
const BigInt&, const BigInt&, const BigInt&,
const BigInt&, const BigInt&) const;
+#endif
+
+#if defined(BOTAN_HAS_DSA)
DSA_Operation* dsa_op(const DL_Group&, const BigInt&,
const BigInt&) const;
+#endif
+
+#if defined(BOTAN_HAS_NYBERG_RUEPPEL)
NR_Operation* nr_op(const DL_Group&, const BigInt&, const BigInt&) const;
+#endif
+
+#if defined(BOTAN_HAS_ELGAMAL)
ELG_Operation* elg_op(const DL_Group&, const BigInt&,
const BigInt&) const;
+#endif
-#if defined(BOTAN_HAS_DH)
+#if defined(BOTAN_HAS_DIFFIE_HELLMAN)
DH_Operation* dh_op(const DL_Group&, const BigInt&) const;
#endif
diff --git a/src/core/libstate/engine.cpp b/src/core/libstate/engine.cpp
index 13ab63193..4f58fb040 100644
--- a/src/core/libstate/engine.cpp
+++ b/src/core/libstate/engine.cpp
@@ -13,6 +13,7 @@ namespace Botan {
namespace Engine_Core {
+#if defined(BOTAN_HAS_IF_PUBLIC_KEY_FAMILY)
/*************************************************
* Acquire an IF op *
*************************************************/
@@ -31,7 +32,9 @@ IF_Operation* if_op(const BigInt& e, const BigInt& n, const BigInt& d,
throw Lookup_Error("Engine_Core::if_op: Unable to find a working engine");
}
+#endif
+#if defined(BOTAN_HAS_DSA)
/*************************************************
* Acquire a DSA op *
*************************************************/
@@ -48,7 +51,9 @@ DSA_Operation* dsa_op(const DL_Group& group, const BigInt& y, const BigInt& x)
throw Lookup_Error("Engine_Core::dsa_op: Unable to find a working engine");
}
+#endif
+#if defined(BOTAN_HAS_NYBERG_RUEPPEL)
/*************************************************
* Acquire a NR op *
*************************************************/
@@ -65,7 +70,9 @@ NR_Operation* nr_op(const DL_Group& group, const BigInt& y, const BigInt& x)
throw Lookup_Error("Engine_Core::nr_op: Unable to find a working engine");
}
+#endif
+#if defined(BOTAN_HAS_ELGAMAL)
/*************************************************
* Acquire an ElGamal op *
*************************************************/
@@ -82,8 +89,9 @@ ELG_Operation* elg_op(const DL_Group& group, const BigInt& y, const BigInt& x)
throw Lookup_Error("Engine_Core::elg_op: Unable to find a working engine");
}
+#endif
-#if defined(BOTAN_HAS_DH)
+#if defined(BOTAN_HAS_DIFFIE_HELLMAN)
/*************************************************
* Acquire a DH op *
*************************************************/
diff --git a/src/core/libstate/engine.h b/src/core/libstate/engine.h
index 72f5b28ca..bf33fa24d 100644
--- a/src/core/libstate/engine.h
+++ b/src/core/libstate/engine.h
@@ -20,11 +20,11 @@
#include <botan/dsa_op.h>
#endif
-#if defined(BOTAN_HAS_DH)
+#if defined(BOTAN_HAS_DIFFIE_HELLMAN)
#include <botan/dh_op.h>
#endif
-#if defined(BOTAN_HAS_NR)
+#if defined(BOTAN_HAS_NYBERG_RUEPPEL)
#include <botan/nr_op.h>
#endif
@@ -32,7 +32,6 @@
#include <botan/elg_op.h>
#endif
-
#if defined(BOTAN_HAS_ECDSA)
#include <botan/ecc_op.h>
#endif
@@ -57,24 +56,32 @@ class BOTAN_DLL Engine
virtual ~Algorithm_Cache() {}
};
+#if defined(BOTAN_HAS_IF_PUBLIC_KEY_FAMILY)
virtual IF_Operation* if_op(const BigInt&, const BigInt&, const BigInt&,
const BigInt&, const BigInt&, const BigInt&,
const BigInt&, const BigInt&) const
{ return 0; }
+#endif
+#if defined(BOTAN_HAS_DSA)
virtual DSA_Operation* dsa_op(const DL_Group&, const BigInt&,
const BigInt&) const
{ return 0; }
+#endif
+#if defined(BOTAN_HAS_NYBERG_RUEPPEL)
virtual NR_Operation* nr_op(const DL_Group&, const BigInt&,
const BigInt&) const
{ return 0; }
+#endif
+#if defined(BOTAN_HAS_ELGAMAL)
virtual ELG_Operation* elg_op(const DL_Group&, const BigInt&,
const BigInt&) const
{ return 0; }
+#endif
-#if defined(BOTAN_HAS_DH)
+#if defined(BOTAN_HAS_DIFFIE_HELLMAN)
virtual DH_Operation* dh_op(const DL_Group&, const BigInt&) const
{ return 0; }
#endif
@@ -154,16 +161,25 @@ namespace Engine_Core {
*************************************************/
Modular_Exponentiator* mod_exp(const BigInt&, Power_Mod::Usage_Hints);
+#if defined(BOTAN_HAS_IF_PUBLIC_KEY_FAMILY)
IF_Operation* if_op(const BigInt&, const BigInt&, const BigInt&,
const BigInt&, const BigInt&, const BigInt&,
const BigInt&, const BigInt&);
+#endif
+#if defined(BOTAN_HAS_DSA)
DSA_Operation* dsa_op(const DL_Group&, const BigInt&, const BigInt&);
+#endif
+
+#if defined(BOTAN_HAS_NYBERG_RUEPPEL)
NR_Operation* nr_op(const DL_Group&, const BigInt&, const BigInt&);
+#endif
+#if defined(BOTAN_HAS_ELGAMAL)
ELG_Operation* elg_op(const DL_Group&, const BigInt&, const BigInt&);
+#endif
-#if defined(BOTAN_HAS_DH)
+#if defined(BOTAN_HAS_DIFFIE_HELLMAN)
DH_Operation* dh_op(const DL_Group&, const BigInt&);
#endif