mirror of
https://github.com/moonlight-stream/moonlight-chrome.git
synced 2025-08-17 16:46:31 +00:00
Remove PEM_read* anti-pattern that only happens to work because we're using a global variable
This commit is contained in:
parent
7a54ad9fb1
commit
248a4da331
2
http.cpp
2
http.cpp
@ -62,7 +62,7 @@ void MoonlightInstance::LoadCert(const char* certStr, const char* keyStr)
|
|||||||
BIO_free_all(bio);
|
BIO_free_all(bio);
|
||||||
|
|
||||||
bio = BIO_new_mem_buf(_keyStr, -1);
|
bio = BIO_new_mem_buf(_keyStr, -1);
|
||||||
if(PEM_read_bio_PrivateKey(bio, &g_PrivateKey, NULL, NULL) == NULL) {
|
if (!(g_PrivateKey = PEM_read_bio_PrivateKey(bio, NULL, NULL, NULL))) {
|
||||||
PostMessage(pp::Var("Error loading private key into memory"));
|
PostMessage(pp::Var("Error loading private key into memory"));
|
||||||
}
|
}
|
||||||
BIO_free_all(bio);
|
BIO_free_all(bio);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user