aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/pk_pad
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2018-01-17 14:55:05 -0500
committerJack Lloyd <[email protected]>2018-01-17 14:55:05 -0500
commitf4a511a9986c28341925d1390252edf3c8773a76 (patch)
tree89642ec0d9f6ace0a1aa3f001e1591df4cbc4e69 /src/lib/pk_pad
parent09c50d5fa709a8d79faaeb6e5f9e57b61626be72 (diff)
Fix crash in EMSA_PKCS1v15_Raw if the hash function was not enabled.
GH #1416
Diffstat (limited to 'src/lib/pk_pad')
-rw-r--r--src/lib/pk_pad/emsa_pkcs1/emsa_pkcs1.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/pk_pad/emsa_pkcs1/emsa_pkcs1.cpp b/src/lib/pk_pad/emsa_pkcs1/emsa_pkcs1.cpp
index 0fabb87da..ddc1e6b27 100644
--- a/src/lib/pk_pad/emsa_pkcs1/emsa_pkcs1.cpp
+++ b/src/lib/pk_pad/emsa_pkcs1/emsa_pkcs1.cpp
@@ -116,7 +116,7 @@ EMSA_PKCS1v15_Raw::EMSA_PKCS1v15_Raw(const std::string& hash_algo)
if(!hash_algo.empty())
{
m_hash_id = pkcs_hash_id(hash_algo);
- std::unique_ptr<HashFunction> hash(HashFunction::create(hash_algo));
+ std::unique_ptr<HashFunction> hash(HashFunction::create_or_throw(hash_algo));
m_hash_name = hash->name();
m_hash_output_len = hash->output_length();
}