From da9439f24d57dae9c14d2310989e30562107481c Mon Sep 17 00:00:00 2001 From: Jay Sorg Date: Fri, 11 Nov 2016 22:29:54 -0800 Subject: [PATCH] libxrdp: warn when using 512 bit key --- libxrdp/xrdp_sec.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/libxrdp/xrdp_sec.c b/libxrdp/xrdp_sec.c index cc8b8d16..06813d25 100644 --- a/libxrdp/xrdp_sec.c +++ b/libxrdp/xrdp_sec.c @@ -2315,6 +2315,15 @@ xrdp_sec_incoming(struct xrdp_sec *self) hex_str_to_bin(value, self->pri_exp, self->rsa_key_bytes); } } + + if (self->rsa_key_bytes <= 64) + { + g_writeln("warning, RSA key len 512 " + "bits or less, consider creating a 2048 bit key"); + log_message(LOG_LEVEL_WARNING, "warning, RSA key len 512 " + "bits or less, consider creating a 2048 bit key"); + } + list_delete(items); list_delete(values); }