aboutsummaryrefslogtreecommitdiffstats
path: root/src/constructs
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-03-01 17:25:24 +0000
committerlloyd <[email protected]>2010-03-01 17:25:24 +0000
commitbf916c91511b913ea0954cd05aab07dc65cb9b13 (patch)
tree2df7b7688d90a0ca32462db5396875f2acbccf20 /src/constructs
parentaf752a4fb655723d6bda88278d258d893c9dac5e (diff)
In get_pbkdf_prf, catch Algorithm_Not_Found and return null
Diffstat (limited to 'src/constructs')
-rw-r--r--src/constructs/passhash/passhash9.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/constructs/passhash/passhash9.cpp b/src/constructs/passhash/passhash9.cpp
index b869e2812..d6477de63 100644
--- a/src/constructs/passhash/passhash9.cpp
+++ b/src/constructs/passhash/passhash9.cpp
@@ -29,8 +29,16 @@ MessageAuthenticationCode* get_pbkdf_prf(byte alg_id)
{
Algorithm_Factory& af = global_state().algorithm_factory();
- if(alg_id == 0)
- return af.make_mac("HMAC(SHA-1)");
+ try
+ {
+ if(alg_id == 0)
+ return af.make_mac("HMAC(SHA-1)");
+
+ }
+ catch(Algorithm_Not_Found)
+ {
+ return 0;
+ }
return 0;
}