Oops, moved too much.

This commit is contained in:
Dr. Stephen Henson 2009-06-26 23:56:10 +00:00
parent 167d2a1411
commit 5e4c2225ed

View file

@ -52,6 +52,10 @@ int RSA_padding_add_PKCS1_OAEP(unsigned char *to, int tlen,
return 0;
}
to[0] = 0;
seed = to + 1;
db = to + SHA_DIGEST_LENGTH + 1;
EVP_Digest((void *)param, plen, db, NULL, EVP_sha1(), NULL);
memset(db + SHA_DIGEST_LENGTH, 0,
emlen - flen - 2 * SHA_DIGEST_LENGTH - 1);
@ -65,10 +69,6 @@ int RSA_padding_add_PKCS1_OAEP(unsigned char *to, int tlen,
20);
#endif
to[0] = 0;
seed = to + 1;
db = to + SHA_DIGEST_LENGTH + 1;
dbmask = OPENSSL_malloc(emlen - SHA_DIGEST_LENGTH);
if (dbmask == NULL)
{