mirror of
https://github.com/moonlight-stream/moonlight-embedded.git
synced 2026-04-14 11:56:07 +00:00
Compatability fixes for OpenSSL 1.1
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user