diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2009-06-26 23:56:10 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2009-06-26 23:56:10 +0000 |
commit | 5e4c2225ed9ba0747309bbb9ef78a3a77e807607 (patch) | |
tree | e67da1d0ef9482efd82a50c00099b0c9b8068beb /crypto | |
parent | 167d2a14117a950e5107427808fcfe7449177068 (diff) |
Oops, moved too much.
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/rsa/rsa_oaep.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crypto/rsa/rsa_oaep.c b/crypto/rsa/rsa_oaep.c index 697d577977..546ae5fcb2 100644 --- a/crypto/rsa/rsa_oaep.c +++ b/crypto/rsa/rsa_oaep.c @@ -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) { |