diff options
author | Jack Lloyd <[email protected]> | 2017-08-29 11:16:08 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2017-08-29 11:16:08 -0400 |
commit | 24f412a38d05db5ef8406dfdf6ff8e02dec4fbc4 (patch) | |
tree | 164df5e98b2bd60bd7b238638e65c9fb1d0d27dc /src/lib | |
parent | fc822faaf54624e4721abf5435f24b720c477b3e (diff) |
In OCSP::CertID don't crash if SHA-1 not available
Caught with Sonar
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/x509/ocsp_types.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/x509/ocsp_types.cpp b/src/lib/x509/ocsp_types.cpp index 470acffa6..d09681fcd 100644 --- a/src/lib/x509/ocsp_types.cpp +++ b/src/lib/x509/ocsp_types.cpp @@ -23,7 +23,7 @@ CertID::CertID(const X509_Certificate& issuer, In practice it seems some responders, including, notably, ocsp.verisign.com, will reject anything but SHA-1 here */ - std::unique_ptr<HashFunction> hash(HashFunction::create("SHA-160")); + std::unique_ptr<HashFunction> hash(HashFunction::create_or_throw("SHA-160")); m_hash_id = AlgorithmIdentifier(hash->name(), AlgorithmIdentifier::USE_NULL_PARAM); m_issuer_key_hash = unlock(hash->process(issuer.subject_public_key_bitstring())); |