mirror of
https://github.com/moonlight-stream/moonlight-embedded.git
synced 2025-08-17 08:56:04 +00:00
Compatability fixes for OpenSSL 1.1
This commit is contained in:
parent
415c2efe87
commit
d46fe49c57
@ -1,7 +1,7 @@
|
||||
find_package(LibUUID REQUIRED)
|
||||
find_package(Threads REQUIRED)
|
||||
find_package(CURL REQUIRED)
|
||||
find_package(OpenSSL REQUIRED)
|
||||
find_package(OpenSSL 1.1 REQUIRED)
|
||||
find_package(EXPAT REQUIRED)
|
||||
|
||||
pkg_check_modules(AVAHI REQUIRED avahi-client)
|
||||
|
@ -494,12 +494,15 @@ int gs_pair(PSERVER_DATA server, char* pin) {
|
||||
char client_secret_data[16];
|
||||
RAND_bytes(client_secret_data, 16);
|
||||
|
||||
const ASN1_BIT_STRING *asnSignature;
|
||||
X509_get0_signature(&asnSignature, NULL, cert);
|
||||
|
||||
char challenge_response[16 + 256 + 16];
|
||||
char challenge_response_hash[32];
|
||||
char challenge_response_hash_enc[32];
|
||||
char challenge_response_hex[65];
|
||||
memcpy(challenge_response, challenge_response_data + hash_length, 16);
|
||||
memcpy(challenge_response + 16, cert->signature->data, 256);
|
||||
memcpy(challenge_response + 16, asnSignature->data, 256);
|
||||
memcpy(challenge_response + 16 + 256, client_secret_data, 16);
|
||||
if (server->serverMajorVersion >= 7)
|
||||
SHA256(challenge_response, 16 + 256 + 16, challenge_response_hash);
|
||||
|
@ -18,6 +18,7 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <openssl/crypto.h>
|
||||
#include <openssl/pem.h>
|
||||
#include <openssl/conf.h>
|
||||
#include <openssl/pkcs12.h>
|
||||
@ -42,7 +43,7 @@ CERT_KEY_PAIR mkcert_generate() {
|
||||
CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ON);
|
||||
bio_err = BIO_new_fp(stderr, BIO_NOCLOSE);
|
||||
|
||||
SSLeay_add_all_algorithms();
|
||||
OpenSSL_add_all_algorithms();
|
||||
ERR_load_crypto_strings();
|
||||
|
||||
mkcert(&x509, &pkey, NUM_BITS, SERIAL, NUM_YEARS);
|
||||
@ -54,7 +55,6 @@ CERT_KEY_PAIR mkcert_generate() {
|
||||
#endif
|
||||
CRYPTO_cleanup_all_ex_data();
|
||||
|
||||
CRYPTO_mem_leaks(bio_err);
|
||||
BIO_free(bio_err);
|
||||
|
||||
return (CERT_KEY_PAIR) {x509, pkey, p12};
|
||||
|
2
third_party/moonlight-common-c
vendored
2
third_party/moonlight-common-c
vendored
@ -1 +1 @@
|
||||
Subproject commit dcdfcd55e575e7f73e813e338fe9ab11ed1211a7
|
||||
Subproject commit 27213a167808e85824cc4e2163c7dcaaadf64e50
|
Loading…
x
Reference in New Issue
Block a user