]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Credentials: EVP_PKEY_CTX_set1_scrypt_salt() takes an `unsigned char*`
authorRemi Gacogne <remi.gacogne@powerdns.com>
Wed, 3 Nov 2021 15:14:40 +0000 (16:14 +0100)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Wed, 3 Nov 2021 15:14:40 +0000 (16:14 +0100)
pdns/credentials.cc

index 460df05edfc15de6c7450c2100760bf0b68d17c4..f7d3417edb1e87c90caf95158c88ba05626419ef 100644 (file)
@@ -109,7 +109,7 @@ static std::string hashPasswordInternal(const std::string& password, const std::
     throw std::runtime_error("Error adding the password to the scrypt context to hash the supplied password");
   }
 
-  if (EVP_PKEY_CTX_set1_scrypt_salt(pctx.get(), salt.data(), salt.size()) <= 0) {
+  if (EVP_PKEY_CTX_set1_scrypt_salt(pctx.get(), reinterpret_cast<const unsigned char*>(salt.data()), salt.size()) <= 0) {
     throw std::runtime_error("Error adding the salt to the scrypt context to hash the supplied password");
   }