mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-08-15 01:03:23 +00:00
change SSL certificate fingerprint whitelisting from SHA1 to SHA-256
SHA1 is too close to bruteforceable
This commit is contained in:
parent
581994b61c
commit
5e0da6fb68
5 changed files with 27 additions and 1 deletions
|
@ -37,6 +37,8 @@
|
|||
#include <boost/asio/ssl.hpp>
|
||||
#include <boost/system/error_code.hpp>
|
||||
|
||||
#define SSL_FINGERPRINT_SIZE 32
|
||||
|
||||
namespace epee
|
||||
{
|
||||
namespace net_utils
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue