aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/engine/core_engine/lookup_stream.cpp8
-rw-r--r--src/lib/modes/aead/aead.cpp1
-rw-r--r--src/lib/pk_pad/get_pk_pad.cpp7
3 files changed, 10 insertions, 6 deletions
diff --git a/src/lib/engine/core_engine/lookup_stream.cpp b/src/lib/engine/core_engine/lookup_stream.cpp
index 8461fadc9..9e9a7e8df 100644
--- a/src/lib/engine/core_engine/lookup_stream.cpp
+++ b/src/lib/engine/core_engine/lookup_stream.cpp
@@ -41,16 +41,16 @@ Core_Engine::find_stream_cipher(const SCAN_Name& request,
#if defined(BOTAN_HAS_OFB)
if(request.algo_name() == "OFB" && request.arg_count() == 1)
{
- const BlockCipher* proto = af.prototype_block_cipher(request.arg(0));
- return new OFB(proto->clone());
+ if(auto proto = af.prototype_block_cipher(request.arg(0)))
+ return new OFB(proto->clone());
}
#endif
#if defined(BOTAN_HAS_CTR_BE)
if(request.algo_name() == "CTR-BE" && request.arg_count() == 1)
{
- const BlockCipher* proto = af.prototype_block_cipher(request.arg(0));
- return new CTR_BE(proto->clone());
+ if(auto proto = af.prototype_block_cipher(request.arg(0)))
+ return new CTR_BE(proto->clone());
}
#endif
diff --git a/src/lib/modes/aead/aead.cpp b/src/lib/modes/aead/aead.cpp
index da860c26a..e8316ec63 100644
--- a/src/lib/modes/aead/aead.cpp
+++ b/src/lib/modes/aead/aead.cpp
@@ -6,6 +6,7 @@
*/
#include <botan/aead.h>
+#include <botan/block_cipher.h>
#include <botan/libstate.h>
#if defined(BOTAN_HAS_AEAD_CCM)
diff --git a/src/lib/pk_pad/get_pk_pad.cpp b/src/lib/pk_pad/get_pk_pad.cpp
index 5b4052cde..cac24730d 100644
--- a/src/lib/pk_pad/get_pk_pad.cpp
+++ b/src/lib/pk_pad/get_pk_pad.cpp
@@ -58,14 +58,17 @@ EMSA* get_emsa(const std::string& algo_spec)
return new EMSA_Raw;
#endif
-#if defined(BOTAN_HAS_EMSA1)
if(request.algo_name() == "EMSA1" && request.arg_count() == 1)
{
+#if defined(BOTAN_HAS_EMSA_RAW)
if(request.arg(0) == "Raw")
return new EMSA_Raw;
+#endif
+
+#if defined(BOTAN_HAS_EMSA1)
return new EMSA1(af.make_hash_function(request.arg(0)));
- }
#endif
+ }
#if defined(BOTAN_HAS_EMSA1_BSI)
if(request.algo_name() == "EMSA1_BSI" && request.arg_count() == 1)