summaryrefslogtreecommitdiffstats
path: root/libfreerdp/core/gcc.c
diff options
context:
space:
mode:
Diffstat (limited to 'libfreerdp/core/gcc.c')
-rw-r--r--libfreerdp/core/gcc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libfreerdp/core/gcc.c b/libfreerdp/core/gcc.c
index 733a763..f2d035a 100644
--- a/libfreerdp/core/gcc.c
+++ b/libfreerdp/core/gcc.c
@@ -1765,6 +1765,9 @@ static BOOL gcc_update_server_random(rdpSettings* settings)
*/
BOOL gcc_write_server_security_data(wStream* s, rdpMcs* mcs)
{
+ if (!gcc_update_server_random(mcs_get_settings(mcs)))
+ return FALSE;
+
const rdpSettings* settings = mcs_get_const_settings(mcs);
WINPR_ASSERT(s);
@@ -1779,8 +1782,6 @@ BOOL gcc_write_server_security_data(wStream* s, rdpMcs* mcs)
if (settings->EncryptionMethods == ENCRYPTION_METHOD_NONE)
return TRUE;
- if (!gcc_update_server_random(settings))
- return FALSE;
if (!Stream_EnsureRemainingCapacity(s, sizeof(UINT32) + settings->ServerRandomLength))
return FALSE;