1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-23 14:54:30 +01:00

Part of #11158: Remove more C-style casts (#11743)

This commit is contained in:
Michael Steenbeek
2020-05-14 02:22:50 +02:00
committed by GitHub
parent 32609791de
commit f0bd05cf6d
17 changed files with 40 additions and 39 deletions

View File

@@ -183,7 +183,7 @@ private:
{
// Read PEM data via BIO buffer
// HACK first parameter is not const on MINGW for some reason
auto bio = BIO_new_mem_buf((void*)pem.data(), static_cast<int>(pem.size()));
auto bio = BIO_new_mem_buf(static_cast<const void*>(pem.data()), static_cast<int>(pem.size()));
if (bio == nullptr)
{
throw std::runtime_error("BIO_new_mem_buf failed");
@@ -307,7 +307,7 @@ public:
status = EVP_DigestVerifyUpdate(mdctx, data, dataLen);
OpenSSLThrowOnBadStatus("EVP_DigestVerifyUpdate", status);
status = EVP_DigestVerifyFinal(mdctx, (uint8_t*)sig, sigLen);
status = EVP_DigestVerifyFinal(mdctx, static_cast<const uint8_t*>(sig), sigLen);
if (status != 0 && status != 1)
{
OpenSSLThrowOnBadStatus("EVP_DigestVerifyUpdate", status);