From: simon Date: Fri, 2 Aug 2013 06:28:05 +0000 (+0000) Subject: Verify RSA keys created by rsa2_openssh_createkey. X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/putty/commitdiff_plain/8d27a9c637063061276e669730eb7f9fa06a3767 Verify RSA keys created by rsa2_openssh_createkey. git-svn-id: svn://svn.tartarus.org/sgt/putty@9980 cda61777-01e9-0310-a592-d414129be87e --- diff --git a/sshrsa.c b/sshrsa.c index 11c488e8..07853646 100644 --- a/sshrsa.c +++ b/sshrsa.c @@ -711,6 +711,11 @@ static void *rsa2_openssh_createkey(unsigned char **blob, int *len) return NULL; } + if (!rsa_verify(rsa)) { + rsa2_freekey(rsa); + return NULL; + } + return rsa; }