aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/rsa/rsa_oaep.c
diff options
context:
space:
mode:
authorBen Laurie <ben@openssl.org>2001-07-30 23:57:25 +0000
committerBen Laurie <ben@openssl.org>2001-07-30 23:57:25 +0000
commitdbad169019598981174ff46c7a9bf58373b0e53a (patch)
treece8ca1188d5614648f24b03967785543f1edc8f5 /crypto/rsa/rsa_oaep.c
parent3ba5d1cf2eb6ef28ac5f6d9f3d28020d00c5be50 (diff)
downloadopenssl-dbad169019598981174ff46c7a9bf58373b0e53a.tar.gz
Really add the EVP and all of the DES changes.
Diffstat (limited to 'crypto/rsa/rsa_oaep.c')
-rw-r--r--crypto/rsa/rsa_oaep.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/crypto/rsa/rsa_oaep.c b/crypto/rsa/rsa_oaep.c
index e6d98c5bdb..d8bc91e44d 100644
--- a/crypto/rsa/rsa_oaep.c
+++ b/crypto/rsa/rsa_oaep.c
@@ -26,6 +26,7 @@
#include <openssl/rsa.h>
#include <openssl/evp.h>
#include <openssl/rand.h>
+#include <openssl/sha.h>
int MGF1(unsigned char *mask, long len,
const unsigned char *seed, long seedlen);
@@ -162,6 +163,7 @@ int MGF1(unsigned char *mask, long len,
EVP_MD_CTX c;
unsigned char md[SHA_DIGEST_LENGTH];
+ EVP_MD_CTX_init(&c);
for (i = 0; outlen < len; i++)
{
cnt[0] = (unsigned char)((i >> 24) & 255);
@@ -183,6 +185,7 @@ int MGF1(unsigned char *mask, long len,
outlen = len;
}
}
+ EVP_MD_CTX_cleanup(&c);
return (0);
}
#endif