Fix mingw

This commit is contained in:
Ted John 2018-06-01 22:44:25 +01:00
parent 53b66fd250
commit a413d43cda
1 changed files with 2 additions and 1 deletions

View File

@ -180,7 +180,8 @@ private:
void SetKey(const std::string_view& pem, bool isPrivate)
{
// Read PEM data via BIO buffer
auto bio = BIO_new_mem_buf(pem.data(), (int)pem.size());
// HACK first parameter is not const on MINGW for some reason
auto bio = BIO_new_mem_buf((void *)pem.data(), (int)pem.size());
if (bio == nullptr)
{
throw std::runtime_error("BIO_new_mem_buf failed");