mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-15 00:44:19 +09:00
[core,gcc] fix server random length
This commit is contained in:
@@ -1815,10 +1815,12 @@ BOOL gcc_write_server_security_data(wStream* s, rdpMcs* mcs)
|
||||
if (!gcc_update_server_random(settings))
|
||||
return FALSE;
|
||||
|
||||
if (!Stream_EnsureRemainingCapacity(s, sizeof(UINT32) + settings->ServerRandomLength))
|
||||
return FALSE;
|
||||
Stream_Write_UINT32(s, settings->ServerRandomLength); /* serverRandomLen */
|
||||
const size_t posCertLen = Stream_GetPosition(s);
|
||||
Stream_Seek_UINT32(s); /* serverCertLen */
|
||||
Stream_Write(s, settings->ServerRandom, settings->ServerRandom);
|
||||
Stream_Write(s, settings->ServerRandom, settings->ServerRandomLength);
|
||||
|
||||
const SSIZE_T len = certificate_write_server_certificate(
|
||||
settings->RdpServerRsaKey, CERT_TEMPORARILY_ISSUED | CERT_CHAIN_VERSION_1, s);
|
||||
|
||||
Reference in New Issue
Block a user