summaryrefslogtreecommitdiff
path: root/crypto/rsa
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
parent3ba5d1cf2eb6ef28ac5f6d9f3d28020d00c5be50 (diff)
downloadopenssl-new-dbad169019598981174ff46c7a9bf58373b0e53a.tar.gz
Really add the EVP and all of the DES changes.
Diffstat (limited to 'crypto/rsa')
-rw-r--r--crypto/rsa/Makefile.ssl123
-rw-r--r--crypto/rsa/rsa_oaep.c3
2 files changed, 47 insertions, 79 deletions
diff --git a/crypto/rsa/Makefile.ssl b/crypto/rsa/Makefile.ssl
index f2a365cdb0..900c1913b2 100644
--- a/crypto/rsa/Makefile.ssl
+++ b/crypto/rsa/Makefile.ssl
@@ -91,43 +91,36 @@ rsa_asn1.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
rsa_asn1.o: ../../include/openssl/opensslconf.h
rsa_asn1.o: ../../include/openssl/opensslv.h ../../include/openssl/rsa.h
rsa_asn1.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
-rsa_asn1.o: ../../include/openssl/symhacks.h ../cryptlib.h rsa_asn1.c
+rsa_asn1.o: ../../include/openssl/symhacks.h ../cryptlib.h
rsa_chk.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
rsa_chk.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h
rsa_chk.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
rsa_chk.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
rsa_chk.o: ../../include/openssl/opensslv.h ../../include/openssl/rsa.h
rsa_chk.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
-rsa_chk.o: ../../include/openssl/symhacks.h rsa_chk.c
+rsa_chk.o: ../../include/openssl/symhacks.h
rsa_eay.o: ../../e_os.h ../../include/openssl/asn1.h
-rsa_eay.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
-rsa_eay.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
-rsa_eay.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
-rsa_eay.o: ../../include/openssl/des.h ../../include/openssl/dh.h
-rsa_eay.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
-rsa_eay.o: ../../include/openssl/engine.h ../../include/openssl/err.h
-rsa_eay.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
-rsa_eay.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
-rsa_eay.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
-rsa_eay.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
+rsa_eay.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
+rsa_eay.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
+rsa_eay.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
+rsa_eay.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h
+rsa_eay.o: ../../include/openssl/err.h ../../include/openssl/evp.h
+rsa_eay.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
rsa_eay.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
rsa_eay.o: ../../include/openssl/opensslv.h ../../include/openssl/pem.h
rsa_eay.o: ../../include/openssl/pem2.h ../../include/openssl/pkcs7.h
-rsa_eay.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h
-rsa_eay.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
-rsa_eay.o: ../../include/openssl/rd_fst.h ../../include/openssl/rijndael.h
-rsa_eay.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
+rsa_eay.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h
rsa_eay.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
rsa_eay.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
rsa_eay.o: ../../include/openssl/ui.h ../../include/openssl/x509.h
-rsa_eay.o: ../../include/openssl/x509_vfy.h ../cryptlib.h rsa_eay.c
+rsa_eay.o: ../../include/openssl/x509_vfy.h ../cryptlib.h
rsa_err.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
rsa_err.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h
rsa_err.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
rsa_err.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
rsa_err.o: ../../include/openssl/opensslv.h ../../include/openssl/rsa.h
rsa_err.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
-rsa_err.o: ../../include/openssl/symhacks.h rsa_err.c
+rsa_err.o: ../../include/openssl/symhacks.h
rsa_gen.o: ../../e_os.h ../../include/openssl/asn1.h
rsa_gen.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
rsa_gen.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
@@ -135,29 +128,22 @@ rsa_gen.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
rsa_gen.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
rsa_gen.o: ../../include/openssl/opensslv.h ../../include/openssl/rsa.h
rsa_gen.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
-rsa_gen.o: ../../include/openssl/symhacks.h ../cryptlib.h rsa_gen.c
+rsa_gen.o: ../../include/openssl/symhacks.h ../cryptlib.h
rsa_lib.o: ../../e_os.h ../../include/openssl/asn1.h
-rsa_lib.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
-rsa_lib.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
-rsa_lib.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
-rsa_lib.o: ../../include/openssl/des.h ../../include/openssl/dh.h
-rsa_lib.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
-rsa_lib.o: ../../include/openssl/engine.h ../../include/openssl/err.h
-rsa_lib.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
-rsa_lib.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
-rsa_lib.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
-rsa_lib.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
+rsa_lib.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
+rsa_lib.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
+rsa_lib.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
+rsa_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h
+rsa_lib.o: ../../include/openssl/err.h ../../include/openssl/evp.h
+rsa_lib.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
rsa_lib.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
rsa_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/pem.h
rsa_lib.o: ../../include/openssl/pem2.h ../../include/openssl/pkcs7.h
-rsa_lib.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h
-rsa_lib.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
-rsa_lib.o: ../../include/openssl/rd_fst.h ../../include/openssl/rijndael.h
-rsa_lib.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
+rsa_lib.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h
rsa_lib.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
rsa_lib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
rsa_lib.o: ../../include/openssl/ui.h ../../include/openssl/x509.h
-rsa_lib.o: ../../include/openssl/x509_vfy.h ../cryptlib.h rsa_lib.c
+rsa_lib.o: ../../include/openssl/x509_vfy.h ../cryptlib.h
rsa_none.o: ../../e_os.h ../../include/openssl/asn1.h
rsa_none.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
rsa_none.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
@@ -166,7 +152,7 @@ rsa_none.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
rsa_none.o: ../../include/openssl/opensslv.h ../../include/openssl/rand.h
rsa_none.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
rsa_none.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
-rsa_none.o: ../cryptlib.h rsa_none.c
+rsa_none.o: ../cryptlib.h
rsa_null.o: ../../e_os.h ../../include/openssl/asn1.h
rsa_null.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
rsa_null.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
@@ -175,26 +161,19 @@ rsa_null.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
rsa_null.o: ../../include/openssl/opensslv.h ../../include/openssl/rand.h
rsa_null.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
rsa_null.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
-rsa_null.o: ../cryptlib.h rsa_null.c
+rsa_null.o: ../cryptlib.h
rsa_oaep.o: ../../e_os.h ../../include/openssl/asn1.h
-rsa_oaep.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
-rsa_oaep.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
-rsa_oaep.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
-rsa_oaep.o: ../../include/openssl/des.h ../../include/openssl/dh.h
-rsa_oaep.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
-rsa_oaep.o: ../../include/openssl/err.h ../../include/openssl/evp.h
-rsa_oaep.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
-rsa_oaep.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
-rsa_oaep.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
+rsa_oaep.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
+rsa_oaep.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
+rsa_oaep.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
+rsa_oaep.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
+rsa_oaep.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h
rsa_oaep.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
rsa_oaep.o: ../../include/openssl/opensslconf.h
rsa_oaep.o: ../../include/openssl/opensslv.h ../../include/openssl/rand.h
-rsa_oaep.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
-rsa_oaep.o: ../../include/openssl/rc5.h ../../include/openssl/rd_fst.h
-rsa_oaep.o: ../../include/openssl/rijndael.h ../../include/openssl/ripemd.h
rsa_oaep.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
rsa_oaep.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
-rsa_oaep.o: ../../include/openssl/symhacks.h ../cryptlib.h rsa_oaep.c
+rsa_oaep.o: ../../include/openssl/symhacks.h ../cryptlib.h
rsa_pk1.o: ../../e_os.h ../../include/openssl/asn1.h
rsa_pk1.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
rsa_pk1.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
@@ -203,49 +182,35 @@ rsa_pk1.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
rsa_pk1.o: ../../include/openssl/opensslv.h ../../include/openssl/rand.h
rsa_pk1.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
rsa_pk1.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
-rsa_pk1.o: ../cryptlib.h rsa_pk1.c
+rsa_pk1.o: ../cryptlib.h
rsa_saos.o: ../../e_os.h ../../include/openssl/asn1.h
-rsa_saos.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
-rsa_saos.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
-rsa_saos.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
-rsa_saos.o: ../../include/openssl/des.h ../../include/openssl/dh.h
-rsa_saos.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
-rsa_saos.o: ../../include/openssl/err.h ../../include/openssl/evp.h
-rsa_saos.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
-rsa_saos.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
-rsa_saos.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
+rsa_saos.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
+rsa_saos.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
+rsa_saos.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
+rsa_saos.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
+rsa_saos.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h
rsa_saos.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
rsa_saos.o: ../../include/openssl/opensslconf.h
rsa_saos.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h
-rsa_saos.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
-rsa_saos.o: ../../include/openssl/rc5.h ../../include/openssl/rd_fst.h
-rsa_saos.o: ../../include/openssl/rijndael.h ../../include/openssl/ripemd.h
rsa_saos.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
rsa_saos.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
rsa_saos.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
-rsa_saos.o: ../../include/openssl/x509_vfy.h ../cryptlib.h rsa_saos.c
+rsa_saos.o: ../../include/openssl/x509_vfy.h ../cryptlib.h
rsa_sign.o: ../../e_os.h ../../include/openssl/asn1.h
-rsa_sign.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
-rsa_sign.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
-rsa_sign.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
-rsa_sign.o: ../../include/openssl/des.h ../../include/openssl/dh.h
-rsa_sign.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
-rsa_sign.o: ../../include/openssl/engine.h ../../include/openssl/err.h
-rsa_sign.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
-rsa_sign.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
-rsa_sign.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
-rsa_sign.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
+rsa_sign.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
+rsa_sign.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
+rsa_sign.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
+rsa_sign.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h
+rsa_sign.o: ../../include/openssl/err.h ../../include/openssl/evp.h
+rsa_sign.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
rsa_sign.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
rsa_sign.o: ../../include/openssl/opensslv.h ../../include/openssl/pem.h
rsa_sign.o: ../../include/openssl/pem2.h ../../include/openssl/pkcs7.h
-rsa_sign.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h
-rsa_sign.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
-rsa_sign.o: ../../include/openssl/rd_fst.h ../../include/openssl/rijndael.h
-rsa_sign.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
+rsa_sign.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h
rsa_sign.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
rsa_sign.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
rsa_sign.o: ../../include/openssl/ui.h ../../include/openssl/x509.h
-rsa_sign.o: ../../include/openssl/x509_vfy.h ../cryptlib.h rsa_sign.c
+rsa_sign.o: ../../include/openssl/x509_vfy.h ../cryptlib.h
rsa_ssl.o: ../../e_os.h ../../include/openssl/asn1.h
rsa_ssl.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
rsa_ssl.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
@@ -254,4 +219,4 @@ rsa_ssl.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
rsa_ssl.o: ../../include/openssl/opensslv.h ../../include/openssl/rand.h
rsa_ssl.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
rsa_ssl.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
-rsa_ssl.o: ../cryptlib.h rsa_ssl.c
+rsa_ssl.o: ../cryptlib.h
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