sec-rdp: limit server side key size to 2048 bit

Current code doesn't handle keys > 2048 bit properly in multiple places.
To prevent problems make sure that no larger keys are used for now.
This commit is contained in:
Bernhard Miklautz 2014-04-03 11:43:51 +02:00
parent 9436d64ff5
commit 21c425b79c

View File

@ -52,6 +52,13 @@ static BOOL freerdp_peer_initialize(freerdp_peer* client)
fprintf(stderr, "%s: inavlid RDP key file %s\n", __FUNCTION__, settings->RdpKeyFile);
return FALSE;
}
if (settings->RdpServerRsaKey->ModulusLength > 256)
{
fprintf(stderr, "%s: Key sizes > 2048 are currently not supported for RDP security.\n", __FUNCTION__);
fprintf(stderr, "%s: Set a different key file than %s\n", __FUNCTION__, settings->RdpKeyFile);
exit(1);
}
}
return TRUE;