aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/pk_pad/eme_oaep/oaep.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2015-03-04 04:30:20 +0000
committerlloyd <[email protected]>2015-03-04 04:30:20 +0000
commit2591a2cd863696b91128ff4a8461bb96d497e7b4 (patch)
treeacb7a179a0790ec63c0c21ecb2ea9d7939e05248 /src/lib/pk_pad/eme_oaep/oaep.cpp
parentc794f78bd9b7eebc58c39fd00de90b26fb4cfb67 (diff)
Hide Algorithm_Factory and use the functions in lookup.h internally.
Fix two memory leaks (in TLS and modes) caused by calling get_foo and then cloning the result before saving it (leaking the original object), a holdover from the conversion between construction techniques in 1.11.14
Diffstat (limited to 'src/lib/pk_pad/eme_oaep/oaep.cpp')
-rw-r--r--src/lib/pk_pad/eme_oaep/oaep.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/lib/pk_pad/eme_oaep/oaep.cpp b/src/lib/pk_pad/eme_oaep/oaep.cpp
index dc9266ee7..46bcc04ee 100644
--- a/src/lib/pk_pad/eme_oaep/oaep.cpp
+++ b/src/lib/pk_pad/eme_oaep/oaep.cpp
@@ -17,12 +17,10 @@ OAEP* OAEP::make(const Spec& request)
{
if(request.algo_name() == "OAEP" && request.arg_count_between(1, 2))
{
- auto& hashes = Algo_Registry<HashFunction>::global_registry();
-
if(request.arg_count() == 1 ||
(request.arg_count() == 2 && request.arg(1) == "MGF1"))
{
- if(HashFunction* hash = hashes.make(request.arg(0)))
+ if(HashFunction* hash = get_hash_function(request.arg(0)))
return new OAEP(hash);
}
}