struct RSAKey *rsa;
rsa = snew(struct RSAKey);
- if (!rsa)
- return NULL;
getstring(&data, &len, &p, &slen);
if (!p || slen != 7 || memcmp(p, "ssh-rsa", 7)) {
struct RSAKey *rsa;
rsa = snew(struct RSAKey);
- if (!rsa)
- return NULL;
rsa->comment = NULL;
rsa->modulus = getmp(b, len);
return NULL;
}
+ if (!rsa_verify(rsa)) {
+ rsa2_freekey(rsa);
+ return NULL;
+ }
+
return rsa;
}