change SSL certificate fingerprint whitelisting from SHA1 to SHA-256

SHA1 is too close to bruteforceable
This commit is contained in:
moneromooo-monero
2019-04-25 16:35:27 +00:00
parent 581994b61c
commit 5e0da6fb68
5 changed files with 27 additions and 1 deletions
+1 -1
View File
@@ -321,7 +321,7 @@ bool ssl_options_t::has_fingerprint(boost::asio::ssl::verify_context &ctx) const
unsigned int size{ 0 };
// create the digest from the certificate
if (!X509_digest(cert, EVP_sha1(), digest.data(), &size)) {
if (!X509_digest(cert, EVP_sha256(), digest.data(), &size)) {
MERROR("Failed to create certificate fingerprint");
return false;
}