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
No known key found for this signature in database
GPG key ID: 686F07454D6CEFC3
5 changed files with 27 additions and 1 deletions

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;
}