aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstate
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-02-14 02:13:16 +0000
committerlloyd <[email protected]>2010-02-14 02:13:16 +0000
commitf2d80a2266e8c3e4ca862a4f36a0d3e874f79dfd (patch)
treed693927026261ceb0d475a54a9aae47d462fd274 /src/libstate
parent0d41a310316b5ca4144326cad39770f3108a6cec (diff)
In SCAN_Name's constructor, first run the input through deref_alias before
breaking it apart. Otherwise it would miss on things like TLS.Digest.0 which expand to Parallel(MD5,SHA-1) which needs further parsing.
Diffstat (limited to 'src/libstate')
-rw-r--r--src/libstate/scan_name.cpp4
-rw-r--r--src/libstate/scan_name.h4
2 files changed, 5 insertions, 3 deletions
diff --git a/src/libstate/scan_name.cpp b/src/libstate/scan_name.cpp
index 861934200..eccb15565 100644
--- a/src/libstate/scan_name.cpp
+++ b/src/libstate/scan_name.cpp
@@ -63,7 +63,7 @@ deref_aliases(const std::pair<u32bit, std::string>& in)
}
-SCAN_Name::SCAN_Name(const std::string& algo_spec)
+SCAN_Name::SCAN_Name(std::string algo_spec)
{
orig_algo_spec = algo_spec;
@@ -73,6 +73,8 @@ SCAN_Name::SCAN_Name(const std::string& algo_spec)
std::string decoding_error = "Bad SCAN name '" + algo_spec + "': ";
+ algo_spec = global_state().deref_alias(algo_spec);
+
for(u32bit i = 0; i != algo_spec.size(); ++i)
{
char c = algo_spec[i];
diff --git a/src/libstate/scan_name.h b/src/libstate/scan_name.h
index 7992d7498..4350dca86 100644
--- a/src/libstate/scan_name.h
+++ b/src/libstate/scan_name.h
@@ -23,9 +23,9 @@ class BOTAN_DLL SCAN_Name
{
public:
/**
- @param algo_spec A SCAN name
+ @param algo_spec A SCAN-format name
*/
- SCAN_Name(const std::string& algo_spec);
+ SCAN_Name(std::string algo_spec);
/**
@return the original input string