aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2017-10-13 17:51:36 -0400
committerJack Lloyd <[email protected]>2017-10-13 17:52:02 -0400
commiteb08509db031d49e5f045ae8d05e26a7773e13c2 (patch)
treed4d2d34713f4ebd752adc0c9f5de865c7b79ac42 /src
parent41b6584c6b635374a919986f3741835a7405a529 (diff)
Accept SHA-1, SHA1, or SHA-160 equally
Fixes #1235 [ci skip]
Diffstat (limited to 'src')
-rw-r--r--src/lib/misc/tss/tss.cpp2
-rw-r--r--src/lib/prov/bearssl/bearssl_hash.cpp2
-rw-r--r--src/lib/prov/openssl/openssl_hash.cpp2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/misc/tss/tss.cpp b/src/lib/misc/tss/tss.cpp
index 6d4ea4eaf..8830a2953 100644
--- a/src/lib/misc/tss/tss.cpp
+++ b/src/lib/misc/tss/tss.cpp
@@ -82,7 +82,7 @@ uint8_t gfp_mul(uint8_t x, uint8_t y)
uint8_t rtss_hash_id(const std::string& hash_name)
{
- if(hash_name == "SHA-160")
+ if(hash_name == "SHA-160" || hash_name == "SHA-1" || hash_name == "SHA1")
return 1;
else if(hash_name == "SHA-256")
return 2;
diff --git a/src/lib/prov/bearssl/bearssl_hash.cpp b/src/lib/prov/bearssl/bearssl_hash.cpp
index a0eb845f1..564935624 100644
--- a/src/lib/prov/bearssl/bearssl_hash.cpp
+++ b/src/lib/prov/bearssl/bearssl_hash.cpp
@@ -100,7 +100,7 @@ make_bearssl_hash(const std::string& name)
#endif
#if defined(BOTAN_HAS_SHA1)
- if(name == "SHA-160" || name == "SHA-1")
+ if(name == "SHA-160" || name == "SHA-1" || name == "SHA1")
return MAKE_BEARSSL_HASH(&br_sha1_vtable);
#endif
diff --git a/src/lib/prov/openssl/openssl_hash.cpp b/src/lib/prov/openssl/openssl_hash.cpp
index 1b7bbb19b..08352b1ac 100644
--- a/src/lib/prov/openssl/openssl_hash.cpp
+++ b/src/lib/prov/openssl/openssl_hash.cpp
@@ -121,7 +121,7 @@ make_openssl_hash(const std::string& name)
#endif
#if defined(BOTAN_HAS_SHA1) && !defined(OPENSSL_NO_SHA)
- if(name == "SHA-160")
+ if(name == "SHA-160" || name == "SHA-1" || name == "SHA1")
return MAKE_OPENSSL_HASH(EVP_sha1);
#endif