Default <sslprofile:hash> to sha256 for GnuTLS and OpenSSL.

This commit is contained in:
Sadie Powell 2020-04-09 18:07:07 +01:00
parent e1ed9b275f
commit efe904f2f0
2 changed files with 2 additions and 2 deletions

View File

@ -553,7 +553,7 @@ namespace GnuTLS
, dh(DHParams::Import(ReadFile(tag->getString("dhfile", "dhparams.pem", 1))))
, priostr(GetPrioStr(profilename, tag))
, mindh(tag->getUInt("mindhbits", 1024))
, hashstr(tag->getString("hash", "md5", 1))
, hashstr(tag->getString("hash", "sha256", 1))
, requestclientcert(tag->getBool("requestclientcert", true))
{
// Load trusted CA and revocation list, if set

View File

@ -352,7 +352,7 @@ namespace OpenSSL
if ((!ctx.SetDH(dh)) || (!clictx.SetDH(dh)))
throw Exception("Couldn't set DH parameters");
const std::string hash = tag->getString("hash", "md5", 1);
const std::string hash = tag->getString("hash", "sha256", 1);
digest = EVP_get_digestbyname(hash.c_str());
if (digest == NULL)
throw Exception("Unknown hash type " + hash);