aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstate
diff options
context:
space:
mode:
authorlloyd <[email protected]>2008-11-12 18:11:50 +0000
committerlloyd <[email protected]>2008-11-12 18:11:50 +0000
commitff1e835d888a2783e59efc30fa125bfaf7d150fe (patch)
treef69008ec6cfc733bd993a584e7298c1d48afc89d /src/libstate
parente99e232ac74cb2761468e2edad4881fc26033df3 (diff)
Remove support for provider identifiers from SCAN_Name - it turns out this
was not the right place to keep track of this information. Also modify all Algorithm_Factory constructor functions to take instead of a SCAN_Name a pair of std::strings - the SCAN name and an optional provider name. If a provider is specified, either that provider will be used or the request will fail. Otherwise, the library will attempt best effort, based on user-set algorithm implementation settings (combine with benchmark.h for choosing the fastest implementation at runtime) or if not set, a static ordering (preset in static_provider_weight in prov_weight.cpp, though it would be nice to make this easier to toggle).
Diffstat (limited to 'src/libstate')
-rw-r--r--src/libstate/get_enc.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libstate/get_enc.cpp b/src/libstate/get_enc.cpp
index a5231db91..60a92d53e 100644
--- a/src/libstate/get_enc.cpp
+++ b/src/libstate/get_enc.cpp
@@ -146,7 +146,7 @@ EMSA* get_emsa(const std::string& algo_spec)
if(request.arg_count() == 1)
return new EMSA4(af.make_hash_function(request.arg(0)));
- if(request.arg_count() == 2 && request.arg_as_string(1) != "MGF1")
+ if(request.arg_count() == 2 && request.arg(1) != "MGF1")
return new EMSA4(af.make_hash_function(request.arg(0)));
if(request.arg_count() == 3)
@@ -179,7 +179,7 @@ EME* get_eme(const std::string& algo_spec)
if(request.algo_name() == "EME1" && request.arg_count_between(1, 2))
{
if(request.arg_count() == 1 ||
- (request.arg_count() == 2 && request.arg_as_string(1) == "MGF1"))
+ (request.arg_count() == 2 && request.arg(1) == "MGF1"))
{
return new EME1(af.make_hash_function(request.arg(0)));
}
@@ -213,7 +213,7 @@ KDF* get_kdf(const std::string& algo_spec)
#if defined(BOTAN_HAS_X942_PRF)
if(request.algo_name() == "X9.42-PRF" && request.arg_count() == 1)
- return new X942_PRF(request.arg_as_string(0)); // OID
+ return new X942_PRF(request.arg(0)); // OID
#endif
#if defined(BOTAN_HAS_TLS_V10_PRF)