From c26562fab8b1ca8b7d55ff1c893f03a59ced6485 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Tue, 2 Mar 2021 18:57:16 -0600 Subject: [PATCH] Fix Steam Link build --- app/backend/identitymanager.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/backend/identitymanager.cpp b/app/backend/identitymanager.cpp index 51ea5d90..e582efbb 100644 --- a/app/backend/identitymanager.cpp +++ b/app/backend/identitymanager.cpp @@ -143,7 +143,10 @@ QSslKey IdentityManager::getSslKey() { if (m_CachedSslKey.isNull()) { - BIO* bio = BIO_new_mem_buf(m_CachedPrivateKey.constData(), -1); + // This seemingly useless const_cast is required for old OpenSSL headers + // where BIO_new_mem_buf's parameter is not declared const like those on + // the Steam Link hardware. + BIO* bio = BIO_new_mem_buf(const_cast(m_CachedPrivateKey.constData()), -1); THROW_BAD_ALLOC_IF_NULL(bio); EVP_PKEY* pk = PEM_read_bio_PrivateKey(bio, nullptr, nullptr, nullptr);