(RSA_check_key): don't do any checking if there is no private key

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17185 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2006-04-23 20:45:00 +00:00
parent d392dd4448
commit 7b95f0b5f2

View File

@@ -169,6 +169,9 @@ RSA_check_key(const RSA *key)
* and then decrypt/verify.
*/
if (rsa->q == NULL || rsa->dmp1 == NULL || rsa->dmq1 == NULL)
return 0;
buffer = malloc(RSA_size(rsa));
if (buffer == NULL)
return 0;