diff options
Diffstat (limited to 'src/get_enc.cpp')
-rw-r--r-- | src/get_enc.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/get_enc.cpp b/src/get_enc.cpp index cdef00980..fb5952a3e 100644 --- a/src/get_enc.cpp +++ b/src/get_enc.cpp @@ -6,9 +6,12 @@ #include <botan/lookup.h> #include <botan/libstate.h> #include <botan/parsing.h> -#include <botan/mgf1.h> #include <botan/util.h> +#if defined(BOTAN_HAS_MGF1) + #include <botan/mgf1.h> +#endif + #if defined(BOTAN_HAS_EMSA1) #include <botan/emsa1.h> #endif @@ -202,11 +205,13 @@ MGF* get_mgf(const std::string& algo_spec) std::vector<std::string> name = parse_algorithm_name(algo_spec); const std::string mgf_name = global_state().deref_alias(name[0]); +#ifdef BOTAN_HAS_MGF1 if(mgf_name == "MGF1") { if(name.size() == 2) return new MGF1(get_hash(name[1])); } +#endif throw Algorithm_Not_Found(algo_spec); } |