mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-04-18 22:30:11 +00:00
Fix PEM reading issues and assert to catch generating corrupt keypairs
This commit is contained in:
@@ -29,9 +29,9 @@ NvPairingManager::NvPairingManager(QString address, IdentityManager im) :
|
||||
bio = BIO_new_mem_buf(pk.data(), -1);
|
||||
THROW_BAD_ALLOC_IF_NULL(bio);
|
||||
|
||||
PEM_read_bio_PrivateKey(bio, &m_PrivateKey, nullptr, nullptr);
|
||||
m_PrivateKey = PEM_read_bio_PrivateKey(bio, nullptr, nullptr, nullptr);
|
||||
BIO_free_all(bio);
|
||||
if (m_Cert == nullptr)
|
||||
if (m_PrivateKey == nullptr)
|
||||
{
|
||||
throw new std::runtime_error("Unable to load private key");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user