aboutsummaryrefslogtreecommitdiffstats
path: root/src/core/libstate/engine.h
diff options
context:
space:
mode:
authorlloyd <[email protected]>2008-10-01 15:01:06 +0000
committerlloyd <[email protected]>2008-10-01 15:01:06 +0000
commit1034cf44b4ee0948312c11a1b079b8b04c5828e2 (patch)
tree17bd5ec37cea079132d0774435b81f8c18fc01f4 /src/core/libstate/engine.h
parent9da5c08de6bb6a6972a48ee5bb11ab7654c37f63 (diff)
Split Diffie-Hellman off almost completely, such that nearly none of
it builds if it is disabled. Current deficiency: due to #if defined(BLAH) in the engine code, Botan will not be binary compat across different configurations b/c the vtable will change size. Move some source from core/ to core/libstate where it belonged (engine stuff)
Diffstat (limited to 'src/core/libstate/engine.h')
-rw-r--r--src/core/libstate/engine.h36
1 files changed, 28 insertions, 8 deletions
diff --git a/src/core/libstate/engine.h b/src/core/libstate/engine.h
index 212d02d7a..12c69385b 100644
--- a/src/core/libstate/engine.h
+++ b/src/core/libstate/engine.h
@@ -13,6 +13,10 @@
#include <botan/basefilt.h>
#include <botan/enums.h>
+#if defined(BOTAN_HAS_DH)
+ #include <botan/dh_op.h>
+#endif
+
#if defined(BOTAN_HAS_ECDSA)
#include <botan/ec_dompar.h>
#endif
@@ -39,27 +43,41 @@ class BOTAN_DLL Engine
virtual IF_Operation* if_op(const BigInt&, const BigInt&, const BigInt&,
const BigInt&, const BigInt&, const BigInt&,
- const BigInt&, const BigInt&) const;
+ const BigInt&, const BigInt&) const
+ { return 0; }
+
virtual DSA_Operation* dsa_op(const DL_Group&, const BigInt&,
- const BigInt&) const;
+ const BigInt&) const
+ { return 0; }
+
virtual NR_Operation* nr_op(const DL_Group&, const BigInt&,
- const BigInt&) const;
+ const BigInt&) const
+ { return 0; }
+
virtual ELG_Operation* elg_op(const DL_Group&, const BigInt&,
- const BigInt&) const;
- virtual DH_Operation* dh_op(const DL_Group&, const BigInt&) const;
+ const BigInt&) const
+ { return 0; }
+
+#if defined(BOTAN_HAS_DH)
+ virtual DH_Operation* dh_op(const DL_Group&, const BigInt&) const
+ { return 0; }
+#endif
#if defined(BOTAN_HAS_ECDSA)
virtual ECDSA_Operation* ecdsa_op(const EC_Domain_Params& dom_pars,
const BigInt& priv_key,
- const PointGFp& pub_key) const;
+ const PointGFp& pub_key) const
+ { return 0; }
virtual ECKAEG_Operation* eckaeg_op(const EC_Domain_Params& dom_pars,
const BigInt& priv_key,
- const PointGFp& pub_key) const;
+ const PointGFp& pub_key) const
+ { return 0; }
#endif
virtual Modular_Exponentiator* mod_exp(const BigInt&,
- Power_Mod::Usage_Hints) const;
+ Power_Mod::Usage_Hints) const
+ { return 0; }
virtual Keyed_Filter* get_cipher(const std::string&, Cipher_Dir);
@@ -129,7 +147,9 @@ NR_Operation* nr_op(const DL_Group&, const BigInt&, const BigInt&);
ELG_Operation* elg_op(const DL_Group&, const BigInt&, const BigInt&);
+#if defined(BOTAN_HAS_DH)
DH_Operation* dh_op(const DL_Group&, const BigInt&);
+#endif
#if defined(BOTAN_HAS_ECDSA)
ECDSA_Operation* ecdsa_op(const EC_Domain_Params& dom_pars,