aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/pk_pad
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/pk_pad')
-rw-r--r--src/lib/pk_pad/emsa_pkcs1/emsa_pkcs1.cpp14
-rw-r--r--src/lib/pk_pad/get_pk_pad.cpp1
2 files changed, 13 insertions, 2 deletions
diff --git a/src/lib/pk_pad/emsa_pkcs1/emsa_pkcs1.cpp b/src/lib/pk_pad/emsa_pkcs1/emsa_pkcs1.cpp
index 1b46e3f13..8f6255b23 100644
--- a/src/lib/pk_pad/emsa_pkcs1/emsa_pkcs1.cpp
+++ b/src/lib/pk_pad/emsa_pkcs1/emsa_pkcs1.cpp
@@ -10,7 +10,19 @@
namespace Botan {
-BOTAN_REGISTER_EMSA_1HASH(EMSA_PKCS1v15, "EMSA_PKCS1");
+namespace {
+
+EMSA* make_pkcs1v15(const EMSA::Spec& spec)
+ {
+ if(spec.arg(0) == "Raw")
+ return new EMSA_PKCS1v15_Raw;
+ else
+ return new EMSA_PKCS1v15(make_a<HashFunction>(spec.arg(0)));
+ }
+
+}
+
+BOTAN_REGISTER_NAMED_T(EMSA, "EMSA_PKCS1", EMSA_PCS1v15, make_pkcs1v15);
namespace {
diff --git a/src/lib/pk_pad/get_pk_pad.cpp b/src/lib/pk_pad/get_pk_pad.cpp
index e64c4e9d8..e7f234f48 100644
--- a/src/lib/pk_pad/get_pk_pad.cpp
+++ b/src/lib/pk_pad/get_pk_pad.cpp
@@ -19,7 +19,6 @@ EMSA* get_emsa(const std::string& algo_spec)
if(EMSA* emsa = make_a<EMSA>(algo_spec))
return emsa;
- printf("EMSA missing? %s\n", algo_spec.c_str());
throw Algorithm_Not_Found(algo_spec);
}