diff options
author | lloyd <[email protected]> | 2010-03-19 00:28:30 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2010-03-19 00:28:30 +0000 |
commit | 87cb43641ca7000b6d97dcb4d8a5e716a07fcf76 (patch) | |
tree | 52969f84d43b4a4c18389909a13c649a71c3c3e9 | |
parent | c20f78d4cd8af2f2ec5792215f879faa3291f6f5 (diff) |
Don't call get_eme or get_kdf with name "Raw" (returns NULL); ideally
would like to replace these functions with generic engine code instead
of hardcoded lookup, and NULL return value would be impossible to
disambiguate.
-rw-r--r-- | src/pubkey/pubkey.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pubkey/pubkey.cpp b/src/pubkey/pubkey.cpp index 1d5d8542c..c8ffccf53 100644 --- a/src/pubkey/pubkey.cpp +++ b/src/pubkey/pubkey.cpp @@ -37,7 +37,7 @@ PK_Encryptor_EME::PK_Encryptor_EME(const Public_Key& key, throw Lookup_Error("PK_Encryptor_EME: No working engine for " + key.algo_name()); - eme = get_eme(eme_name); + eme = (eme_name == "Raw") ? 0 : get_eme(eme_name); } /* @@ -90,7 +90,7 @@ PK_Decryptor_EME::PK_Decryptor_EME(const Private_Key& key, throw Lookup_Error("PK_Decryptor_EME: No working engine for " + key.algo_name()); - eme = get_eme(eme_name); + eme = (eme_name == "Raw") ? 0 : get_eme(eme_name); } /* @@ -360,7 +360,7 @@ PK_Key_Agreement::PK_Key_Agreement(const PK_Key_Agreement_Key& key, throw Lookup_Error("PK_Key_Agreement: No working engine for " + key.algo_name()); - kdf = get_kdf(kdf_name); + kdf = (kdf_name == "Raw") ? 0 : get_kdf(kdf_name); } SymmetricKey PK_Key_Agreement::derive_key(u32bit key_len, const byte in[], |