diff options
author | lloyd <[email protected]> | 2008-10-01 13:48:44 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2008-10-01 13:48:44 +0000 |
commit | c3cc27653551f2fddebcab66a0220df3d1a2ea66 (patch) | |
tree | 35ea9fbbe338146e33d5d7fa4042e3ccb91c4f37 /src/core | |
parent | baf45319439d1225c224ec9ab9492683d3722ec6 (diff) |
Guard uses of ECDSA in the library with BOTAN_HAS_ECDSA macro, so it can
be disabled.
Disable gfpmath by default due to TR1 dependency (this will automatically
turn of ECDSA/ECKAEG, unless gfpmath is explicitly loaded with
--enable-module=gfpmath).
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/libstate/eng_base.cpp | 2 | ||||
-rw-r--r-- | src/core/libstate/engine.cpp | 2 | ||||
-rw-r--r-- | src/core/libstate/engine.h | 10 |
3 files changed, 13 insertions, 1 deletions
diff --git a/src/core/libstate/eng_base.cpp b/src/core/libstate/eng_base.cpp index bd6b53447..a296a2762 100644 --- a/src/core/libstate/eng_base.cpp +++ b/src/core/libstate/eng_base.cpp @@ -108,6 +108,7 @@ DH_Operation* Engine::dh_op(const DL_Group&, const BigInt&) const return 0; } +#if defined(BOTAN_HAS_ECDSA) /************************************************* * Basic No-Op Engine Implementation * *************************************************/ @@ -127,6 +128,7 @@ ECKAEG_Operation* Engine::eckaeg_op(const EC_Domain_Params&, { return 0; } +#endif /************************************************* * Basic No-Op Engine Implementation * diff --git a/src/core/libstate/engine.cpp b/src/core/libstate/engine.cpp index 14c1c9c50..fb2477936 100644 --- a/src/core/libstate/engine.cpp +++ b/src/core/libstate/engine.cpp @@ -100,6 +100,7 @@ DH_Operation* dh_op(const DL_Group& group, const BigInt& x) throw Lookup_Error("Engine_Core::dh_op: Unable to find a working engine"); } +#if defined(BOTAN_HAS_ECDSA) /************************************************* * Acquire an ECDSA op * *************************************************/ @@ -137,6 +138,7 @@ ECKAEG_Operation* eckaeg_op(const EC_Domain_Params& dom_pars, throw Lookup_Error("Engine_Core::eckaeg_op: Unable to find a working engine"); } +#endif /************************************************* * Acquire a modular exponentiator * diff --git a/src/core/libstate/engine.h b/src/core/libstate/engine.h index 74449c959..212d02d7a 100644 --- a/src/core/libstate/engine.h +++ b/src/core/libstate/engine.h @@ -8,11 +8,15 @@ #include <botan/base.h> #include <botan/mutex.h> -#include <botan/ec_dompar.h> #include <botan/pk_ops.h> #include <botan/pow_mod.h> #include <botan/basefilt.h> #include <botan/enums.h> + +#if defined(BOTAN_HAS_ECDSA) + #include <botan/ec_dompar.h> +#endif + #include <utility> #include <map> @@ -44,6 +48,7 @@ class BOTAN_DLL Engine const BigInt&) const; virtual DH_Operation* dh_op(const DL_Group&, const BigInt&) const; +#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; @@ -51,6 +56,7 @@ class BOTAN_DLL Engine virtual ECKAEG_Operation* eckaeg_op(const EC_Domain_Params& dom_pars, const BigInt& priv_key, const PointGFp& pub_key) const; +#endif virtual Modular_Exponentiator* mod_exp(const BigInt&, Power_Mod::Usage_Hints) const; @@ -125,6 +131,7 @@ ELG_Operation* elg_op(const DL_Group&, const BigInt&, const BigInt&); DH_Operation* dh_op(const DL_Group&, const BigInt&); +#if defined(BOTAN_HAS_ECDSA) ECDSA_Operation* ecdsa_op(const EC_Domain_Params& dom_pars, const BigInt& priv_key, const PointGFp& pub_key); @@ -132,6 +139,7 @@ ECDSA_Operation* ecdsa_op(const EC_Domain_Params& dom_pars, ECKAEG_Operation* eckaeg_op(const EC_Domain_Params& dom_pars, const BigInt& priv_key, const PointGFp& pub_key); +#endif } |