aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/tls/tls_handshake_hash.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/tls/tls_handshake_hash.cpp')
-rw-r--r--src/lib/tls/tls_handshake_hash.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/lib/tls/tls_handshake_hash.cpp b/src/lib/tls/tls_handshake_hash.cpp
index 4f78bebbc..540f1de14 100644
--- a/src/lib/tls/tls_handshake_hash.cpp
+++ b/src/lib/tls/tls_handshake_hash.cpp
@@ -29,11 +29,7 @@ secure_vector<byte> Handshake_Hash::final(Protocol_Version version,
};
const std::string hash_algo = choose_hash();
- std::unique_ptr<HashFunction> hash(HashFunction::create(hash_algo));
- if(!hash)
- {
- throw Algorithm_Not_Found(hash_algo);
- }
+ std::unique_ptr<HashFunction> hash(HashFunction::create_or_throw(hash_algo));
hash->update(m_data);
return hash->final();
}