Verify RSA keys created by rsa2_openssh_createkey.
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Fri, 2 Aug 2013 06:28:05 +0000 (06:28 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Fri, 2 Aug 2013 06:28:05 +0000 (06:28 +0000)
git-svn-id: svn://svn.tartarus.org/sgt/putty@9980 cda61777-01e9-0310-a592-d414129be87e

sshrsa.c

index 11c488e..0785364 100644 (file)
--- 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;
 }