diff options
Diffstat (limited to 'crypto')
108 files changed, 5839 insertions, 3583 deletions
diff --git a/crypto/Makefile.ssl b/crypto/Makefile.ssl index 7804227eed..42a01e194a 100644 --- a/crypto/Makefile.ssl +++ b/crypto/Makefile.ssl @@ -28,7 +28,7 @@ LIBS= SDIRS= md2 md5 sha mdc2 hmac ripemd \ des rc2 rc4 rc5 idea bf cast \ - bn ec rsa dsa ecdsa dh dso engine aes \ + bn ec rsa dsa ecdsa ecdh dh dso engine aes \ buffer bio stack lhash rand err objects \ evp asn1 pem x509 x509v3 conf txt_db pkcs7 pkcs12 comp ocsp ui krb5 @@ -98,7 +98,7 @@ lib: $(LIBOBJ) shared: if [ -n "$(SHARED_LIBS)" ]; then \ - (cd ..; make $(SHARED_LIB)); \ + (cd ..; $(MAKE) $(SHARED_LIB)); \ fi libs: @@ -180,7 +180,7 @@ cversion.o: ../include/openssl/err.h ../include/openssl/lhash.h cversion.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h cversion.o: ../include/openssl/safestack.h ../include/openssl/stack.h cversion.o: ../include/openssl/symhacks.h buildinf.h cryptlib.h cversion.c -ebcdic.o: ../include/openssl/opensslconf.h ebcdic.c +ebcdic.o: ../include/openssl/e_os2.h ../include/openssl/opensslconf.h ebcdic.c ex_data.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h ex_data.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h ex_data.o: ../include/openssl/err.h ../include/openssl/lhash.h diff --git a/crypto/asn1/Makefile.ssl b/crypto/asn1/Makefile.ssl index 1b0991e9d9..bad609eaca 100644 --- a/crypto/asn1/Makefile.ssl +++ b/crypto/asn1/Makefile.ssl @@ -145,13 +145,13 @@ a_d2i_fp.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h a_d2i_fp.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h a_d2i_fp.o: ../../include/openssl/symhacks.h ../cryptlib.h a_d2i_fp.c a_digest.o: ../../e_os.h ../../include/openssl/aes.h -a_digest.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -a_digest.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -a_digest.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -a_digest.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -a_digest.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -a_digest.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -a_digest.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +a_digest.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +a_digest.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +a_digest.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +a_digest.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +a_digest.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +a_digest.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +a_digest.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h a_digest.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h a_digest.o: ../../include/openssl/evp.h ../../include/openssl/idea.h a_digest.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -267,13 +267,13 @@ a_set.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h a_set.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h a_set.o: ../cryptlib.h a_set.c a_sign.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h -a_sign.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -a_sign.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -a_sign.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -a_sign.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -a_sign.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -a_sign.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -a_sign.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +a_sign.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +a_sign.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +a_sign.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +a_sign.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +a_sign.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +a_sign.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +a_sign.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h a_sign.o: ../../include/openssl/err.h ../../include/openssl/evp.h a_sign.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h a_sign.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -289,13 +289,13 @@ a_sign.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h a_sign.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h a_sign.o: ../../include/openssl/x509_vfy.h ../cryptlib.h a_sign.c a_strex.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h -a_strex.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -a_strex.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -a_strex.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -a_strex.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -a_strex.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -a_strex.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -a_strex.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +a_strex.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +a_strex.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +a_strex.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +a_strex.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +a_strex.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +a_strex.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +a_strex.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h a_strex.o: ../../include/openssl/evp.h ../../include/openssl/idea.h a_strex.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h a_strex.o: ../../include/openssl/md4.h ../../include/openssl/md5.h @@ -354,13 +354,13 @@ a_utf8.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h a_utf8.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h a_utf8.o: ../cryptlib.h a_utf8.c a_verify.o: ../../e_os.h ../../include/openssl/aes.h -a_verify.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -a_verify.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -a_verify.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -a_verify.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -a_verify.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -a_verify.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -a_verify.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +a_verify.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +a_verify.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +a_verify.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +a_verify.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +a_verify.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +a_verify.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +a_verify.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h a_verify.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h a_verify.o: ../../include/openssl/evp.h ../../include/openssl/idea.h a_verify.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -402,14 +402,14 @@ asn1_par.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h asn1_par.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h asn1_par.o: ../../include/openssl/symhacks.h ../cryptlib.h asn1_par.c asn_moid.o: ../../e_os.h ../../include/openssl/aes.h -asn_moid.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -asn_moid.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -asn_moid.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -asn_moid.o: ../../include/openssl/cast.h ../../include/openssl/conf.h -asn_moid.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -asn_moid.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -asn_moid.o: ../../include/openssl/dsa.h ../../include/openssl/dso.h -asn_moid.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +asn_moid.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +asn_moid.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +asn_moid.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +asn_moid.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +asn_moid.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +asn_moid.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +asn_moid.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h +asn_moid.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h asn_moid.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h asn_moid.o: ../../include/openssl/evp.h ../../include/openssl/idea.h asn_moid.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -434,13 +434,12 @@ asn_pack.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h asn_pack.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h asn_pack.o: ../../include/openssl/symhacks.h ../cryptlib.h asn_pack.c d2i_pr.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h -d2i_pr.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -d2i_pr.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -d2i_pr.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -d2i_pr.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -d2i_pr.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -d2i_pr.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -d2i_pr.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +d2i_pr.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +d2i_pr.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +d2i_pr.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +d2i_pr.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +d2i_pr.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +d2i_pr.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h d2i_pr.o: ../../include/openssl/err.h ../../include/openssl/evp.h d2i_pr.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h d2i_pr.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -455,13 +454,12 @@ d2i_pr.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h d2i_pr.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h d2i_pr.o: ../cryptlib.h d2i_pr.c d2i_pu.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h -d2i_pu.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -d2i_pu.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -d2i_pu.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -d2i_pu.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -d2i_pu.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -d2i_pu.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -d2i_pu.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +d2i_pu.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +d2i_pu.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +d2i_pu.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +d2i_pu.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +d2i_pu.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +d2i_pu.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h d2i_pu.o: ../../include/openssl/err.h ../../include/openssl/evp.h d2i_pu.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h d2i_pu.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -509,13 +507,12 @@ f_string.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h f_string.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h f_string.o: ../../include/openssl/symhacks.h ../cryptlib.h f_string.c i2d_pr.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h -i2d_pr.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -i2d_pr.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -i2d_pr.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -i2d_pr.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -i2d_pr.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -i2d_pr.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -i2d_pr.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +i2d_pr.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +i2d_pr.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +i2d_pr.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +i2d_pr.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +i2d_pr.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +i2d_pr.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h i2d_pr.o: ../../include/openssl/err.h ../../include/openssl/evp.h i2d_pr.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h i2d_pr.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -530,13 +527,12 @@ i2d_pr.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h i2d_pr.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h i2d_pr.o: ../cryptlib.h i2d_pr.c i2d_pu.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h -i2d_pu.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -i2d_pu.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -i2d_pu.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -i2d_pu.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -i2d_pu.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -i2d_pu.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -i2d_pu.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +i2d_pu.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +i2d_pu.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +i2d_pu.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +i2d_pu.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +i2d_pu.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +i2d_pu.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h i2d_pu.o: ../../include/openssl/err.h ../../include/openssl/evp.h i2d_pu.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h i2d_pu.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -558,21 +554,21 @@ n_pkey.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h n_pkey.o: ../../include/openssl/des.h ../../include/openssl/des_old.h n_pkey.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h n_pkey.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h -n_pkey.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h -n_pkey.o: ../../include/openssl/evp.h ../../include/openssl/idea.h -n_pkey.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h -n_pkey.o: ../../include/openssl/md4.h ../../include/openssl/md5.h -n_pkey.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h -n_pkey.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h -n_pkey.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h -n_pkey.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h -n_pkey.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h -n_pkey.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h -n_pkey.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h -n_pkey.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h -n_pkey.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h -n_pkey.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h -n_pkey.o: ../cryptlib.h n_pkey.c +n_pkey.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h +n_pkey.o: ../../include/openssl/err.h ../../include/openssl/evp.h +n_pkey.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +n_pkey.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +n_pkey.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +n_pkey.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +n_pkey.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +n_pkey.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h +n_pkey.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +n_pkey.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +n_pkey.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +n_pkey.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +n_pkey.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +n_pkey.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +n_pkey.o: ../../include/openssl/x509_vfy.h ../cryptlib.h n_pkey.c nsseq.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h nsseq.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h nsseq.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h @@ -580,20 +576,21 @@ nsseq.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h nsseq.o: ../../include/openssl/crypto.h ../../include/openssl/des.h nsseq.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h nsseq.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -nsseq.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h -nsseq.o: ../../include/openssl/evp.h ../../include/openssl/idea.h -nsseq.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h -nsseq.o: ../../include/openssl/md4.h ../../include/openssl/md5.h -nsseq.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h -nsseq.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h -nsseq.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h -nsseq.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h -nsseq.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h -nsseq.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h -nsseq.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h -nsseq.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h -nsseq.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h -nsseq.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h nsseq.c +nsseq.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h +nsseq.o: ../../include/openssl/ecdsa.h ../../include/openssl/evp.h +nsseq.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +nsseq.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +nsseq.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +nsseq.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +nsseq.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +nsseq.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h +nsseq.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +nsseq.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +nsseq.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +nsseq.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +nsseq.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +nsseq.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +nsseq.o: ../../include/openssl/x509_vfy.h nsseq.c p5_pbe.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h p5_pbe.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h p5_pbe.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h @@ -601,22 +598,22 @@ p5_pbe.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h p5_pbe.o: ../../include/openssl/crypto.h ../../include/openssl/des.h p5_pbe.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h p5_pbe.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -p5_pbe.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h -p5_pbe.o: ../../include/openssl/err.h ../../include/openssl/evp.h -p5_pbe.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h -p5_pbe.o: ../../include/openssl/md2.h ../../include/openssl/md4.h -p5_pbe.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h -p5_pbe.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h -p5_pbe.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h -p5_pbe.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h -p5_pbe.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h -p5_pbe.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h -p5_pbe.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h -p5_pbe.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h -p5_pbe.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h -p5_pbe.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h -p5_pbe.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h -p5_pbe.o: ../cryptlib.h p5_pbe.c +p5_pbe.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h +p5_pbe.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h +p5_pbe.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +p5_pbe.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +p5_pbe.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +p5_pbe.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +p5_pbe.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +p5_pbe.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +p5_pbe.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h +p5_pbe.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +p5_pbe.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +p5_pbe.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +p5_pbe.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +p5_pbe.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +p5_pbe.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +p5_pbe.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p5_pbe.c p5_pbev2.o: ../../e_os.h ../../include/openssl/aes.h p5_pbev2.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h p5_pbev2.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h @@ -625,12 +622,13 @@ p5_pbev2.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h p5_pbev2.o: ../../include/openssl/des.h ../../include/openssl/des_old.h p5_pbev2.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h p5_pbev2.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h -p5_pbev2.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h -p5_pbev2.o: ../../include/openssl/evp.h ../../include/openssl/idea.h -p5_pbev2.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h -p5_pbev2.o: ../../include/openssl/md4.h ../../include/openssl/md5.h -p5_pbev2.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h -p5_pbev2.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +p5_pbev2.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h +p5_pbev2.o: ../../include/openssl/err.h ../../include/openssl/evp.h +p5_pbev2.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +p5_pbev2.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +p5_pbev2.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +p5_pbev2.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +p5_pbev2.o: ../../include/openssl/opensslconf.h p5_pbev2.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h p5_pbev2.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h p5_pbev2.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h @@ -648,30 +646,30 @@ p8_pkey.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h p8_pkey.o: ../../include/openssl/des.h ../../include/openssl/des_old.h p8_pkey.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h p8_pkey.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h -p8_pkey.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h -p8_pkey.o: ../../include/openssl/evp.h ../../include/openssl/idea.h -p8_pkey.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h -p8_pkey.o: ../../include/openssl/md4.h ../../include/openssl/md5.h -p8_pkey.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h -p8_pkey.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h -p8_pkey.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h -p8_pkey.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h -p8_pkey.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h -p8_pkey.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h -p8_pkey.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h -p8_pkey.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h -p8_pkey.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h -p8_pkey.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h -p8_pkey.o: ../cryptlib.h p8_pkey.c +p8_pkey.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h +p8_pkey.o: ../../include/openssl/err.h ../../include/openssl/evp.h +p8_pkey.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +p8_pkey.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +p8_pkey.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +p8_pkey.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +p8_pkey.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +p8_pkey.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h +p8_pkey.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +p8_pkey.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +p8_pkey.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +p8_pkey.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +p8_pkey.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +p8_pkey.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +p8_pkey.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p8_pkey.c t_bitst.o: ../../e_os.h ../../include/openssl/aes.h -t_bitst.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -t_bitst.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -t_bitst.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -t_bitst.o: ../../include/openssl/cast.h ../../include/openssl/conf.h -t_bitst.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -t_bitst.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -t_bitst.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -t_bitst.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +t_bitst.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +t_bitst.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +t_bitst.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +t_bitst.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +t_bitst.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +t_bitst.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +t_bitst.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +t_bitst.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h t_bitst.o: ../../include/openssl/err.h ../../include/openssl/evp.h t_bitst.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h t_bitst.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -688,13 +686,13 @@ t_bitst.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h t_bitst.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h t_bitst.o: ../cryptlib.h t_bitst.c t_crl.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h -t_crl.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -t_crl.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -t_crl.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -t_crl.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h -t_crl.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -t_crl.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -t_crl.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +t_crl.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +t_crl.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +t_crl.o: ../../include/openssl/cast.h ../../include/openssl/conf.h +t_crl.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +t_crl.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +t_crl.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +t_crl.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h t_crl.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h t_crl.o: ../../include/openssl/evp.h ../../include/openssl/idea.h t_crl.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -710,26 +708,25 @@ t_crl.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h t_crl.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h t_crl.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h t_crl.o: ../../include/openssl/x509v3.h ../cryptlib.h t_crl.c -t_pkey.o: ../../e_os.h ../../include/openssl/asn1.h -t_pkey.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h +t_pkey.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h t_pkey.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h t_pkey.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h t_pkey.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -t_pkey.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h -t_pkey.o: ../../include/openssl/err.h ../../include/openssl/lhash.h -t_pkey.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h -t_pkey.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h -t_pkey.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rsa.h -t_pkey.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h -t_pkey.o: ../../include/openssl/symhacks.h ../cryptlib.h t_pkey.c +t_pkey.o: ../../include/openssl/ec.h ../../include/openssl/err.h +t_pkey.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h +t_pkey.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +t_pkey.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +t_pkey.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +t_pkey.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +t_pkey.o: ../cryptlib.h t_pkey.c t_req.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h -t_req.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -t_req.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -t_req.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -t_req.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h -t_req.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -t_req.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -t_req.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +t_req.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +t_req.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +t_req.o: ../../include/openssl/cast.h ../../include/openssl/conf.h +t_req.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +t_req.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +t_req.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +t_req.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h t_req.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h t_req.o: ../../include/openssl/evp.h ../../include/openssl/idea.h t_req.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -746,13 +743,13 @@ t_req.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h t_req.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h t_req.o: ../../include/openssl/x509v3.h ../cryptlib.h t_req.c t_spki.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h -t_spki.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -t_spki.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -t_spki.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -t_spki.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -t_spki.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -t_spki.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -t_spki.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +t_spki.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +t_spki.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +t_spki.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +t_spki.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +t_spki.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +t_spki.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +t_spki.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h t_spki.o: ../../include/openssl/err.h ../../include/openssl/evp.h t_spki.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h t_spki.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -768,13 +765,13 @@ t_spki.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h t_spki.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h t_spki.o: ../../include/openssl/x509_vfy.h ../cryptlib.h t_spki.c t_x509.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h -t_x509.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -t_x509.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -t_x509.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -t_x509.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h -t_x509.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -t_x509.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -t_x509.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +t_x509.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +t_x509.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +t_x509.o: ../../include/openssl/cast.h ../../include/openssl/conf.h +t_x509.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +t_x509.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +t_x509.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +t_x509.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h t_x509.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h t_x509.o: ../../include/openssl/evp.h ../../include/openssl/idea.h t_x509.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -791,13 +788,13 @@ t_x509.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h t_x509.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h t_x509.o: ../../include/openssl/x509v3.h ../cryptlib.h t_x509.c t_x509a.o: ../../e_os.h ../../include/openssl/aes.h -t_x509a.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -t_x509a.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -t_x509a.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -t_x509a.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -t_x509a.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -t_x509a.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -t_x509a.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +t_x509a.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +t_x509a.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +t_x509a.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +t_x509a.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +t_x509a.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +t_x509a.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +t_x509a.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h t_x509a.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h t_x509a.o: ../../include/openssl/evp.h ../../include/openssl/idea.h t_x509a.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -870,21 +867,21 @@ x_algor.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h x_algor.o: ../../include/openssl/crypto.h ../../include/openssl/des.h x_algor.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h x_algor.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -x_algor.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h -x_algor.o: ../../include/openssl/evp.h ../../include/openssl/idea.h -x_algor.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h -x_algor.o: ../../include/openssl/md4.h ../../include/openssl/md5.h -x_algor.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h -x_algor.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h -x_algor.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h -x_algor.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h -x_algor.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h -x_algor.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h -x_algor.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h -x_algor.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h -x_algor.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h -x_algor.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h -x_algor.o: x_algor.c +x_algor.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h +x_algor.o: ../../include/openssl/ecdsa.h ../../include/openssl/evp.h +x_algor.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +x_algor.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +x_algor.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +x_algor.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +x_algor.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +x_algor.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h +x_algor.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +x_algor.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +x_algor.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +x_algor.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +x_algor.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +x_algor.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +x_algor.o: ../../include/openssl/x509_vfy.h x_algor.c x_attrib.o: ../../e_os.h ../../include/openssl/aes.h x_attrib.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h x_attrib.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h @@ -893,12 +890,13 @@ x_attrib.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h x_attrib.o: ../../include/openssl/des.h ../../include/openssl/des_old.h x_attrib.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h x_attrib.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h -x_attrib.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h -x_attrib.o: ../../include/openssl/evp.h ../../include/openssl/idea.h -x_attrib.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h -x_attrib.o: ../../include/openssl/md4.h ../../include/openssl/md5.h -x_attrib.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h -x_attrib.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +x_attrib.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h +x_attrib.o: ../../include/openssl/err.h ../../include/openssl/evp.h +x_attrib.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +x_attrib.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +x_attrib.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +x_attrib.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +x_attrib.o: ../../include/openssl/opensslconf.h x_attrib.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h x_attrib.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h x_attrib.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h @@ -924,21 +922,22 @@ x_crl.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h x_crl.o: ../../include/openssl/crypto.h ../../include/openssl/des.h x_crl.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h x_crl.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -x_crl.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h -x_crl.o: ../../include/openssl/err.h ../../include/openssl/evp.h -x_crl.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h -x_crl.o: ../../include/openssl/md2.h ../../include/openssl/md4.h -x_crl.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h -x_crl.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h -x_crl.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h -x_crl.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h -x_crl.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h -x_crl.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h -x_crl.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h -x_crl.o: ../../include/openssl/sha.h ../../include/openssl/stack.h -x_crl.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h -x_crl.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h -x_crl.o: ../../include/openssl/x509_vfy.h ../cryptlib.h x_crl.c +x_crl.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h +x_crl.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h +x_crl.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +x_crl.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +x_crl.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +x_crl.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +x_crl.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +x_crl.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +x_crl.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +x_crl.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +x_crl.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +x_crl.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +x_crl.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +x_crl.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +x_crl.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +x_crl.o: ../cryptlib.h x_crl.c x_exten.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h x_exten.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h x_exten.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h @@ -946,29 +945,29 @@ x_exten.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h x_exten.o: ../../include/openssl/crypto.h ../../include/openssl/des.h x_exten.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h x_exten.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -x_exten.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h -x_exten.o: ../../include/openssl/evp.h ../../include/openssl/idea.h -x_exten.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h -x_exten.o: ../../include/openssl/md4.h ../../include/openssl/md5.h -x_exten.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h -x_exten.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h -x_exten.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h -x_exten.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h -x_exten.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h -x_exten.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h -x_exten.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h -x_exten.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h -x_exten.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h -x_exten.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h -x_exten.o: x_exten.c +x_exten.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h +x_exten.o: ../../include/openssl/ecdsa.h ../../include/openssl/evp.h +x_exten.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +x_exten.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +x_exten.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +x_exten.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +x_exten.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +x_exten.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h +x_exten.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +x_exten.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +x_exten.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +x_exten.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +x_exten.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +x_exten.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +x_exten.o: ../../include/openssl/x509_vfy.h x_exten.c x_info.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h -x_info.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -x_info.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -x_info.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -x_info.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -x_info.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -x_info.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -x_info.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +x_info.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +x_info.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +x_info.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +x_info.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +x_info.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +x_info.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +x_info.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h x_info.o: ../../include/openssl/err.h ../../include/openssl/evp.h x_info.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h x_info.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -999,29 +998,30 @@ x_name.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h x_name.o: ../../include/openssl/crypto.h ../../include/openssl/des.h x_name.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h x_name.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -x_name.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h -x_name.o: ../../include/openssl/err.h ../../include/openssl/evp.h -x_name.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h -x_name.o: ../../include/openssl/md2.h ../../include/openssl/md4.h -x_name.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h -x_name.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h -x_name.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h -x_name.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h -x_name.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h -x_name.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h -x_name.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h -x_name.o: ../../include/openssl/sha.h ../../include/openssl/stack.h -x_name.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h -x_name.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h -x_name.o: ../../include/openssl/x509_vfy.h ../cryptlib.h x_name.c +x_name.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h +x_name.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h +x_name.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +x_name.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +x_name.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +x_name.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +x_name.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +x_name.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +x_name.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +x_name.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +x_name.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +x_name.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +x_name.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +x_name.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +x_name.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +x_name.o: ../cryptlib.h x_name.c x_pkey.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h -x_pkey.o: ../../include/openssl/asn1_mac.h ../../include/openssl/asn1t.h -x_pkey.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -x_pkey.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -x_pkey.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -x_pkey.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -x_pkey.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -x_pkey.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +x_pkey.o: ../../include/openssl/asn1_mac.h ../../include/openssl/bio.h +x_pkey.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x_pkey.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x_pkey.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +x_pkey.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +x_pkey.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +x_pkey.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h x_pkey.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h x_pkey.o: ../../include/openssl/evp.h ../../include/openssl/idea.h x_pkey.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -1045,12 +1045,13 @@ x_pubkey.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h x_pubkey.o: ../../include/openssl/des.h ../../include/openssl/des_old.h x_pubkey.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h x_pubkey.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h -x_pubkey.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h -x_pubkey.o: ../../include/openssl/evp.h ../../include/openssl/idea.h -x_pubkey.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h -x_pubkey.o: ../../include/openssl/md4.h ../../include/openssl/md5.h -x_pubkey.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h -x_pubkey.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +x_pubkey.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h +x_pubkey.o: ../../include/openssl/err.h ../../include/openssl/evp.h +x_pubkey.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +x_pubkey.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +x_pubkey.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +x_pubkey.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +x_pubkey.o: ../../include/openssl/opensslconf.h x_pubkey.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h x_pubkey.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h x_pubkey.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h @@ -1067,21 +1068,22 @@ x_req.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h x_req.o: ../../include/openssl/crypto.h ../../include/openssl/des.h x_req.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h x_req.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -x_req.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h -x_req.o: ../../include/openssl/err.h ../../include/openssl/evp.h -x_req.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h -x_req.o: ../../include/openssl/md2.h ../../include/openssl/md4.h -x_req.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h -x_req.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h -x_req.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h -x_req.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h -x_req.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h -x_req.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h -x_req.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h -x_req.o: ../../include/openssl/sha.h ../../include/openssl/stack.h -x_req.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h -x_req.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h -x_req.o: ../../include/openssl/x509_vfy.h ../cryptlib.h x_req.c +x_req.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h +x_req.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h +x_req.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +x_req.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +x_req.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +x_req.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +x_req.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +x_req.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +x_req.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +x_req.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +x_req.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +x_req.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +x_req.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +x_req.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +x_req.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +x_req.o: ../cryptlib.h x_req.c x_sig.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h x_sig.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h x_sig.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h @@ -1089,21 +1091,22 @@ x_sig.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h x_sig.o: ../../include/openssl/crypto.h ../../include/openssl/des.h x_sig.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h x_sig.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -x_sig.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h -x_sig.o: ../../include/openssl/err.h ../../include/openssl/evp.h -x_sig.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h -x_sig.o: ../../include/openssl/md2.h ../../include/openssl/md4.h -x_sig.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h -x_sig.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h -x_sig.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h -x_sig.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h -x_sig.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h -x_sig.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h -x_sig.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h -x_sig.o: ../../include/openssl/sha.h ../../include/openssl/stack.h -x_sig.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h -x_sig.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h -x_sig.o: ../../include/openssl/x509_vfy.h ../cryptlib.h x_sig.c +x_sig.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h +x_sig.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h +x_sig.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +x_sig.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +x_sig.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +x_sig.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +x_sig.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +x_sig.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +x_sig.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +x_sig.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +x_sig.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +x_sig.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +x_sig.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +x_sig.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +x_sig.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +x_sig.o: ../cryptlib.h x_sig.c x_spki.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h x_spki.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h x_spki.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h @@ -1111,21 +1114,22 @@ x_spki.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h x_spki.o: ../../include/openssl/crypto.h ../../include/openssl/des.h x_spki.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h x_spki.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -x_spki.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h -x_spki.o: ../../include/openssl/err.h ../../include/openssl/evp.h -x_spki.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h -x_spki.o: ../../include/openssl/md2.h ../../include/openssl/md4.h -x_spki.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h -x_spki.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h -x_spki.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h -x_spki.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h -x_spki.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h -x_spki.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h -x_spki.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h -x_spki.o: ../../include/openssl/sha.h ../../include/openssl/stack.h -x_spki.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h -x_spki.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h -x_spki.o: ../../include/openssl/x509_vfy.h ../cryptlib.h x_spki.c +x_spki.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h +x_spki.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h +x_spki.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +x_spki.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +x_spki.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +x_spki.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +x_spki.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +x_spki.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +x_spki.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +x_spki.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +x_spki.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +x_spki.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +x_spki.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +x_spki.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +x_spki.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +x_spki.o: ../cryptlib.h x_spki.c x_val.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h x_val.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h x_val.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h @@ -1133,21 +1137,22 @@ x_val.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h x_val.o: ../../include/openssl/crypto.h ../../include/openssl/des.h x_val.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h x_val.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -x_val.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h -x_val.o: ../../include/openssl/err.h ../../include/openssl/evp.h -x_val.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h -x_val.o: ../../include/openssl/md2.h ../../include/openssl/md4.h -x_val.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h -x_val.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h -x_val.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h -x_val.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h -x_val.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h -x_val.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h -x_val.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h -x_val.o: ../../include/openssl/sha.h ../../include/openssl/stack.h -x_val.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h -x_val.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h -x_val.o: ../../include/openssl/x509_vfy.h ../cryptlib.h x_val.c +x_val.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h +x_val.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h +x_val.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +x_val.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +x_val.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +x_val.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +x_val.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +x_val.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +x_val.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +x_val.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +x_val.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +x_val.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +x_val.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +x_val.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +x_val.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +x_val.o: ../cryptlib.h x_val.c x_x509.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h x_x509.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h x_x509.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h @@ -1156,21 +1161,22 @@ x_x509.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h x_x509.o: ../../include/openssl/des.h ../../include/openssl/des_old.h x_x509.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h x_x509.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h -x_x509.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h -x_x509.o: ../../include/openssl/evp.h ../../include/openssl/idea.h -x_x509.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h -x_x509.o: ../../include/openssl/md4.h ../../include/openssl/md5.h -x_x509.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h -x_x509.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h -x_x509.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h -x_x509.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h -x_x509.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h -x_x509.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h -x_x509.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h -x_x509.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h -x_x509.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h -x_x509.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h -x_x509.o: ../../include/openssl/x509v3.h ../cryptlib.h x_x509.c +x_x509.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h +x_x509.o: ../../include/openssl/err.h ../../include/openssl/evp.h +x_x509.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +x_x509.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +x_x509.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +x_x509.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +x_x509.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +x_x509.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h +x_x509.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +x_x509.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +x_x509.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +x_x509.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +x_x509.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +x_x509.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +x_x509.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h +x_x509.o: ../cryptlib.h x_x509.c x_x509a.o: ../../e_os.h ../../include/openssl/aes.h x_x509a.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h x_x509a.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h @@ -1179,18 +1185,18 @@ x_x509a.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h x_x509a.o: ../../include/openssl/des.h ../../include/openssl/des_old.h x_x509a.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h x_x509a.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h -x_x509a.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h -x_x509a.o: ../../include/openssl/evp.h ../../include/openssl/idea.h -x_x509a.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h -x_x509a.o: ../../include/openssl/md4.h ../../include/openssl/md5.h -x_x509a.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h -x_x509a.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h -x_x509a.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h -x_x509a.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h -x_x509a.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h -x_x509a.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h -x_x509a.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h -x_x509a.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h -x_x509a.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h -x_x509a.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h -x_x509a.o: ../cryptlib.h x_x509a.c +x_x509a.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h +x_x509a.o: ../../include/openssl/err.h ../../include/openssl/evp.h +x_x509a.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +x_x509a.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +x_x509a.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +x_x509a.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +x_x509a.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +x_x509a.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h +x_x509a.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +x_x509a.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +x_x509a.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +x_x509a.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +x_x509a.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +x_x509a.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +x_x509a.o: ../../include/openssl/x509_vfy.h ../cryptlib.h x_x509a.c diff --git a/crypto/asn1/asn1.h b/crypto/asn1/asn1.h index 303fe5da8b..1be3e02298 100644 --- a/crypto/asn1/asn1.h +++ b/crypto/asn1/asn1.h @@ -1010,6 +1010,7 @@ void ERR_load_ASN1_strings(void); #define ASN1_F_I2D_ASN1_TIME 160 #define ASN1_F_I2D_DSA_PUBKEY 161 #define ASN1_F_I2D_ECDSA_PUBKEY 174 +#define ASN1_F_I2D_EC_PUBKEY 176 #define ASN1_F_I2D_NETSCAPE_RSA 162 #define ASN1_F_I2D_PRIVATEKEY 163 #define ASN1_F_I2D_PUBLICKEY 164 diff --git a/crypto/asn1/asn1_err.c b/crypto/asn1/asn1_err.c index dbb9753bb9..d64f987ac6 100644 --- a/crypto/asn1/asn1_err.c +++ b/crypto/asn1/asn1_err.c @@ -128,7 +128,8 @@ static ERR_STRING_DATA ASN1_str_functs[]= {ERR_PACK(0,ASN1_F_D2I_X509_PKEY,0), "d2i_X509_PKEY"}, {ERR_PACK(0,ASN1_F_I2D_ASN1_TIME,0), "I2D_ASN1_TIME"}, {ERR_PACK(0,ASN1_F_I2D_DSA_PUBKEY,0), "i2d_DSA_PUBKEY"}, -{ERR_PACK(0,ASN1_F_I2D_ECDSA_PUBKEY,0), "i2d_ECDSA_PUBKEY"}, +{ERR_PACK(0,ASN1_F_I2D_ECDSA_PUBKEY,0), "I2D_ECDSA_PUBKEY"}, +{ERR_PACK(0,ASN1_F_I2D_EC_PUBKEY,0), "i2d_EC_PUBKEY"}, {ERR_PACK(0,ASN1_F_I2D_NETSCAPE_RSA,0), "i2d_Netscape_RSA"}, {ERR_PACK(0,ASN1_F_I2D_PRIVATEKEY,0), "i2d_PrivateKey"}, {ERR_PACK(0,ASN1_F_I2D_PUBLICKEY,0), "i2d_PublicKey"}, diff --git a/crypto/asn1/asn1_lib.c b/crypto/asn1/asn1_lib.c index 77447a5240..0638870ab7 100644 --- a/crypto/asn1/asn1_lib.c +++ b/crypto/asn1/asn1_lib.c @@ -57,6 +57,7 @@ */ #include <stdio.h> +#include <limits.h> #include "cryptlib.h" #include <openssl/asn1.h> #include <openssl/asn1_mac.h> @@ -124,15 +125,13 @@ int ASN1_get_object(unsigned char **pp, long *plength, int *ptag, int *pclass, (int)(omax+ *pp)); #endif -#if 0 - if ((p+ *plength) > (omax+ *pp)) + if (*plength > (omax - (p - *pp))) { ASN1err(ASN1_F_ASN1_GET_OBJECT,ASN1_R_TOO_LONG); /* Set this so that even if things are not long enough * the values are set correctly */ ret|=0x80; } -#endif *pp=p; return(ret|inf); err: @@ -143,7 +142,7 @@ err: static int asn1_get_length(unsigned char **pp, int *inf, long *rl, int max) { unsigned char *p= *pp; - long ret=0; + unsigned long ret=0; int i; if (max-- < 1) return(0); @@ -159,6 +158,8 @@ static int asn1_get_length(unsigned char **pp, int *inf, long *rl, int max) i= *p&0x7f; if (*(p++) & 0x80) { + if (i > sizeof(long)) + return 0; if (max-- == 0) return(0); while (i-- > 0) { @@ -170,8 +171,10 @@ static int asn1_get_length(unsigned char **pp, int *inf, long *rl, int max) else ret=i; } + if (ret > LONG_MAX) + return 0; *pp=p; - *rl=ret; + *rl=(long)ret; return(1); } @@ -407,7 +410,7 @@ int ASN1_STRING_cmp(ASN1_STRING *a, ASN1_STRING *b) void asn1_add_error(unsigned char *address, int offset) { - char buf1[16],buf2[16]; + char buf1[DECIMAL_SIZE(address)+1],buf2[DECIMAL_SIZE(offset)+1]; sprintf(buf1,"%lu",(unsigned long)address); sprintf(buf2,"%d",offset); diff --git a/crypto/asn1/d2i_pr.c b/crypto/asn1/d2i_pr.c index d56e5fdc6e..8d0dc27904 100644 --- a/crypto/asn1/d2i_pr.c +++ b/crypto/asn1/d2i_pr.c @@ -68,8 +68,8 @@ #ifndef OPENSSL_NO_DSA #include <openssl/dsa.h> #endif -#ifndef OPENSSL_NO_ECDSA -#include <openssl/ecdsa.h> +#ifndef OPENSSL_NO_EC +#include <openssl/ec.h> #endif EVP_PKEY *d2i_PrivateKey(int type, EVP_PKEY **a, unsigned char **pp, @@ -111,9 +111,9 @@ EVP_PKEY *d2i_PrivateKey(int type, EVP_PKEY **a, unsigned char **pp, } break; #endif -#ifndef OPENSSL_NO_ECDSA - case EVP_PKEY_ECDSA: - if ((ret->pkey.ecdsa = d2i_ECDSAPrivateKey(NULL, +#ifndef OPENSSL_NO_EC + case EVP_PKEY_EC: + if ((ret->pkey.eckey = d2i_ECPrivateKey(NULL, (const unsigned char **)pp, length)) == NULL) { ASN1err(ASN1_F_D2I_PRIVATEKEY, ERR_R_ASN1_LIB); @@ -154,7 +154,7 @@ EVP_PKEY *d2i_AutoPrivateKey(EVP_PKEY **a, unsigned char **pp, if(sk_ASN1_TYPE_num(inkey) == 6) keytype = EVP_PKEY_DSA; else if (sk_ASN1_TYPE_num(inkey) == 4) - keytype = EVP_PKEY_ECDSA; + keytype = EVP_PKEY_EC; else keytype = EVP_PKEY_RSA; sk_ASN1_TYPE_pop_free(inkey, ASN1_TYPE_free); return d2i_PrivateKey(keytype, a, pp, length); diff --git a/crypto/asn1/d2i_pu.c b/crypto/asn1/d2i_pu.c index f66d72fd7b..cf97b83eac 100644 --- a/crypto/asn1/d2i_pu.c +++ b/crypto/asn1/d2i_pu.c @@ -68,8 +68,8 @@ #ifndef OPENSSL_NO_DSA #include <openssl/dsa.h> #endif -#ifndef OPENSSL_NO_ECDSA -#include <openssl/ecdsa.h> +#ifndef OPENSSL_NO_EC +#include <openssl/ec.h> #endif EVP_PKEY *d2i_PublicKey(int type, EVP_PKEY **a, unsigned char **pp, @@ -111,10 +111,11 @@ EVP_PKEY *d2i_PublicKey(int type, EVP_PKEY **a, unsigned char **pp, } break; #endif -#ifndef OPENSSL_NO_ECDSA - case EVP_PKEY_ECDSA: - if ((ret->pkey.ecdsa = ECDSAPublicKey_set_octet_string(&(ret->pkey.ecdsa), - (const unsigned char **)pp, length)) == NULL) +#ifndef OPENSSL_NO_EC + case EVP_PKEY_EC: + if ((ret->pkey.eckey = ECPublicKey_set_octet_string( + &(ret->pkey.eckey), (const unsigned char **)pp, + length)) == NULL) { ASN1err(ASN1_F_D2I_PUBLICKEY, ERR_R_ASN1_LIB); goto err; diff --git a/crypto/asn1/i2d_pr.c b/crypto/asn1/i2d_pr.c index a40c64d3f4..bbf2a0d2d6 100644 --- a/crypto/asn1/i2d_pr.c +++ b/crypto/asn1/i2d_pr.c @@ -67,8 +67,8 @@ #ifndef OPENSSL_NO_DSA #include <openssl/dsa.h> #endif -#ifndef OPENSSL_NO_ECDSA -#include <openssl/ecdsa.h> +#ifndef OPENSSL_NO_EC +#include <openssl/ec.h> #endif int i2d_PrivateKey(EVP_PKEY *a, unsigned char **pp) @@ -86,10 +86,10 @@ int i2d_PrivateKey(EVP_PKEY *a, unsigned char **pp) return(i2d_DSAPrivateKey(a->pkey.dsa,pp)); } #endif -#ifndef OPENSSL_NO_ECDSA - if (a->type == EVP_PKEY_ECDSA) +#ifndef OPENSSL_NO_EC + if (a->type == EVP_PKEY_EC) { - return(i2d_ECDSAPrivateKey(a->pkey.ecdsa, pp)); + return(i2d_ECPrivateKey(a->pkey.eckey, pp)); } #endif diff --git a/crypto/asn1/i2d_pu.c b/crypto/asn1/i2d_pu.c index 2fcc5554a7..85220b44d6 100644 --- a/crypto/asn1/i2d_pu.c +++ b/crypto/asn1/i2d_pu.c @@ -67,8 +67,8 @@ #ifndef OPENSSL_NO_DSA #include <openssl/dsa.h> #endif -#ifndef OPENSSL_NO_ECDSA -#include <openssl/ecdsa.h> +#ifndef OPENSSL_NO_EC +#include <openssl/ec.h> #endif int i2d_PublicKey(EVP_PKEY *a, unsigned char **pp) @@ -83,9 +83,9 @@ int i2d_PublicKey(EVP_PKEY *a, unsigned char **pp) case EVP_PKEY_DSA: return(i2d_DSAPublicKey(a->pkey.dsa,pp)); #endif -#ifndef OPENSSL_NO_ECDSA - case EVP_PKEY_ECDSA: - return(ECDSAPublicKey_get_octet_string(a->pkey.ecdsa, pp)); +#ifndef OPENSSL_NO_EC + case EVP_PKEY_EC: + return(ECPublicKey_get_octet_string(a->pkey.eckey, pp)); #endif default: ASN1err(ASN1_F_I2D_PUBLICKEY,ASN1_R_UNSUPPORTED_PUBLIC_KEY_TYPE); diff --git a/crypto/asn1/t_pkey.c b/crypto/asn1/t_pkey.c index 652b26b7b0..964fd914f7 100644 --- a/crypto/asn1/t_pkey.c +++ b/crypto/asn1/t_pkey.c @@ -55,6 +55,11 @@ * copied and put under another distribution licence * [including the GNU Public Licence.] */ +/* ==================================================================== + * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. + * Binary polynomial ECC support in OpenSSL originally developed by + * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project. + */ #include <stdio.h> #include "cryptlib.h" @@ -70,12 +75,14 @@ #ifndef OPENSSL_NO_DSA #include <openssl/dsa.h> #endif -#ifndef OPENSSL_NO_ECDSA -#include <openssl/ecdsa.h> +#ifndef OPENSSL_NO_EC +#include <openssl/ec.h> #endif static int print(BIO *fp,const char *str,BIGNUM *num, unsigned char *buf,int off); +static int print_bin(BIO *fp, const char *str, const unsigned char *num, + size_t len, int off); #ifndef OPENSSL_NO_RSA #ifndef OPENSSL_NO_FP_API int RSA_print_fp(FILE *fp, const RSA *x, int off) @@ -257,6 +264,22 @@ int ECPKParameters_print_fp(FILE *fp, const EC_GROUP *x, int off) BIO_free(b); return(ret); } + +int EC_KEY_print_fp(FILE *fp, const EC_KEY *x, int off) + { + BIO *b; + int ret; + + if ((b=BIO_new(BIO_s_file())) == NULL) + { + ECerr(EC_F_EC_KEY_PRINT_FP, ERR_R_BIO_LIB); + return(0); + } + BIO_set_fp(b, fp, BIO_NOCLOSE); + ret = EC_KEY_print(b, x, off); + BIO_free(b); + return(ret); + } #endif int ECPKParameters_print(BIO *bp, const EC_GROUP *x, int off) @@ -268,7 +291,9 @@ int ECPKParameters_print(BIO *bp, const EC_GROUP *x, int off) BN_CTX *ctx=NULL; EC_POINT *point=NULL; BIGNUM *p=NULL, *a=NULL, *b=NULL, *gen=NULL, - *order=NULL, *cofactor=NULL, *seed=NULL; + *order=NULL, *cofactor=NULL; + const unsigned char *seed; + size_t seed_len=0; static const char *gen_compressed = "Generator (compressed):"; static const char *gen_uncompressed = "Generator (uncompressed):"; @@ -306,8 +331,12 @@ int ECPKParameters_print(BIO *bp, const EC_GROUP *x, int off) else { /* explicit parameters */ - /* TODO */ + int is_char_two = 0; point_conversion_form_t form; + int tmp_nid = EC_METHOD_get_field_type(EC_GROUP_method_of(x)); + + if (tmp_nid == NID_X9_62_characteristic_two_field) + is_char_two = 1; if ((p = BN_new()) == NULL || (a = BN_new()) == NULL || (b = BN_new()) == NULL || (order = BN_new()) == NULL || @@ -317,10 +346,21 @@ int ECPKParameters_print(BIO *bp, const EC_GROUP *x, int off) goto err; } - if (!EC_GROUP_get_curve_GFp(x, p, a, b, ctx)) + if (is_char_two) { - reason = ERR_R_EC_LIB; - goto err; + if (!EC_GROUP_get_curve_GF2m(x, p, a, b, ctx)) + { + reason = ERR_R_EC_LIB; + goto err; + } + } + else /* prime field */ + { + if (!EC_GROUP_get_curve_GFp(x, p, a, b, ctx)) + { + reason = ERR_R_EC_LIB; + goto err; + } } if ((point = EC_GROUP_get0_generator(x)) == NULL) @@ -356,18 +396,8 @@ int ECPKParameters_print(BIO *bp, const EC_GROUP *x, int off) if (buf_len < (i = (size_t)BN_num_bytes(cofactor))) buf_len = i; - if (EC_GROUP_get0_seed(x)) - { - seed = BN_bin2bn(EC_GROUP_get0_seed(x), - EC_GROUP_get_seed_len(x), NULL); - if (seed == NULL) - { - reason = ERR_R_BN_LIB; - goto err; - } - if (buf_len < (i = (size_t)BN_num_bytes(seed))) - buf_len = i; - } + if ((seed = EC_GROUP_get0_seed(x)) != NULL) + seed_len = EC_GROUP_get_seed_len(x); buf_len += 10; if ((buffer = OPENSSL_malloc(buf_len)) == NULL) @@ -379,10 +409,25 @@ int ECPKParameters_print(BIO *bp, const EC_GROUP *x, int off) { if (off > 128) off=128; memset(str,' ',off); + if (BIO_write(bp, str, off) <= 0) + goto err; + } + + if (BIO_printf(bp, "Field Type: %s\n", OBJ_nid2sn(tmp_nid)) + <= 0) + goto err; + + if (is_char_two) + { + if ((p != NULL) && !print(bp, "Polynomial:", p, buffer, + off)) + goto err; + } + else + { + if ((p != NULL) && !print(bp, "Prime:", p, buffer,off)) + goto err; } - - if ((p != NULL) && !print(bp, "P: ", p, buffer, off)) - goto err; if ((a != NULL) && !print(bp, "A: ", a, buffer, off)) goto err; if ((b != NULL) && !print(bp, "B: ", b, buffer, off)) @@ -409,8 +454,8 @@ int ECPKParameters_print(BIO *bp, const EC_GROUP *x, int off) buffer, off)) goto err; if ((cofactor != NULL) && !print(bp, "Cofactor: ", cofactor, buffer, off)) goto err; - if ((seed != NULL) && !print(bp, "Seed:", seed, - buffer, off)) goto err; + if (seed && !print_bin(bp, "Seed:", seed, seed_len, off)) + goto err; } ret=1; err: @@ -428,37 +473,14 @@ err: BN_free(order); if (cofactor) BN_free(cofactor); - if (seed) - BN_free(seed); if (ctx) BN_CTX_free(ctx); if (buffer != NULL) OPENSSL_free(buffer); return(ret); } -#endif /* OPENSSL_NO_EC */ - -#ifndef OPENSSL_NO_ECDSA -#ifndef OPENSSL_NO_FP_API -int ECDSA_print_fp(FILE *fp, const ECDSA *x, int off) -{ - BIO *b; - int ret; - - if ((b=BIO_new(BIO_s_file())) == NULL) - { - ECDSAerr(ECDSA_F_ECDSA_PRINT_FP, ERR_R_BIO_LIB); - return(0); - } - BIO_set_fp(b, fp, BIO_NOCLOSE); - ret = ECDSA_print(b, x, off); - BIO_free(b); - return(ret); -} -#endif - -int ECDSA_print(BIO *bp, const ECDSA *x, int off) +int EC_KEY_print(BIO *bp, const EC_KEY *x, int off) { char str[128]; unsigned char *buffer=NULL; @@ -474,7 +496,7 @@ int ECDSA_print(BIO *bp, const ECDSA *x, int off) } if ((pub_key = EC_POINT_point2bn(x->group, x->pub_key, - ECDSA_get_conversion_form(x), NULL, ctx)) == NULL) + x->conv_form, NULL, ctx)) == NULL) { reason = ERR_R_EC_LIB; goto err; @@ -516,7 +538,7 @@ int ECDSA_print(BIO *bp, const ECDSA *x, int off) ret=1; err: if (!ret) - ECDSAerr(ECDSA_F_ECDSA_PRINT, reason); + ECerr(EC_F_EC_KEY_PRINT, reason); if (pub_key) BN_free(pub_key); if (ctx) @@ -525,7 +547,7 @@ err: OPENSSL_free(buffer); return(ret); } -#endif +#endif /* OPENSSL_NO_EC */ static int print(BIO *bp, const char *number, BIGNUM *num, unsigned char *buf, int off) @@ -577,6 +599,44 @@ static int print(BIO *bp, const char *number, BIGNUM *num, unsigned char *buf, return(1); } +static int print_bin(BIO *fp, const char *name, const unsigned char *buf, + size_t len, int off) + { + int i; + char str[128]; + + if (buf == NULL) + return 1; + if (off) + { + if (off > 128) + off=128; + memset(str,' ',off); + if (BIO_write(fp, str, off) <= 0) + return 0; + } + + if (BIO_printf(fp,"%s", name) <= 0) + return 0; + + for (i=0; i<len; i++) + { + if ((i%15) == 0) + { + str[0]='\n'; + memset(&(str[1]),' ',off+4); + if (BIO_write(fp, str, off+1+4) <= 0) + return 0; + } + if (BIO_printf(fp,"%02x%s",buf[i],((i+1) == len)?"":":") <= 0) + return 0; + } + if (BIO_write(fp,"\n",1) <= 0) + return 0; + + return 1; + } + #ifndef OPENSSL_NO_DH #ifndef OPENSSL_NO_FP_API int DHparams_print_fp(FILE *fp, const DH *x) @@ -690,26 +750,26 @@ err: #endif /* !OPENSSL_NO_DSA */ -#ifndef OPENSSL_NO_ECDSA +#ifndef OPENSSL_NO_EC #ifndef OPENSSL_NO_FP_API -int ECDSAParameters_print_fp(FILE *fp, const ECDSA *x) +int ECParameters_print_fp(FILE *fp, const EC_KEY *x) { BIO *b; int ret; if ((b=BIO_new(BIO_s_file())) == NULL) - { - ECDSAerr(ECDSA_F_ECDSAPARAMETERS_PRINT_FP, ERR_R_BIO_LIB); + { + ECerr(EC_F_ECPARAMETERS_PRINT_FP, ERR_R_BIO_LIB); return(0); - } + } BIO_set_fp(b, fp, BIO_NOCLOSE); - ret = ECDSAParameters_print(b, x); + ret = ECParameters_print(b, x); BIO_free(b); return(ret); } #endif -int ECDSAParameters_print(BIO *bp, const ECDSA *x) +int ECParameters_print(BIO *bp, const EC_KEY *x) { int reason=ERR_R_EC_LIB, ret=0; BIGNUM *order=NULL; @@ -741,7 +801,7 @@ int ECDSAParameters_print(BIO *bp, const ECDSA *x) err: if (order) BN_free(order); - ECDSAerr(ECDSA_F_ECDSAPARAMETERS_PRINT, reason); + ECerr(EC_F_ECPARAMETERS_PRINT, reason); return(ret); } diff --git a/crypto/asn1/t_req.c b/crypto/asn1/t_req.c index bfa58cc967..7cf09a4646 100644 --- a/crypto/asn1/t_req.c +++ b/crypto/asn1/t_req.c @@ -134,11 +134,11 @@ int X509_REQ_print(BIO *bp, X509_REQ *x) } else #endif -#ifndef OPENSSL_NO_ECDSA - if (pkey != NULL && pkey->type == EVP_PKEY_ECDSA) +#ifndef OPENSSL_NO_EC + if (pkey != NULL && pkey->type == EVP_PKEY_EC) { - BIO_printf(bp, "%12sECDSA Public Key: \n",""); - ECDSA_print(bp, pkey->pkey.ecdsa, 16); + BIO_printf(bp, "%12sEC Public Key: \n",""); + EC_KEY_print(bp, pkey->pkey.eckey, 16); } else #endif diff --git a/crypto/asn1/t_spki.c b/crypto/asn1/t_spki.c index 86821119d8..499e12834a 100644 --- a/crypto/asn1/t_spki.c +++ b/crypto/asn1/t_spki.c @@ -93,11 +93,11 @@ int NETSCAPE_SPKI_print(BIO *out, NETSCAPE_SPKI *spki) } else #endif -#ifndef OPENSSL_NO_ECDSA - if (pkey->type == EVP_PKEY_ECDSA) +#ifndef OPENSSL_NO_EC + if (pkey->type == EVP_PKEY_EC) { - BIO_printf(out, " ECDSA Public Key:\n"); - ECDSA_print(out, pkey->pkey.ecdsa,2); + BIO_printf(out, " EC Public Key:\n"); + EC_KEY_print(out, pkey->pkey.eckey,2); } else #endif diff --git a/crypto/asn1/t_x509.c b/crypto/asn1/t_x509.c index ae6d5ce041..5074a74928 100644 --- a/crypto/asn1/t_x509.c +++ b/crypto/asn1/t_x509.c @@ -66,8 +66,8 @@ #ifndef OPENSSL_NO_DSA #include <openssl/dsa.h> #endif -#ifndef OPENSSL_NO_ECDSA -#include <openssl/ecdsa.h> +#ifndef OPENSSL_NO_EC +#include <openssl/ec.h> #endif #include <openssl/objects.h> #include <openssl/x509.h> @@ -232,11 +232,11 @@ int X509_print_ex(BIO *bp, X509 *x, unsigned long nmflags, unsigned long cflag) } else #endif -#ifndef OPENSSL_NO_ECDSA - if (pkey->type == EVP_PKEY_ECDSA) +#ifndef OPENSSL_NO_EC + if (pkey->type == EVP_PKEY_EC) { - BIO_printf(bp, "%12sECDSA Public Key:\n",""); - ECDSA_print(bp, pkey->pkey.ecdsa, 16); + BIO_printf(bp, "%12sEC Public Key:\n",""); + EC_KEY_print(bp, pkey->pkey.eckey, 16); } else #endif diff --git a/crypto/asn1/x_pubkey.c b/crypto/asn1/x_pubkey.c index 68ddeb43f2..c32a6eaa49 100644 --- a/crypto/asn1/x_pubkey.c +++ b/crypto/asn1/x_pubkey.c @@ -129,14 +129,14 @@ int X509_PUBKEY_set(X509_PUBKEY **x, EVP_PKEY *pkey) OPENSSL_free(p); } #endif -#ifndef OPENSSL_NO_ECDSA - else if (pkey->type == EVP_PKEY_ECDSA) +#ifndef OPENSSL_NO_EC + else if (pkey->type == EVP_PKEY_EC) { int nid=0; unsigned char *pp; - ECDSA *ecdsa; + EC_KEY *eckey; - ecdsa = pkey->pkey.ecdsa; + eckey = pkey->pkey.eckey; ASN1_TYPE_free(a->parameter); if ((a->parameter = ASN1_TYPE_new()) == NULL) @@ -145,8 +145,8 @@ int X509_PUBKEY_set(X509_PUBKEY **x, EVP_PKEY *pkey) goto err; } - if (EC_GROUP_get_asn1_flag(ecdsa->group) - && (nid = EC_GROUP_get_nid(ecdsa->group))) + if (EC_GROUP_get_asn1_flag(eckey->group) + && (nid = EC_GROUP_get_nid(eckey->group))) { /* just set the OID */ a->parameter->type = V_ASN1_OBJECT; @@ -154,9 +154,9 @@ int X509_PUBKEY_set(X509_PUBKEY **x, EVP_PKEY *pkey) } else /* explicit parameters */ { - if ((i = i2d_ECDSAParameters(ecdsa, NULL)) == 0) + if ((i = i2d_ECParameters(eckey, NULL)) == 0) { - X509err(X509_F_X509_PUBKEY_SET, ERR_R_ECDSA_LIB); + X509err(X509_F_X509_PUBKEY_SET, ERR_R_EC_LIB); goto err; } if ((p = (unsigned char *) OPENSSL_malloc(i)) == NULL) @@ -165,9 +165,9 @@ int X509_PUBKEY_set(X509_PUBKEY **x, EVP_PKEY *pkey) goto err; } pp = p; - if (!i2d_ECDSAParameters(ecdsa, &pp)) + if (!i2d_ECParameters(eckey, &pp)) { - X509err(X509_F_X509_PUBKEY_SET, ERR_R_ECDSA_LIB); + X509err(X509_F_X509_PUBKEY_SET, ERR_R_EC_LIB); OPENSSL_free(p); goto err; } @@ -277,24 +277,25 @@ EVP_PKEY *X509_PUBKEY_get(X509_PUBKEY *key) ret->save_parameters=1; } #endif -#ifndef OPENSSL_NO_ECDSA - else if (ret->type == EVP_PKEY_ECDSA) +#ifndef OPENSSL_NO_EC + else if (ret->type == EVP_PKEY_EC) { if (a->parameter && (a->parameter->type == V_ASN1_SEQUENCE)) { /* type == V_ASN1_SEQUENCE => we have explicit parameters * (e.g. parameters in the X9_62_EC_PARAMETERS-structure ) */ - if ((ret->pkey.ecdsa= ECDSA_new()) == NULL) + if ((ret->pkey.eckey= EC_KEY_new()) == NULL) { - X509err(X509_F_X509_PUBKEY_GET, ERR_R_MALLOC_FAILURE); + X509err(X509_F_X509_PUBKEY_GET, + ERR_R_MALLOC_FAILURE); goto err; } cp = p = a->parameter->value.sequence->data; j = a->parameter->value.sequence->length; - if (!d2i_ECDSAParameters(&ret->pkey.ecdsa, &cp, (long)j)) + if (!d2i_ECParameters(&ret->pkey.eckey, &cp, (long)j)) { - X509err(X509_F_X509_PUBKEY_GET, ERR_R_ECDSA_LIB); + X509err(X509_F_X509_PUBKEY_GET, ERR_R_EC_LIB); goto err; } } @@ -303,16 +304,16 @@ EVP_PKEY *X509_PUBKEY_get(X509_PUBKEY *key) /* type == V_ASN1_OBJECT => the parameters are given * by an asn1 OID */ - ECDSA *ecdsa; - if (ret->pkey.ecdsa == NULL) - ret->pkey.ecdsa = ECDSA_new(); - ecdsa = ret->pkey.ecdsa; - if (ecdsa->group) - EC_GROUP_free(ecdsa->group); - if ((ecdsa->group = EC_GROUP_new_by_name( + EC_KEY *eckey; + if (ret->pkey.eckey == NULL) + ret->pkey.eckey = EC_KEY_new(); + eckey = ret->pkey.eckey; + if (eckey->group) + EC_GROUP_free(eckey->group); + if ((eckey->group = EC_GROUP_new_by_nid( OBJ_obj2nid(a->parameter->value.object))) == NULL) goto err; - EC_GROUP_set_asn1_flag(ecdsa->group, + EC_GROUP_set_asn1_flag(eckey->group, OPENSSL_EC_NAMED_CURVE); } /* the case implicitlyCA is currently not implemented */ @@ -453,38 +454,38 @@ int i2d_DSA_PUBKEY(DSA *a, unsigned char **pp) } #endif -#ifndef OPENSSL_NO_ECDSA -ECDSA *d2i_ECDSA_PUBKEY(ECDSA **a, unsigned char **pp, long length) +#ifndef OPENSSL_NO_EC +EC_KEY *d2i_EC_PUBKEY(EC_KEY **a, unsigned char **pp, long length) { EVP_PKEY *pkey; - ECDSA *key; + EC_KEY *key; unsigned char *q; q = *pp; pkey = d2i_PUBKEY(NULL, &q, length); if (!pkey) return(NULL); - key = EVP_PKEY_get1_ECDSA(pkey); + key = EVP_PKEY_get1_EC_KEY(pkey); EVP_PKEY_free(pkey); if (!key) return(NULL); *pp = q; if (a) { - ECDSA_free(*a); + EC_KEY_free(*a); *a = key; } return(key); } -int i2d_ECDSA_PUBKEY(ECDSA *a, unsigned char **pp) +int i2d_EC_PUBKEY(EC_KEY *a, unsigned char **pp) { EVP_PKEY *pktmp; int ret; if (!a) return(0); if ((pktmp = EVP_PKEY_new()) == NULL) { - ASN1err(ASN1_F_I2D_ECDSA_PUBKEY, ERR_R_MALLOC_FAILURE); + ASN1err(ASN1_F_I2D_EC_PUBKEY, ERR_R_MALLOC_FAILURE); return(0); } - EVP_PKEY_set1_ECDSA(pktmp, a); + EVP_PKEY_set1_EC_KEY(pktmp, a); ret = i2d_PUBKEY(pktmp, pp); EVP_PKEY_free(pktmp); return(ret); diff --git a/crypto/bio/b_print.c b/crypto/bio/b_print.c index 3ce1290772..80c9cb69db 100644 --- a/crypto/bio/b_print.c +++ b/crypto/bio/b_print.c @@ -109,7 +109,7 @@ * o ... (for OpenSSL) */ -#if HAVE_LONG_DOUBLE +#ifdef HAVE_LONG_DOUBLE #define LDOUBLE long double #else #define LDOUBLE double diff --git a/crypto/bn/Makefile.ssl b/crypto/bn/Makefile.ssl index 46663d389c..4e27e87eab 100644 --- a/crypto/bn/Makefile.ssl +++ b/crypto/bn/Makefile.ssl @@ -39,12 +39,12 @@ LIB=$(TOP)/libcrypto.a LIBSRC= bn_add.c bn_div.c bn_exp.c bn_lib.c bn_ctx.c bn_mul.c bn_mod.c \ bn_print.c bn_rand.c bn_shift.c bn_word.c bn_blind.c \ bn_kron.c bn_sqrt.c bn_gcd.c bn_prime.c bn_err.c bn_sqr.c bn_asm.c \ - bn_recp.c bn_mont.c bn_mpi.c bn_exp2.c + bn_recp.c bn_mont.c bn_mpi.c bn_exp2.c bn_gf2m.c LIBOBJ= bn_add.o bn_div.o bn_exp.o bn_lib.o bn_ctx.o bn_mul.o bn_mod.o \ bn_print.o bn_rand.o bn_shift.o bn_word.o bn_blind.o \ bn_kron.o bn_sqrt.o bn_gcd.o bn_prime.o bn_err.o bn_sqr.o $(BN_ASM) \ - bn_recp.o bn_mont.o bn_mpi.o bn_exp2.o + bn_recp.o bn_mont.o bn_mpi.o bn_exp2.o bn_gf2m.o SRC= $(LIBSRC) @@ -242,6 +242,13 @@ bn_gcd.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h bn_gcd.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h bn_gcd.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h bn_gcd.o: ../cryptlib.h bn_gcd.c bn_lcl.h +bn_gf2m.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h +bn_gf2m.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +bn_gf2m.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +bn_gf2m.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +bn_gf2m.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h +bn_gf2m.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +bn_gf2m.o: ../cryptlib.h bn_gf2m.c bn_lcl.h bn_kron.o: ../../include/openssl/bn.h ../../include/openssl/e_os2.h bn_kron.o: ../../include/openssl/opensslconf.h bn_kron.c bn_lcl.h bn_lib.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h diff --git a/crypto/bn/bn.h b/crypto/bn/bn.h index 1eaf879553..1170465b1f 100644 --- a/crypto/bn/bn.h +++ b/crypto/bn/bn.h @@ -55,6 +55,32 @@ * copied and put under another distribution licence * [including the GNU Public Licence.] */ +/* ==================================================================== + * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. + * + * Portions of the attached software ("Contribution") are developed by + * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project. + * + * The Contribution is licensed pursuant to the Eric Young open source + * license provided above. + * + * In addition, Sun covenants to all licensees who provide a reciprocal + * covenant with respect to their own patents if any, not to sue under + * current and future patent claims necessarily infringed by the making, + * using, practicing, selling, offering for sale and/or otherwise + * disposing of the Contribution as delivered hereunder + * (or portions thereof), provided that such covenant shall not apply: + * 1) for code that a licensee deletes from the Contribution; + * 2) separates from the Contribution; or + * 3) for infringements caused by: + * i) the modification of the Contribution or + * ii) the combination of the Contribution with other software or + * devices where such combination causes the infringement. + * + * The binary polynomial arithmetic software is originally written by + * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories. + * + */ #ifndef HEADER_BN_H #define HEADER_BN_H @@ -430,7 +456,7 @@ int BN_mod_mul_montgomery(BIGNUM *r,const BIGNUM *a,const BIGNUM *b, int BN_from_montgomery(BIGNUM *r,const BIGNUM *a, BN_MONT_CTX *mont, BN_CTX *ctx); void BN_MONT_CTX_free(BN_MONT_CTX *mont); -int BN_MONT_CTX_set(BN_MONT_CTX *mont,const BIGNUM *modulus,BN_CTX *ctx); +int BN_MONT_CTX_set(BN_MONT_CTX *mont,const BIGNUM *mod,BN_CTX *ctx); BN_MONT_CTX *BN_MONT_CTX_copy(BN_MONT_CTX *to,BN_MONT_CTX *from); BN_BLINDING *BN_BLINDING_new(BIGNUM *A,BIGNUM *Ai,BIGNUM *mod); @@ -453,6 +479,40 @@ int BN_mod_exp_recp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, int BN_div_recp(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m, BN_RECP_CTX *recp, BN_CTX *ctx); +/* Functions for arithmetic over binary polynomials represented by BIGNUMs. + * + * The BIGNUM::neg property of BIGNUMs representing binary polynomials is ignored. + * + * Note that input arguments are not const so that their bit arrays can + * be expanded to the appropriate size if needed. + */ +int BN_GF2m_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b); /* r = a + b */ +#define BN_GF2m_sub(r, a, b) BN_GF2m_add(r, a, b) +int BN_GF2m_mod(BIGNUM *r, const BIGNUM *a, const BIGNUM *p); /* r = a mod p */ +int BN_GF2m_mod_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *p, BN_CTX *ctx); /* r = (a * b) mod p */ +int BN_GF2m_mod_sqr(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx); /* r = (a * a) mod p */ +int BN_GF2m_mod_inv(BIGNUM *r, const BIGNUM *b, const BIGNUM *p, BN_CTX *ctx); /* r = (1 / b) mod p */ +int BN_GF2m_mod_div(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *p, BN_CTX *ctx); /* r = (a / b) mod p */ +int BN_GF2m_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *p, BN_CTX *ctx); /* r = (a ^ b) mod p */ +int BN_GF2m_mod_sqrt(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx); /* r = sqrt(a) mod p */ +int BN_GF2m_mod_solve_quad(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx); /* r^2 + r = a mod p */ +#define BN_GF2m_cmp(a, b) BN_ucmp((a), (b)) +/* Some functions allow for representation of the irreducible polynomials + * as an unsigned int[], say p. The irreducible f(t) is then of the form: + * t^p[0] + t^p[1] + ... + t^p[k] + * where m = p[0] > p[1] > ... > p[k] = 0. + */ +int BN_GF2m_mod_arr(BIGNUM *r, const BIGNUM *a, const unsigned int p[]); /* r = a mod p */ +int BN_GF2m_mod_mul_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const unsigned int p[], BN_CTX *ctx); /* r = (a * b) mod p */ +int BN_GF2m_mod_sqr_arr(BIGNUM *r, const BIGNUM *a, const unsigned int p[], BN_CTX *ctx); /* r = (a * a) mod p */ +int BN_GF2m_mod_inv_arr(BIGNUM *r, const BIGNUM *b, const unsigned int p[], BN_CTX *ctx); /* r = (1 / b) mod p */ +int BN_GF2m_mod_div_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const unsigned int p[], BN_CTX *ctx); /* r = (a / b) mod p */ +int BN_GF2m_mod_exp_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const unsigned int p[], BN_CTX *ctx); /* r = (a ^ b) mod p */ +int BN_GF2m_mod_sqrt_arr(BIGNUM *r, const BIGNUM *a, const unsigned int p[], BN_CTX *ctx); /* r = sqrt(a) mod p */ +int BN_GF2m_mod_solve_quad_arr(BIGNUM *r, const BIGNUM *a, const unsigned int p[], BN_CTX *ctx); /* r^2 + r = a mod p */ +int BN_GF2m_poly2arr(const BIGNUM *a, unsigned int p[], int max); +int BN_GF2m_arr2poly(const unsigned int p[], BIGNUM *a); + /* library internal functions */ #define bn_expand(a,bits) ((((((bits+BN_BITS2-1))/BN_BITS2)) <= (a)->dmax)?\ @@ -510,6 +570,13 @@ void ERR_load_BN_strings(void); #define BN_F_BN_DIV 107 #define BN_F_BN_EXPAND2 108 #define BN_F_BN_EXPAND_INTERNAL 120 +#define BN_F_BN_GF2M_MOD 126 +#define BN_F_BN_GF2M_MOD_DIV 123 +#define BN_F_BN_GF2M_MOD_EXP 127 +#define BN_F_BN_GF2M_MOD_MUL 124 +#define BN_F_BN_GF2M_MOD_SOLVE_QUAD 128 +#define BN_F_BN_GF2M_MOD_SOLVE_QUAD_ARR 129 +#define BN_F_BN_GF2M_MOD_SQR 125 #define BN_F_BN_MOD_EXP2_MONT 118 #define BN_F_BN_MOD_EXP_MONT 109 #define BN_F_BN_MOD_EXP_MONT_WORD 117 @@ -535,6 +602,7 @@ void ERR_load_BN_strings(void); #define BN_R_INVALID_LENGTH 106 #define BN_R_INVALID_RANGE 115 #define BN_R_NOT_A_SQUARE 111 +#define BN_R_NOT_IMPLEMENTED 116 #define BN_R_NOT_INITIALIZED 107 #define BN_R_NO_INVERSE 108 #define BN_R_P_IS_NOT_PRIME 112 diff --git a/crypto/bn/bn_err.c b/crypto/bn/bn_err.c index fb84ee96d8..bcc7ff97af 100644 --- a/crypto/bn/bn_err.c +++ b/crypto/bn/bn_err.c @@ -1,6 +1,6 @@ /* crypto/bn/bn_err.c */ /* ==================================================================== - * Copyright (c) 1999 The OpenSSL Project. All rights reserved. + * Copyright (c) 1999-2002 The OpenSSL Project. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -77,6 +77,13 @@ static ERR_STRING_DATA BN_str_functs[]= {ERR_PACK(0,BN_F_BN_DIV,0), "BN_div"}, {ERR_PACK(0,BN_F_BN_EXPAND2,0), "bn_expand2"}, {ERR_PACK(0,BN_F_BN_EXPAND_INTERNAL,0), "BN_EXPAND_INTERNAL"}, +{ERR_PACK(0,BN_F_BN_GF2M_MOD,0), "BN_GF2m_mod"}, +{ERR_PACK(0,BN_F_BN_GF2M_MOD_DIV,0), "BN_GF2m_mod_div"}, +{ERR_PACK(0,BN_F_BN_GF2M_MOD_EXP,0), "BN_GF2m_mod_exp"}, +{ERR_PACK(0,BN_F_BN_GF2M_MOD_MUL,0), "BN_GF2m_mod_mul"}, +{ERR_PACK(0,BN_F_BN_GF2M_MOD_SOLVE_QUAD,0), "BN_GF2m_mod_solve_quad"}, +{ERR_PACK(0,BN_F_BN_GF2M_MOD_SOLVE_QUAD_ARR,0), "BN_GF2m_mod_solve_quad_arr"}, +{ERR_PACK(0,BN_F_BN_GF2M_MOD_SQR,0), "BN_GF2m_mod_sqr"}, {ERR_PACK(0,BN_F_BN_MOD_EXP2_MONT,0), "BN_mod_exp2_mont"}, {ERR_PACK(0,BN_F_BN_MOD_EXP_MONT,0), "BN_mod_exp_mont"}, {ERR_PACK(0,BN_F_BN_MOD_EXP_MONT_WORD,0), "BN_mod_exp_mont_word"}, @@ -105,6 +112,7 @@ static ERR_STRING_DATA BN_str_reasons[]= {BN_R_INVALID_LENGTH ,"invalid length"}, {BN_R_INVALID_RANGE ,"invalid range"}, {BN_R_NOT_A_SQUARE ,"not a square"}, +{BN_R_NOT_IMPLEMENTED ,"not implemented"}, {BN_R_NOT_INITIALIZED ,"not initialized"}, {BN_R_NO_INVERSE ,"no inverse"}, {BN_R_P_IS_NOT_PRIME ,"p is not prime"}, diff --git a/crypto/bn/bn_lib.c b/crypto/bn/bn_lib.c index a016cb7f53..20f851cc66 100644 --- a/crypto/bn/bn_lib.c +++ b/crypto/bn/bn_lib.c @@ -363,17 +363,6 @@ static BN_ULONG *bn_expand_internal(const BIGNUM *b, int words) } } - /* Now need to zero any data between b->top and b->max */ - /* XXX Why? */ - - A= &(a[b->top]); - for (i=(words - b->top)>>3; i>0; i--,A+=8) - { - A[0]=0; A[1]=0; A[2]=0; A[3]=0; - A[4]=0; A[5]=0; A[6]=0; A[7]=0; - } - for (i=(words - b->top)&7; i>0; i--,A++) - A[0]=0; #else memset(A,0,sizeof(BN_ULONG)*(words+1)); memcpy(A,b->d,sizeof(b->d[0])*b->top); @@ -397,6 +386,12 @@ BIGNUM *bn_dup_expand(const BIGNUM *b, int words) { BIGNUM *r = NULL; + /* This function does not work if + * words <= b->dmax && top < words + * because BN_dup() does not preserve 'dmax'! + * (But bn_dup_expand() is not used anywhere yet.) + */ + if (words > b->dmax) { BN_ULONG *a = bn_expand_internal(b, words); @@ -429,12 +424,16 @@ BIGNUM *bn_dup_expand(const BIGNUM *b, int words) } /* This is an internal function that should not be used in applications. - * It ensures that 'b' has enough room for a 'words' word number number. + * It ensures that 'b' has enough room for a 'words' word number + * and initialises any unused part of b->d with leading zeros. * It is mostly used by the various BIGNUM routines. If there is an error, * NULL is returned. If not, 'b' is returned. */ BIGNUM *bn_expand2(BIGNUM *b, int words) { + BN_ULONG *A; + int i; + if (words > b->dmax) { BN_ULONG *a = bn_expand_internal(b, words); @@ -449,6 +448,21 @@ BIGNUM *bn_expand2(BIGNUM *b, int words) else b = NULL; } + + /* NB: bn_wexpand() calls this only if the BIGNUM really has to grow */ + if ((b != NULL) && (b->top < b->dmax)) + { + A = &(b->d[b->top]); + for (i=(b->dmax - b->top)>>3; i>0; i--,A+=8) + { + A[0]=0; A[1]=0; A[2]=0; A[3]=0; + A[4]=0; A[5]=0; A[6]=0; A[7]=0; + } + for (i=(b->dmax - b->top)&7; i>0; i--,A++) + A[0]=0; + assert(A == &(b->d[b->dmax])); + } + return b; } diff --git a/crypto/bn/bn_rand.c b/crypto/bn/bn_rand.c index 9e08ccd22e..e6705f7025 100644 --- a/crypto/bn/bn_rand.c +++ b/crypto/bn/bn_rand.c @@ -230,6 +230,7 @@ static int bn_rand_range(int pseudo, BIGNUM *r, BIGNUM *range) { int (*bn_rand)(BIGNUM *, int, int, int) = pseudo ? BN_pseudo_rand : BN_rand; int n; + int count = 100; if (range->neg || BN_is_zero(range)) { @@ -263,6 +264,13 @@ static int bn_rand_range(int pseudo, BIGNUM *r, BIGNUM *range) if (BN_cmp(r, range) >= 0) if (!BN_sub(r, r, range)) return 0; } + + if (!--count) + { + BNerr(BN_F_BN_RAND_RANGE, BN_R_TOO_MANY_ITERATIONS); + return 0; + } + } while (BN_cmp(r, range) >= 0); } @@ -272,6 +280,12 @@ static int bn_rand_range(int pseudo, BIGNUM *r, BIGNUM *range) { /* range = 11..._2 or range = 101..._2 */ if (!bn_rand(r, n, -1, 0)) return 0; + + if (!--count) + { + BNerr(BN_F_BN_RAND_RANGE, BN_R_TOO_MANY_ITERATIONS); + return 0; + } } while (BN_cmp(r, range) >= 0); } diff --git a/crypto/bn/bn_sqrt.c b/crypto/bn/bn_sqrt.c index e2a1105dc8..463d4a8139 100644 --- a/crypto/bn/bn_sqrt.c +++ b/crypto/bn/bn_sqrt.c @@ -65,14 +65,12 @@ BIGNUM *BN_mod_sqrt(BIGNUM *in, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx) * using the Tonelli/Shanks algorithm (cf. Henri Cohen, "A Course * in Algebraic Computational Number Theory", algorithm 1.5.1). * 'p' must be prime! - * If 'a' is not a square, this is not necessarily detected by - * the algorithms; a bogus result must be expected in this case. */ { BIGNUM *ret = in; int err = 1; int r; - BIGNUM *b, *q, *t, *x, *y; + BIGNUM *A, *b, *q, *t, *x, *y; int e, i, j; if (!BN_is_odd(p) || BN_abs_is_word(p, 1)) @@ -109,17 +107,8 @@ BIGNUM *BN_mod_sqrt(BIGNUM *in, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx) return ret; } -#if 0 /* if BN_mod_sqrt is used with correct input, this just wastes time */ - r = BN_kronecker(a, p, ctx); - if (r < -1) return NULL; - if (r == -1) - { - BNerr(BN_F_BN_MOD_SQRT, BN_R_NOT_A_SQUARE); - return(NULL); - } -#endif - BN_CTX_start(ctx); + A = BN_CTX_get(ctx); b = BN_CTX_get(ctx); q = BN_CTX_get(ctx); t = BN_CTX_get(ctx); @@ -131,6 +120,9 @@ BIGNUM *BN_mod_sqrt(BIGNUM *in, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx) ret = BN_new(); if (ret == NULL) goto end; + /* A = a mod p */ + if (!BN_nnmod(A, a, p, ctx)) goto end; + /* now write |p| - 1 as 2^e*q where q is odd */ e = 1; while (!BN_is_bit_set(p, e)) @@ -149,9 +141,9 @@ BIGNUM *BN_mod_sqrt(BIGNUM *in, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx) if (!BN_rshift(q, p, 2)) goto end; q->neg = 0; if (!BN_add_word(q, 1)) goto end; - if (!BN_mod_exp(ret, a, q, p, ctx)) goto end; + if (!BN_mod_exp(ret, A, q, p, ctx)) goto end; err = 0; - goto end; + goto vrfy; } if (e == 2) @@ -182,15 +174,8 @@ BIGNUM *BN_mod_sqrt(BIGNUM *in, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx) * November 1992.) */ - /* make sure that a is reduced modulo p */ - if (a->neg || BN_ucmp(a, p) >= 0) - { - if (!BN_nnmod(x, a, p, ctx)) goto end; - a = x; /* use x as temporary variable */ - } - /* t := 2*a */ - if (!BN_mod_lshift1_quick(t, a, p)) goto end; + if (!BN_mod_lshift1_quick(t, A, p)) goto end; /* b := (2*a)^((|p|-5)/8) */ if (!BN_rshift(q, p, 3)) goto end; @@ -205,12 +190,12 @@ BIGNUM *BN_mod_sqrt(BIGNUM *in, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx) if (!BN_sub_word(t, 1)) goto end; /* x = a*b*t */ - if (!BN_mod_mul(x, a, b, p, ctx)) goto end; + if (!BN_mod_mul(x, A, b, p, ctx)) goto end; if (!BN_mod_mul(x, x, t, p, ctx)) goto end; if (!BN_copy(ret, x)) goto end; err = 0; - goto end; + goto vrfy; } /* e > 2, so we really have to use the Tonelli/Shanks algorithm. @@ -297,7 +282,7 @@ BIGNUM *BN_mod_sqrt(BIGNUM *in, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx) /* x := a^((q-1)/2) */ if (BN_is_zero(t)) /* special case: p = 2^e + 1 */ { - if (!BN_nnmod(t, a, p, ctx)) goto end; + if (!BN_nnmod(t, A, p, ctx)) goto end; if (BN_is_zero(t)) { /* special case: a == 0 (mod p) */ @@ -310,7 +295,7 @@ BIGNUM *BN_mod_sqrt(BIGNUM *in, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx) } else { - if (!BN_mod_exp(x, a, t, p, ctx)) goto end; + if (!BN_mod_exp(x, A, t, p, ctx)) goto end; if (BN_is_zero(x)) { /* special case: a == 0 (mod p) */ @@ -322,10 +307,10 @@ BIGNUM *BN_mod_sqrt(BIGNUM *in, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx) /* b := a*x^2 (= a^q) */ if (!BN_mod_sqr(b, x, p, ctx)) goto end; - if (!BN_mod_mul(b, b, a, p, ctx)) goto end; + if (!BN_mod_mul(b, b, A, p, ctx)) goto end; /* x := a*x (= a^((q+1)/2)) */ - if (!BN_mod_mul(x, x, a, p, ctx)) goto end; + if (!BN_mod_mul(x, x, A, p, ctx)) goto end; while (1) { @@ -342,7 +327,7 @@ BIGNUM *BN_mod_sqrt(BIGNUM *in, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx) { if (!BN_copy(ret, x)) goto end; err = 0; - goto end; + goto vrfy; } @@ -373,6 +358,22 @@ BIGNUM *BN_mod_sqrt(BIGNUM *in, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx) e = i; } + vrfy: + if (!err) + { + /* verify the result -- the input might have been not a square + * (test added in 0.9.8) */ + + if (!BN_mod_sqr(x, ret, p, ctx)) + err = 1; + + if (!err && 0 != BN_cmp(x, A)) + { + BNerr(BN_F_BN_MOD_SQRT, BN_R_NOT_A_SQUARE); + err = 1; + } + } + end: if (err) { diff --git a/crypto/bn/bntest.c b/crypto/bn/bntest.c index 8158a67374..9026b2888d 100644 --- a/crypto/bn/bntest.c +++ b/crypto/bn/bntest.c @@ -55,6 +55,32 @@ * copied and put under another distribution licence * [including the GNU Public Licence.] */ +/* ==================================================================== + * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. + * + * Portions of the attached software ("Contribution") are developed by + * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project. + * + * The Contribution is licensed pursuant to the Eric Young open source + * license provided above. + * + * In addition, Sun covenants to all licensees who provide a reciprocal + * covenant with respect to their own patents if any, not to sue under + * current and future patent claims necessarily infringed by the making, + * using, practicing, selling, offering for sale and/or otherwise + * disposing of the Contribution as delivered hereunder + * (or portions thereof), provided that such covenant shall not apply: + * 1) for code that a licensee deletes from the Contribution; + * 2) separates from the Contribution; or + * 3) for infringements caused by: + * i) the modification of the Contribution or + * ii) the combination of the Contribution with other software or + * devices where such combination causes the infringement. + * + * The binary polynomial arithmetic software is originally written by + * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories. + * + */ #include <stdio.h> #include <stdlib.h> @@ -91,6 +117,15 @@ int test_mod(BIO *bp,BN_CTX *ctx); int test_mod_mul(BIO *bp,BN_CTX *ctx); int test_mod_exp(BIO *bp,BN_CTX *ctx); int test_exp(BIO *bp,BN_CTX *ctx); +int test_gf2m_add(BIO *bp); +int test_gf2m_mod(BIO *bp); +int test_gf2m_mod_mul(BIO *bp,BN_CTX *ctx); +int test_gf2m_mod_sqr(BIO *bp,BN_CTX *ctx); +int test_gf2m_mod_inv(BIO *bp,BN_CTX *ctx); +int test_gf2m_mod_div(BIO *bp,BN_CTX *ctx); +int test_gf2m_mod_exp(BIO *bp,BN_CTX *ctx); +int test_gf2m_mod_sqrt(BIO *bp,BN_CTX *ctx); +int test_gf2m_mod_solve_quad(BIO *bp,BN_CTX *ctx); int test_kron(BIO *bp,BN_CTX *ctx); int test_sqrt(BIO *bp,BN_CTX *ctx); int rand_neg(void); @@ -234,6 +269,42 @@ int main(int argc, char *argv[]) if (!test_sqrt(out,ctx)) goto err; BIO_flush(out); + message(out,"BN_GF2m_add"); + if (!test_gf2m_add(out)) goto err; + BIO_flush(out); + + message(out,"BN_GF2m_mod"); + if (!test_gf2m_mod(out)) goto err; + BIO_flush(out); + + message(out,"BN_GF2m_mod_mul"); + if (!test_gf2m_mod_mul(out,ctx)) goto err; + BIO_flush(out); + + message(out,"BN_GF2m_mod_sqr"); + if (!test_gf2m_mod_sqr(out,ctx)) goto err; + BIO_flush(out); + + message(out,"BN_GF2m_mod_inv"); + if (!test_gf2m_mod_inv(out,ctx)) goto err; + BIO_flush(out); + + message(out,"BN_GF2m_mod_div"); + if (!test_gf2m_mod_div(out,ctx)) goto err; + BIO_flush(out); + + message(out,"BN_GF2m_mod_exp"); + if (!test_gf2m_mod_exp(out,ctx)) goto err; + BIO_flush(out); + + message(out,"BN_GF2m_mod_sqrt"); + if (!test_gf2m_mod_sqrt(out,ctx)) goto err; + BIO_flush(out); + + message(out,"BN_GF2m_mod_solve_quad"); + if (!test_gf2m_mod_solve_quad(out,ctx)) goto err; + BIO_flush(out); + BN_CTX_free(ctx); BIO_free(out); @@ -872,6 +943,581 @@ int test_exp(BIO *bp, BN_CTX *ctx) return(1); } +int test_gf2m_add(BIO *bp) + { + BIGNUM a,b,c; + int i, ret = 0; + + BN_init(&a); + BN_init(&b); + BN_init(&c); + + for (i=0; i<num0; i++) + { + BN_rand(&a,512,0,0); + BN_copy(&b, BN_value_one()); + a.neg=rand_neg(); + b.neg=rand_neg(); + BN_GF2m_add(&c,&a,&b); +#if 0 /* make test uses ouput in bc but bc can't handle GF(2^m) arithmetic */ + if (bp != NULL) + { + if (!results) + { + BN_print(bp,&a); + BIO_puts(bp," ^ "); + BN_print(bp,&b); + BIO_puts(bp," = "); + } + BN_print(bp,&c); + BIO_puts(bp,"\n"); + } +#endif + /* Test that two added values have the correct parity. */ + if((BN_is_odd(&a) && BN_is_odd(&c)) || (!BN_is_odd(&a) && !BN_is_odd(&c))) + { + fprintf(stderr,"GF(2^m) addition test (a) failed!\n"); + goto err; + } + BN_GF2m_add(&c,&c,&c); + /* Test that c + c = 0. */ + if(!BN_is_zero(&c)) + { + fprintf(stderr,"GF(2^m) addition test (b) failed!\n"); + goto err; + } + } + ret = 1; + err: + BN_free(&a); + BN_free(&b); + BN_free(&c); + return ret; + } + +int test_gf2m_mod(BIO *bp) + { + BIGNUM *a,*b[2],*c,*d,*e; + int i, j, ret = 0; + unsigned int p0[] = {163,7,6,3,0}; + unsigned int p1[] = {193,15,0}; + + a=BN_new(); + b[0]=BN_new(); + b[1]=BN_new(); + c=BN_new(); + d=BN_new(); + e=BN_new(); + + BN_GF2m_arr2poly(p0, b[0]); + BN_GF2m_arr2poly(p1, b[1]); + + for (i=0; i<num0; i++) + { + BN_bntest_rand(a, 1024, 0, 0); + for (j=0; j < 2; j++) + { + BN_GF2m_mod(c, a, b[j]); +#if 0 /* make test uses ouput in bc but bc can't handle GF(2^m) arithmetic */ + if (bp != NULL) + { + if (!results) + { + BN_print(bp,a); + BIO_puts(bp," % "); + BN_print(bp,b[j]); + BIO_puts(bp," - "); + BN_print(bp,c); + BIO_puts(bp,"\n"); + } + } +#endif + BN_GF2m_add(d, a, c); + BN_GF2m_mod(e, d, b[j]); + /* Test that a + (a mod p) mod p == 0. */ + if(!BN_is_zero(e)) + { + fprintf(stderr,"GF(2^m) modulo test failed!\n"); + goto err; + } + } + } + ret = 1; + err: + BN_free(a); + BN_free(b[0]); + BN_free(b[1]); + BN_free(c); + BN_free(d); + BN_free(e); + return ret; + } + +int test_gf2m_mod_mul(BIO *bp,BN_CTX *ctx) + { + BIGNUM *a,*b[2],*c,*d,*e,*f,*g,*h; + int i, j, ret = 0; + unsigned int p0[] = {163,7,6,3,0}; + unsigned int p1[] = {193,15,0}; + + a=BN_new(); + b[0]=BN_new(); + b[1]=BN_new(); + c=BN_new(); + d=BN_new(); + e=BN_new(); + f=BN_new(); + g=BN_new(); + h=BN_new(); + + BN_GF2m_arr2poly(p0, b[0]); + BN_GF2m_arr2poly(p1, b[1]); + + for (i=0; i<num0; i++) + { + BN_bntest_rand(a, 1024, 0, 0); + BN_bntest_rand(c, 1024, 0, 0); + BN_bntest_rand(d, 1024, 0, 0); + for (j=0; j < 2; j++) + { + BN_GF2m_mod_mul(e, a, c, b[j], ctx); +#if 0 /* make test uses ouput in bc but bc can't handle GF(2^m) arithmetic */ + if (bp != NULL) + { + if (!results) + { + BN_print(bp,a); + BIO_puts(bp," * "); + BN_print(bp,c); + BIO_puts(bp," % "); + BN_print(bp,b[j]); + BIO_puts(bp," - "); + BN_print(bp,e); + BIO_puts(bp,"\n"); + } + } +#endif + BN_GF2m_add(f, a, d); + BN_GF2m_mod_mul(g, f, c, b[j], ctx); + BN_GF2m_mod_mul(h, d, c, b[j], ctx); + BN_GF2m_add(f, e, g); + BN_GF2m_add(f, f, h); + /* Test that (a+d)*c = a*c + d*c. */ + if(!BN_is_zero(f)) + { + fprintf(stderr,"GF(2^m) modular multiplication test failed!\n"); + goto err; + } + } + } + ret = 1; + err: + BN_free(a); + BN_free(b[0]); + BN_free(b[1]); + BN_free(c); + BN_free(d); + BN_free(e); + BN_free(f); + BN_free(g); + BN_free(h); + return ret; + } + +int test_gf2m_mod_sqr(BIO *bp,BN_CTX *ctx) + { + BIGNUM *a,*b[2],*c,*d; + int i, j, ret = 0; + unsigned int p0[] = {163,7,6,3,0}; + unsigned int p1[] = {193,15,0}; + + a=BN_new(); + b[0]=BN_new(); + b[1]=BN_new(); + c=BN_new(); + d=BN_new(); + + BN_GF2m_arr2poly(p0, b[0]); + BN_GF2m_arr2poly(p1, b[1]); + + for (i=0; i<num0; i++) + { + BN_bntest_rand(a, 1024, 0, 0); + for (j=0; j < 2; j++) + { + BN_GF2m_mod_sqr(c, a, b[j], ctx); + BN_copy(d, a); + BN_GF2m_mod_mul(d, a, d, b[j], ctx); +#if 0 /* make test uses ouput in bc but bc can't handle GF(2^m) arithmetic */ + if (bp != NULL) + { + if (!results) + { + BN_print(bp,a); + BIO_puts(bp," ^ 2 % "); + BN_print(bp,b[j]); + BIO_puts(bp, " = "); + BN_print(bp,c); + BIO_puts(bp,"; a * a = "); + BN_print(bp,d); + BIO_puts(bp,"\n"); + } + } +#endif + BN_GF2m_add(d, c, d); + /* Test that a*a = a^2. */ + if(!BN_is_zero(d)) + { + fprintf(stderr,"GF(2^m) modular squaring test failed!\n"); + goto err; + } + } + } + ret = 1; + err: + BN_free(a); + BN_free(b[0]); + BN_free(b[1]); + BN_free(c); + BN_free(d); + return ret; + } + +int test_gf2m_mod_inv(BIO *bp,BN_CTX *ctx) + { + BIGNUM *a,*b[2],*c,*d; + int i, j, ret = 0; + unsigned int p0[] = {163,7,6,3,0}; + unsigned int p1[] = {193,15,0}; + + a=BN_new(); + b[0]=BN_new(); + b[1]=BN_new(); + c=BN_new(); + d=BN_new(); + + BN_GF2m_arr2poly(p0, b[0]); + BN_GF2m_arr2poly(p1, b[1]); + + for (i=0; i<num0; i++) + { + BN_bntest_rand(a, 512, 0, 0); + for (j=0; j < 2; j++) + { + BN_GF2m_mod_inv(c, a, b[j], ctx); + BN_GF2m_mod_mul(d, a, c, b[j], ctx); +#if 0 /* make test uses ouput in bc but bc can't handle GF(2^m) arithmetic */ + if (bp != NULL) + { + if (!results) + { + BN_print(bp,a); + BIO_puts(bp, " * "); + BN_print(bp,c); + BIO_puts(bp," - 1 % "); + BN_print(bp,b[j]); + BIO_puts(bp,"\n"); + } + } +#endif + /* Test that ((1/a)*a) = 1. */ + if(!BN_is_one(d)) + { + fprintf(stderr,"GF(2^m) modular inversion test failed!\n"); + goto err; + } + } + } + ret = 1; + err: + BN_free(a); + BN_free(b[0]); + BN_free(b[1]); + BN_free(c); + BN_free(d); + return ret; + } + +int test_gf2m_mod_div(BIO *bp,BN_CTX *ctx) + { + BIGNUM *a,*b[2],*c,*d,*e,*f; + int i, j, ret = 0; + unsigned int p0[] = {163,7,6,3,0}; + unsigned int p1[] = {193,15,0}; + + a=BN_new(); + b[0]=BN_new(); + b[1]=BN_new(); + c=BN_new(); + d=BN_new(); + e=BN_new(); + f=BN_new(); + + BN_GF2m_arr2poly(p0, b[0]); + BN_GF2m_arr2poly(p1, b[1]); + + for (i=0; i<num0; i++) + { + BN_bntest_rand(a, 512, 0, 0); + BN_bntest_rand(c, 512, 0, 0); + for (j=0; j < 2; j++) + { + BN_GF2m_mod_div(d, a, c, b[j], ctx); + BN_GF2m_mod_mul(e, d, c, b[j], ctx); + BN_GF2m_mod_div(f, a, e, b[j], ctx); +#if 0 /* make test uses ouput in bc but bc can't handle GF(2^m) arithmetic */ + if (bp != NULL) + { + if (!results) + { + BN_print(bp,a); + BIO_puts(bp, " = "); + BN_print(bp,c); + BIO_puts(bp," * "); + BN_print(bp,d); + BIO_puts(bp, " % "); + BN_print(bp,b[j]); + BIO_puts(bp,"\n"); + } + } +#endif + /* Test that ((a/c)*c)/a = 1. */ + if(!BN_is_one(f)) + { + fprintf(stderr,"GF(2^m) modular division test failed!\n"); + goto err; + } + } + } + ret = 1; + err: + BN_free(a); + BN_free(b[0]); + BN_free(b[1]); + BN_free(c); + BN_free(d); + BN_free(e); + BN_free(f); + return ret; + } + +int test_gf2m_mod_exp(BIO *bp,BN_CTX *ctx) + { + BIGNUM *a,*b[2],*c,*d,*e,*f; + int i, j, ret = 0; + unsigned int p0[] = {163,7,6,3,0}; + unsigned int p1[] = {193,15,0}; + + a=BN_new(); + b[0]=BN_new(); + b[1]=BN_new(); + c=BN_new(); + d=BN_new(); + e=BN_new(); + f=BN_new(); + + BN_GF2m_arr2poly(p0, b[0]); + BN_GF2m_arr2poly(p1, b[1]); + + for (i=0; i<num0; i++) + { + BN_bntest_rand(a, 512, 0, 0); + BN_bntest_rand(c, 512, 0, 0); + BN_bntest_rand(d, 512, 0, 0); + for (j=0; j < 2; j++) + { + BN_GF2m_mod_exp(e, a, c, b[j], ctx); + BN_GF2m_mod_exp(f, a, d, b[j], ctx); + BN_GF2m_mod_mul(e, e, f, b[j], ctx); + BN_add(f, c, d); + BN_GF2m_mod_exp(f, a, f, b[j], ctx); +#if 0 /* make test uses ouput in bc but bc can't handle GF(2^m) arithmetic */ + if (bp != NULL) + { + if (!results) + { + BN_print(bp,a); + BIO_puts(bp, " ^ ("); + BN_print(bp,c); + BIO_puts(bp," + "); + BN_print(bp,d); + BIO_puts(bp, ") = "); + BN_print(bp,e); + BIO_puts(bp, "; - "); + BN_print(bp,f); + BIO_puts(bp, " % "); + BN_print(bp,b[j]); + BIO_puts(bp,"\n"); + } + } +#endif + BN_GF2m_add(f, e, f); + /* Test that a^(c+d)=a^c*a^d. */ + if(!BN_is_zero(f)) + { + fprintf(stderr,"GF(2^m) modular exponentiation test failed!\n"); + goto err; + } + } + } + ret = 1; + err: + BN_free(a); + BN_free(b[0]); + BN_free(b[1]); + BN_free(c); + BN_free(d); + BN_free(e); + BN_free(f); + return ret; + } + +int test_gf2m_mod_sqrt(BIO *bp,BN_CTX *ctx) + { + BIGNUM *a,*b[2],*c,*d,*e,*f; + int i, j, ret = 0; + unsigned int p0[] = {163,7,6,3,0}; + unsigned int p1[] = {193,15,0}; + + a=BN_new(); + b[0]=BN_new(); + b[1]=BN_new(); + c=BN_new(); + d=BN_new(); + e=BN_new(); + f=BN_new(); + + BN_GF2m_arr2poly(p0, b[0]); + BN_GF2m_arr2poly(p1, b[1]); + + for (i=0; i<num0; i++) + { + BN_bntest_rand(a, 512, 0, 0); + for (j=0; j < 2; j++) + { + BN_GF2m_mod(c, a, b[j]); + BN_GF2m_mod_sqrt(d, a, b[j], ctx); + BN_GF2m_mod_sqr(e, d, b[j], ctx); +#if 0 /* make test uses ouput in bc but bc can't handle GF(2^m) arithmetic */ + if (bp != NULL) + { + if (!results) + { + BN_print(bp,d); + BIO_puts(bp, " ^ 2 - "); + BN_print(bp,a); + BIO_puts(bp,"\n"); + } + } +#endif + BN_GF2m_add(f, c, e); + /* Test that d^2 = a, where d = sqrt(a). */ + if(!BN_is_zero(f)) + { + fprintf(stderr,"GF(2^m) modular square root test failed!\n"); + goto err; + } + } + } + ret = 1; + err: + BN_free(a); + BN_free(b[0]); + BN_free(b[1]); + BN_free(c); + BN_free(d); + BN_free(e); + BN_free(f); + return ret; + } + +int test_gf2m_mod_solve_quad(BIO *bp,BN_CTX *ctx) + { + BIGNUM *a,*b[2],*c,*d,*e; + int i, j, s = 0, t, ret = 0; + unsigned int p0[] = {163,7,6,3,0}; + unsigned int p1[] = {193,15,0}; + + a=BN_new(); + b[0]=BN_new(); + b[1]=BN_new(); + c=BN_new(); + d=BN_new(); + e=BN_new(); + + BN_GF2m_arr2poly(p0, b[0]); + BN_GF2m_arr2poly(p1, b[1]); + + for (i=0; i<num0; i++) + { + BN_bntest_rand(a, 512, 0, 0); + for (j=0; j < 2; j++) + { + t = BN_GF2m_mod_solve_quad(c, a, b[j], ctx); + if (t) + { + s++; + BN_GF2m_mod_sqr(d, c, b[j], ctx); + BN_GF2m_add(d, c, d); + BN_GF2m_mod(e, a, b[j]); +#if 0 /* make test uses ouput in bc but bc can't handle GF(2^m) arithmetic */ + if (bp != NULL) + { + if (!results) + { + BN_print(bp,c); + BIO_puts(bp, " is root of z^2 + z = "); + BN_print(bp,a); + BIO_puts(bp, " % "); + BN_print(bp,b[j]); + BIO_puts(bp, "\n"); + } + } +#endif + BN_GF2m_add(e, e, d); + /* Test that solution of quadratic c satisfies c^2 + c = a. */ + if(!BN_is_zero(e)) + { + fprintf(stderr,"GF(2^m) modular solve quadratic test failed!\n"); + goto err; + } + + } + else + { +#if 0 /* make test uses ouput in bc but bc can't handle GF(2^m) arithmetic */ + if (bp != NULL) + { + if (!results) + { + BIO_puts(bp, "There are no roots of z^2 + z = "); + BN_print(bp,a); + BIO_puts(bp, " % "); + BN_print(bp,b[j]); + BIO_puts(bp, "\n"); + } + } +#endif + } + } + } + if (s == 0) + { + fprintf(stderr,"All %i tests of GF(2^m) modular solve quadratic resulted in no roots;\n", num0); + fprintf(stderr,"this is very unlikely and probably indicates an error.\n"); + goto err; + } + ret = 1; + err: + BN_free(a); + BN_free(b[0]); + BN_free(b[1]); + BN_free(c); + BN_free(d); + BN_free(e); + return ret; + } + static void genprime_cb(int p, int n, void *arg) { char c='*'; diff --git a/crypto/conf/Makefile.ssl b/crypto/conf/Makefile.ssl index c57c4edb51..f1c02fd04b 100644 --- a/crypto/conf/Makefile.ssl +++ b/crypto/conf/Makefile.ssl @@ -89,14 +89,14 @@ conf_api.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h conf_api.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h conf_api.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h conf_api.o: conf_api.c -conf_def.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h -conf_def.o: ../../include/openssl/conf.h ../../include/openssl/conf_api.h -conf_def.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h -conf_def.o: ../../include/openssl/err.h ../../include/openssl/lhash.h -conf_def.o: ../../include/openssl/opensslconf.h +conf_def.o: ../../e_os.h ../../include/openssl/bio.h +conf_def.o: ../../include/openssl/buffer.h ../../include/openssl/conf.h +conf_def.o: ../../include/openssl/conf_api.h ../../include/openssl/crypto.h +conf_def.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h +conf_def.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h conf_def.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h conf_def.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h -conf_def.o: conf_def.c conf_def.h +conf_def.o: ../cryptlib.h conf_def.c conf_def.h conf_err.o: ../../include/openssl/bio.h ../../include/openssl/conf.h conf_err.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h conf_err.o: ../../include/openssl/err.h ../../include/openssl/lhash.h @@ -112,14 +112,14 @@ conf_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h conf_lib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h conf_lib.o: conf_lib.c conf_mall.o: ../../e_os.h ../../include/openssl/aes.h -conf_mall.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -conf_mall.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -conf_mall.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -conf_mall.o: ../../include/openssl/cast.h ../../include/openssl/conf.h -conf_mall.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -conf_mall.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -conf_mall.o: ../../include/openssl/dsa.h ../../include/openssl/dso.h -conf_mall.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +conf_mall.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +conf_mall.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +conf_mall.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +conf_mall.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +conf_mall.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +conf_mall.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +conf_mall.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h +conf_mall.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h conf_mall.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h conf_mall.o: ../../include/openssl/err.h ../../include/openssl/evp.h conf_mall.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h @@ -137,14 +137,14 @@ conf_mall.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h conf_mall.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h conf_mall.o: ../../include/openssl/x509_vfy.h ../cryptlib.h conf_mall.c conf_mod.o: ../../e_os.h ../../include/openssl/aes.h -conf_mod.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -conf_mod.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -conf_mod.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -conf_mod.o: ../../include/openssl/cast.h ../../include/openssl/conf.h -conf_mod.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -conf_mod.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -conf_mod.o: ../../include/openssl/dsa.h ../../include/openssl/dso.h -conf_mod.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +conf_mod.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +conf_mod.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +conf_mod.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +conf_mod.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +conf_mod.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +conf_mod.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +conf_mod.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h +conf_mod.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h conf_mod.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h conf_mod.o: ../../include/openssl/evp.h ../../include/openssl/idea.h conf_mod.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -161,14 +161,14 @@ conf_mod.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h conf_mod.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h conf_mod.o: ../cryptlib.h conf_mod.c conf_sap.o: ../../e_os.h ../../include/openssl/aes.h -conf_sap.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -conf_sap.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -conf_sap.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -conf_sap.o: ../../include/openssl/cast.h ../../include/openssl/conf.h -conf_sap.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -conf_sap.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -conf_sap.o: ../../include/openssl/dsa.h ../../include/openssl/dso.h -conf_sap.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +conf_sap.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +conf_sap.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +conf_sap.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +conf_sap.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +conf_sap.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +conf_sap.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +conf_sap.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h +conf_sap.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h conf_sap.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h conf_sap.o: ../../include/openssl/err.h ../../include/openssl/evp.h conf_sap.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h diff --git a/crypto/conf/conf_def.c b/crypto/conf/conf_def.c index e1e6bf6ede..d718eed20a 100644 --- a/crypto/conf/conf_def.c +++ b/crypto/conf/conf_def.c @@ -67,6 +67,7 @@ #include "conf_def.h" #include <openssl/buffer.h> #include <openssl/err.h> +#include "cryptlib.h" static char *eat_ws(CONF *conf, char *p); static char *eat_alpha_numeric(CONF *conf, char *p); @@ -208,12 +209,12 @@ static int def_load(CONF *conf, const char *name, long *line) static int def_load_bio(CONF *conf, BIO *in, long *line) { #define BUFSIZE 512 - char btmp[16]; int bufnum=0,i,ii; BUF_MEM *buff=NULL; char *s,*p,*end; int again,n; long eline=0; + char btmp[DECIMAL_SIZE(eline)+1]; CONF_VALUE *v=NULL,*tv; CONF_VALUE *sv=NULL; char *section=NULL,*buf; diff --git a/crypto/conf/conf_mod.c b/crypto/conf/conf_mod.c index f92babc2e2..edcc08921c 100644 --- a/crypto/conf/conf_mod.c +++ b/crypto/conf/conf_mod.c @@ -230,7 +230,7 @@ static int module_run(const CONF *cnf, char *name, char *value, { if (!(flags & CONF_MFLAGS_SILENT)) { - char rcode[10]; + char rcode[DECIMAL_SIZE(ret)+1]; CONFerr(CONF_F_CONF_MODULES_LOAD, CONF_R_MODULE_INITIALIZATION_ERROR); sprintf(rcode, "%-8d", ret); ERR_add_error_data(6, "module=", name, ", value=", value, ", retcode=", rcode); diff --git a/crypto/cryptlib.c b/crypto/cryptlib.c index 9a7ed2cf75..b72f7fb015 100644 --- a/crypto/cryptlib.c +++ b/crypto/cryptlib.c @@ -55,6 +55,11 @@ * copied and put under another distribution licence * [including the GNU Public Licence.] */ +/* ==================================================================== + * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. + * ECDH support in OpenSSL originally developed by + * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project. + */ #include <stdio.h> #include <string.h> @@ -105,7 +110,8 @@ static const char* lock_names[CRYPTO_NUM_LOCKS] = "ui", "ecdsa", "ec", -#if CRYPTO_NUM_LOCKS != 33 + "ecdh", +#if CRYPTO_NUM_LOCKS != 34 # error "Inconsistency between crypto.h and cryptlib.c" #endif }; diff --git a/crypto/cryptlib.h b/crypto/cryptlib.h index a0489e57fc..88e4ae509f 100644 --- a/crypto/cryptlib.h +++ b/crypto/cryptlib.h @@ -89,6 +89,10 @@ extern "C" { #define X509_CERT_DIR_EVP "SSL_CERT_DIR" #define X509_CERT_FILE_EVP "SSL_CERT_FILE" +/* size of string represenations */ +#define DECIMAL_SIZE(type) ((sizeof(type)*8+2)/3+1) +#define HEX_SIZE(type) ((sizeof(type)*2) + #ifdef __cplusplus } #endif diff --git a/crypto/crypto-lib.com b/crypto/crypto-lib.com index 556495c96f..e57234eb5d 100644 --- a/crypto/crypto-lib.com +++ b/crypto/crypto-lib.com @@ -92,7 +92,7 @@ $! Define The Different Encryption Types. $! $ ENCRYPT_TYPES = "Basic,MD2,MD4,MD5,SHA,MDC2,HMAC,RIPEMD,"+ - "DES,RC2,RC4,RC5,IDEA,BF,CAST,"+ - - "BN,EC,RSA,DSA,DH,DSO,ENGINE,AES,"+ - + "BN,EC,RSA,DSA,ECDSA,DH,ECDH,DSO,ENGINE,AES,"+ - "BUFFER,BIO,STACK,LHASH,RAND,ERR,OBJECTS,"+ - "EVP,EVP_2,ASN1,ASN1_2,PEM,X509,X509V3,"+ - "CONF,TXT_DB,PKCS7,PKCS12,COMP,OCSP,UI,KRB5" @@ -221,21 +221,22 @@ $ IF F$TRNLNM("OPENSSL_NO_ASM").OR.ARCH.EQS."AXP" THEN LIB_BN_ASM = "bn_asm" $ LIB_BN = "bn_add,bn_div,bn_exp,bn_lib,bn_ctx,bn_mul,bn_mod,"+ - "bn_print,bn_rand,bn_shift,bn_word,bn_blind,"+ - "bn_kron,bn_sqrt,bn_gcd,bn_prime,bn_err,bn_sqr,"+LIB_BN_ASM+","+ - - "bn_recp,bn_mont,bn_mpi,bn_exp2" + "bn_recp,bn_mont,bn_mpi,bn_exp2,bn_gf2m" $ LIB_EC = "ec_lib,ecp_smpl,ecp_mont,ecp_recp,ecp_nist,ec_cvt,ec_mult,"+ - - "ec_err" + "ec_err,ec_curve,ec_check,ec_print,ec_asn1,ec_key,"+ - + "ec2_smpl,ec2_smpt,ec2_mult" $ LIB_RSA = "rsa_eay,rsa_gen,rsa_lib,rsa_sign,rsa_saos,rsa_err,"+ - "rsa_pk1,rsa_ssl,rsa_none,rsa_oaep,rsa_chk,rsa_null,"+ - "rsa_asn1" $ LIB_DSA = "dsa_gen,dsa_key,dsa_lib,dsa_asn1,dsa_vrf,dsa_sign,dsa_err,dsa_ossl" -$ LIB_ECDSA = "ecs_lib,ecs_gen,ecs_asn1,ecs_ossl,ecs_sign,ecs_vrf,"+ - - "ecs_key,ecs_err" +$ LIB_ECDSA = "ecs_lib,ecs_asn1,ecs_ossl,ecs_sign,ecs_vrf,ecs_err" $ LIB_DH = "dh_asn1,dh_gen,dh_key,dh_lib,dh_check,dh_err" +$ LIB_ECDH = "ech_lib,ech_ossl,ech_key,ech_err" $ LIB_DSO = "dso_dl,dso_dlfcn,dso_err,dso_lib,dso_null,"+ - "dso_openssl,dso_win32,dso_vms" $ LIB_ENGINE = "eng_err,eng_lib,eng_list,eng_init,eng_ctrl,"+ - "eng_table,eng_pkey,eng_fat,eng_all,"+ - - "tb_rsa,tb_dsa,tb_dh,tb_rand,tb_cipher,tb_digest,"+ - + "tb_rsa,tb_dsa,tb_ecdsa,tb_dh,tb_rand,tb_cipher,tb_digest,tb_ecdh"+ - "eng_openssl,eng_dyn,eng_cnf,"+ - "hw_atalla,hw_cswift,hw_ncipher,hw_nuron,hw_ubsec,"+ - "hw_openbsd_dev_crypto,hw_aep,hw_sureware,hw_4758_cca" @@ -253,12 +254,12 @@ $ LIB_RAND = "md_rand,randfile,rand_lib,rand_err,rand_egd,"+ - "rand_vms" $ LIB_ERR = "err,err_all,err_prn" $ LIB_OBJECTS = "o_names,obj_dat,obj_lib,obj_err" -$ LIB_EVP = "encode,digest,evp_enc,evp_key,"+ - +$ LIB_EVP = "encode,digest,evp_enc,evp_key,evp_acnf,"+ - "e_des,e_bf,e_idea,e_des3,"+ - "e_rc4,e_aes,names,"+ - "e_xcbc_d,e_rc2,e_cast,e_rc5" $ LIB_EVP_2 = "m_null,m_md2,m_md4,m_md5,m_sha,m_sha1," + - - "m_dss,m_dss1,m_mdc2,m_ripemd,"+ - + "m_dss,m_dss1,m_mdc2,m_ripemd,m_ecdsa,"+ - "p_open,p_seal,p_sign,p_verify,p_lib,p_enc,p_dec,"+ - "bio_md,bio_b64,bio_enc,evp_err,e_null,"+ - "c_all,c_allc,c_alld,evp_lib,bio_ok,"+- diff --git a/crypto/crypto.h b/crypto/crypto.h index 0991cf294c..e4d1526e0e 100644 --- a/crypto/crypto.h +++ b/crypto/crypto.h @@ -55,6 +55,11 @@ * copied and put under another distribution licence * [including the GNU Public Licence.] */ +/* ==================================================================== + * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. + * ECDH support in OpenSSL originally developed by + * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project. + */ #ifndef HEADER_CRYPTO_H #define HEADER_CRYPTO_H @@ -128,7 +133,8 @@ extern "C" { #define CRYPTO_LOCK_UI 30 #define CRYPTO_LOCK_ECDSA 31 #define CRYPTO_LOCK_EC 32 -#define CRYPTO_NUM_LOCKS 33 +#define CRYPTO_LOCK_ECDH 33 +#define CRYPTO_NUM_LOCKS 34 #define CRYPTO_LOCK 1 #define CRYPTO_UNLOCK 2 @@ -236,6 +242,7 @@ DECLARE_STACK_OF(CRYPTO_EX_DATA_FUNCS) #define CRYPTO_EX_INDEX_X509 10 #define CRYPTO_EX_INDEX_UI 11 #define CRYPTO_EX_INDEX_ECDSA 12 +#define CRYPTO_EX_INDEX_ECDH 13 /* Dynamically assigned indexes start from this value (don't use directly, use * via CRYPTO_ex_data_new_class). */ diff --git a/crypto/des/Makefile.ssl b/crypto/des/Makefile.ssl index 00e479dbd1..14baf7d0cc 100644 --- a/crypto/des/Makefile.ssl +++ b/crypto/des/Makefile.ssl @@ -207,7 +207,8 @@ ecb_enc.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h ecb_enc.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h ecb_enc.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h ecb_enc.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h -ecb_enc.o: ../../include/openssl/ui_compat.h des_locl.h ecb_enc.c spr.h +ecb_enc.o: ../../include/openssl/ui_compat.h des_locl.h des_ver.h ecb_enc.c +ecb_enc.o: spr.h ede_cbcm_enc.o: ../../include/openssl/crypto.h ../../include/openssl/des.h ede_cbcm_enc.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h ede_cbcm_enc.o: ../../include/openssl/opensslconf.h diff --git a/crypto/des/des_ver.h b/crypto/des/des_ver.h index 0fa94d5368..379bbadda2 100644 --- a/crypto/des/des_ver.h +++ b/crypto/des/des_ver.h @@ -63,5 +63,9 @@ # define OPENSSL_EXTERN OPENSSL_EXPORT #endif -OPENSSL_EXTERN char *DES_version; /* SSLeay version string */ -OPENSSL_EXTERN char *libdes_version; /* old libdes version string */ +/* The following macros make sure the names are different from libdes names */ +#define DES_version OSSL_DES_version +#define libdes_version OSSL_libdes_version + +OPENSSL_EXTERN const char *OSSL_DES_version; /* SSLeay version string */ +OPENSSL_EXTERN const char *OSSL_libdes_version; /* old libdes version string */ diff --git a/crypto/des/ecb_enc.c b/crypto/des/ecb_enc.c index 4650f2fa0f..1b70f68806 100644 --- a/crypto/des/ecb_enc.c +++ b/crypto/des/ecb_enc.c @@ -57,6 +57,7 @@ */ #include "des_locl.h" +#include "des_ver.h" #include "spr.h" #include <openssl/opensslv.h> diff --git a/crypto/des/set_key.c b/crypto/des/set_key.c index 683916e71b..143008ed9c 100644 --- a/crypto/des/set_key.c +++ b/crypto/des/set_key.c @@ -342,7 +342,7 @@ void DES_set_key_unchecked(const_DES_cblock *key, DES_key_schedule *schedule) register DES_LONG *k; register int i; -#if OPENBSD_DEV_CRYPTO +#ifdef OPENBSD_DEV_CRYPTO memcpy(schedule->key,key,sizeof schedule->key); schedule->session=NULL; #endif diff --git a/crypto/dh/Makefile.ssl b/crypto/dh/Makefile.ssl index c183bb48a2..c6e7ab63a8 100644 --- a/crypto/dh/Makefile.ssl +++ b/crypto/dh/Makefile.ssl @@ -112,29 +112,27 @@ dh_gen.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h dh_gen.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h dh_gen.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h dh_gen.o: ../cryptlib.h dh_gen.c -dh_key.o: ../../e_os.h ../../include/openssl/asn1.h -dh_key.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h +dh_key.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h dh_key.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h dh_key.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h dh_key.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -dh_key.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h -dh_key.o: ../../include/openssl/engine.h ../../include/openssl/err.h -dh_key.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h -dh_key.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h -dh_key.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h -dh_key.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h -dh_key.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h -dh_key.o: ../cryptlib.h dh_key.c -dh_lib.o: ../../e_os.h ../../include/openssl/asn1.h -dh_lib.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h +dh_key.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h +dh_key.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h +dh_key.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +dh_key.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +dh_key.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h +dh_key.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +dh_key.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +dh_key.o: ../../include/openssl/ui.h ../cryptlib.h dh_key.c +dh_lib.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h dh_lib.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h dh_lib.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h dh_lib.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -dh_lib.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h -dh_lib.o: ../../include/openssl/engine.h ../../include/openssl/err.h -dh_lib.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h -dh_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h -dh_lib.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h -dh_lib.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h -dh_lib.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h -dh_lib.o: ../cryptlib.h dh_lib.c +dh_lib.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h +dh_lib.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h +dh_lib.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +dh_lib.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +dh_lib.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h +dh_lib.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +dh_lib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +dh_lib.o: ../../include/openssl/ui.h ../cryptlib.h dh_lib.c diff --git a/crypto/dsa/Makefile.ssl b/crypto/dsa/Makefile.ssl index 52140ed15a..74fd754742 100644 --- a/crypto/dsa/Makefile.ssl +++ b/crypto/dsa/Makefile.ssl @@ -129,11 +129,11 @@ dsa_key.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h dsa_key.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h dsa_key.o: ../cryptlib.h dsa_key.c dsa_lib.o: ../../e_os.h ../../include/openssl/asn1.h -dsa_lib.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -dsa_lib.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -dsa_lib.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h -dsa_lib.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -dsa_lib.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +dsa_lib.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +dsa_lib.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +dsa_lib.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +dsa_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +dsa_lib.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h dsa_lib.o: ../../include/openssl/engine.h ../../include/openssl/err.h dsa_lib.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h dsa_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h @@ -142,11 +142,11 @@ dsa_lib.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h dsa_lib.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h dsa_lib.o: ../cryptlib.h dsa_lib.c dsa_ossl.o: ../../e_os.h ../../include/openssl/asn1.h -dsa_ossl.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -dsa_ossl.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -dsa_ossl.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h -dsa_ossl.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -dsa_ossl.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +dsa_ossl.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +dsa_ossl.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +dsa_ossl.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +dsa_ossl.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +dsa_ossl.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h dsa_ossl.o: ../../include/openssl/engine.h ../../include/openssl/err.h dsa_ossl.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h dsa_ossl.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h @@ -155,11 +155,11 @@ dsa_ossl.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h dsa_ossl.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h dsa_ossl.o: ../cryptlib.h dsa_ossl.c dsa_sign.o: ../../e_os.h ../../include/openssl/asn1.h -dsa_sign.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -dsa_sign.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -dsa_sign.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h -dsa_sign.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -dsa_sign.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +dsa_sign.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +dsa_sign.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +dsa_sign.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +dsa_sign.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +dsa_sign.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h dsa_sign.o: ../../include/openssl/engine.h ../../include/openssl/err.h dsa_sign.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h dsa_sign.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h @@ -168,11 +168,11 @@ dsa_sign.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h dsa_sign.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h dsa_sign.o: ../cryptlib.h dsa_sign.c dsa_vrf.o: ../../e_os.h ../../include/openssl/asn1.h -dsa_vrf.o: ../../include/openssl/asn1_mac.h ../../include/openssl/asn1t.h -dsa_vrf.o: ../../include/openssl/bio.h ../../include/openssl/bn.h -dsa_vrf.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h -dsa_vrf.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -dsa_vrf.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +dsa_vrf.o: ../../include/openssl/asn1_mac.h ../../include/openssl/bio.h +dsa_vrf.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +dsa_vrf.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h +dsa_vrf.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +dsa_vrf.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h dsa_vrf.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h dsa_vrf.o: ../../include/openssl/err.h ../../include/openssl/lhash.h dsa_vrf.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h diff --git a/crypto/ec/Makefile.ssl b/crypto/ec/Makefile.ssl index adf9426cf8..d183f679c4 100644 --- a/crypto/ec/Makefile.ssl +++ b/crypto/ec/Makefile.ssl @@ -23,11 +23,13 @@ TEST=ectest.c APPS= LIB=$(TOP)/libcrypto.a -LIBSRC= ec_lib.c ecp_smpl.c ecp_mont.c ecp_recp.c ecp_nist.c ec_cvt.c ec_mult.c \ - ec_err.c ec_curve.c ec_check.c ec_print.c ec_asn1.c +LIBSRC= ec_lib.c ecp_smpl.c ecp_mont.c ecp_recp.c ecp_nist.c ec_cvt.c ec_mult.c\ + ec_err.c ec_curve.c ec_check.c ec_print.c ec_asn1.c ec_key.c\ + ec2_smpl.c ec2_smpt.c ec2_mult.c -LIBOBJ= ec_lib.o ecp_smpl.o ecp_mont.o ecp_recp.o ecp_nist.o ec_cvt.o ec_mult.o \ - ec_err.o ec_curve.o ec_check.o ec_print.o ec_asn1.o +LIBOBJ= ec_lib.o ecp_smpl.o ecp_mont.o ecp_recp.o ecp_nist.o ec_cvt.o ec_mult.o\ + ec_err.o ec_curve.o ec_check.o ec_print.o ec_asn1.o ec_key.o\ + ec2_smpl.o ec2_mult.o SRC= $(LIBSRC) @@ -82,16 +84,32 @@ clean: # DO NOT DELETE THIS LINE -- make depend depends on it. -ec_asn1.o: ../../e_os.h ../../include/openssl/asn1.h -ec_asn1.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -ec_asn1.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +ec2_mult.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +ec2_mult.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h +ec2_mult.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +ec2_mult.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +ec2_mult.o: ../../include/openssl/obj_mac.h ../../include/openssl/opensslconf.h +ec2_mult.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +ec2_mult.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +ec2_mult.o: ../../include/openssl/symhacks.h ec2_mult.c ec_lcl.h +ec2_smpl.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +ec2_smpl.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h +ec2_smpl.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +ec2_smpl.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +ec2_smpl.o: ../../include/openssl/obj_mac.h ../../include/openssl/opensslconf.h +ec2_smpl.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +ec2_smpl.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +ec2_smpl.o: ../../include/openssl/symhacks.h ec2_smpl.c ec2_smpt.c ec_lcl.h +ec2_smpt.o: ec2_smpt.c +ec_asn1.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h +ec_asn1.o: ../../include/openssl/bio.h ../../include/openssl/bn.h ec_asn1.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h ec_asn1.o: ../../include/openssl/ec.h ../../include/openssl/err.h ec_asn1.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h ec_asn1.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h ec_asn1.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h ec_asn1.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h -ec_asn1.o: ../../include/openssl/symhacks.h ../cryptlib.h ec_asn1.c ec_lcl.h +ec_asn1.o: ../../include/openssl/symhacks.h ec_asn1.c ec_lcl.h ec_check.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h ec_check.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h ec_check.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h @@ -124,6 +142,14 @@ ec_err.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h ec_err.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h ec_err.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h ec_err.o: ec_err.c +ec_key.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +ec_key.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h +ec_key.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +ec_key.o: ../../include/openssl/err.h ../../include/openssl/lhash.h +ec_key.o: ../../include/openssl/obj_mac.h ../../include/openssl/opensslconf.h +ec_key.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +ec_key.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +ec_key.o: ../../include/openssl/symhacks.h ec_key.c ec_lcl.h ec_lib.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h ec_lib.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h ec_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h diff --git a/crypto/ec/ec.h b/crypto/ec/ec.h index e17fc20dd4..17083f23a2 100644 --- a/crypto/ec/ec.h +++ b/crypto/ec/ec.h @@ -1,4 +1,7 @@ /* crypto/ec/ec.h */ +/* + * Originally written by Bodo Moeller for the OpenSSL project. + */ /* ==================================================================== * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved. * @@ -52,6 +55,32 @@ * Hudson (tjh@cryptsoft.com). * */ +/* ==================================================================== + * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. + * + * Portions of the attached software ("Contribution") are developed by + * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project. + * + * The Contribution is licensed pursuant to the OpenSSL open source + * license provided above. + * + * In addition, Sun covenants to all licensees who provide a reciprocal + * covenant with respect to their own patents if any, not to sue under + * current and future patent claims necessarily infringed by the making, + * using, practicing, selling, offering for sale and/or otherwise + * disposing of the Contribution as delivered hereunder + * (or portions thereof), provided that such covenant shall not apply: + * 1) for code that a licensee deletes from the Contribution; + * 2) separates from the Contribution; or + * 3) for infringements caused by: + * i) the modification of the Contribution or + * ii) the combination of the Contribution with other software or + * devices where such combination causes the infringement. + * + * The elliptic curve binary polynomial software is originally written by + * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories. + * + */ #ifndef HEADER_EC_H #define HEADER_EC_H @@ -103,11 +132,16 @@ const EC_METHOD *EC_GFp_recp_method(void); /* TODO */ const EC_METHOD *EC_GFp_nist_method(void); /* TODO */ #endif +/* EC_METHOD for curves over GF(2^m). + */ +const EC_METHOD *EC_GF2m_simple_method(void); + EC_GROUP *EC_GROUP_new(const EC_METHOD *); void EC_GROUP_free(EC_GROUP *); void EC_GROUP_clear_free(EC_GROUP *); int EC_GROUP_copy(EC_GROUP *, const EC_GROUP *); +EC_GROUP *EC_GROUP_dup(const EC_GROUP *); const EC_METHOD *EC_GROUP_method_of(const EC_GROUP *); int EC_METHOD_get_field_type(const EC_METHOD *); @@ -130,12 +164,12 @@ unsigned char *EC_GROUP_get0_seed(const EC_GROUP *); size_t EC_GROUP_get_seed_len(const EC_GROUP *); size_t EC_GROUP_set_seed(EC_GROUP *, const unsigned char *, size_t len); -/* We don't have types for field specifications and field elements in general. - * Otherwise we could declare - * int EC_GROUP_set_curve(EC_GROUP *, .....); - */ int EC_GROUP_set_curve_GFp(EC_GROUP *, const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *); int EC_GROUP_get_curve_GFp(const EC_GROUP *, BIGNUM *p, BIGNUM *a, BIGNUM *b, BN_CTX *); +int EC_GROUP_set_curve_GF2m(EC_GROUP *, const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *); +int EC_GROUP_get_curve_GF2m(const EC_GROUP *, BIGNUM *p, BIGNUM *a, BIGNUM *b, BN_CTX *); + +int EC_GROUP_get_degree(const EC_GROUP *); /* EC_GROUP_check() returns 1 if 'group' defines a valid group, 0 otherwise */ int EC_GROUP_check(const EC_GROUP *group, BN_CTX *ctx); @@ -143,9 +177,10 @@ int EC_GROUP_check(const EC_GROUP *group, BN_CTX *ctx); * elliptic curve is not zero, 0 otherwise */ int EC_GROUP_check_discriminant(const EC_GROUP *, BN_CTX *); -/* EC_GROUP_new_GFp() calls EC_GROUP_new() and EC_GROUP_set_GFp() +/* EC_GROUP_new_GF*() calls EC_GROUP_new() and EC_GROUP_set_GF*() * after choosing an appropriate EC_METHOD */ EC_GROUP *EC_GROUP_new_curve_GFp(const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *); +EC_GROUP *EC_GROUP_new_curve_GF2m(const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *); /* EC_GROUP_new_by_nid() and EC_GROUP_new_by_name() also set * generator and order */ @@ -181,15 +216,66 @@ EC_GROUP *EC_GROUP_new_by_name(int name); #define EC_GROUP_SECG_PRIME_384R1 NID_secp384r1 #define EC_GROUP_SECG_PRIME_521R1 NID_secp521r1 #define EC_GROUP_WTLS_6 NID_wap_wsg_idm_ecid_wtls6 -#define EC_GROUP_WTLS_7 NID_secp160r1 +#define EC_GROUP_WTLS_7 NID_wap_wsg_idm_ecid_wtls7 #define EC_GROUP_WTLS_8 NID_wap_wsg_idm_ecid_wtls8 #define EC_GROUP_WTLS_9 NID_wap_wsg_idm_ecid_wtls9 -#define EC_GROUP_WTLS_12 NID_secp224r1 +#define EC_GROUP_WTLS_12 NID_wap_wsg_idm_ecid_wtls12 +#define EC_GROUP_NIST_CHAR2_K163 NID_sect163k1 +#define EC_GROUP_NIST_CHAR2_B163 NID_sect163r2 +#define EC_GROUP_NIST_CHAR2_K233 NID_sect233k1 +#define EC_GROUP_NIST_CHAR2_B233 NID_sect233r1 +#define EC_GROUP_NIST_CHAR2_K283 NID_sect283k1 +#define EC_GROUP_NIST_CHAR2_B283 NID_sect283r1 +#define EC_GROUP_NIST_CHAR2_K409 NID_sect409k1 +#define EC_GROUP_NIST_CHAR2_B409 NID_sect409r1 +#define EC_GROUP_NIST_CHAR2_K571 NID_sect571k1 +#define EC_GROUP_NIST_CHAR2_B571 NID_sect571r1 +#define EC_GROUP_X9_62_CHAR2_163V1 NID_X9_62_c2pnb163v1 +#define EC_GROUP_X9_62_CHAR2_163V2 NID_X9_62_c2pnb163v2 +#define EC_GROUP_X9_62_CHAR2_163V3 NID_X9_62_c2pnb163v3 +#define EC_GROUP_X9_62_CHAR2_176V1 NID_X9_62_c2pnb176v1 +#define EC_GROUP_X9_62_CHAR2_191V1 NID_X9_62_c2tnb191v1 +#define EC_GROUP_X9_62_CHAR2_191V2 NID_X9_62_c2tnb191v2 +#define EC_GROUP_X9_62_CHAR2_191V3 NID_X9_62_c2tnb191v3 +#define EC_GROUP_X9_62_CHAR2_208W1 NID_X9_62_c2pnb208w1 +#define EC_GROUP_X9_62_CHAR2_239V1 NID_X9_62_c2tnb239v1 +#define EC_GROUP_X9_62_CHAR2_239V2 NID_X9_62_c2tnb239v2 +#define EC_GROUP_X9_62_CHAR2_239V3 NID_X9_62_c2tnb239v3 +#define EC_GROUP_X9_62_CHAR2_272W1 NID_X9_62_c2pnb272w1 +#define EC_GROUP_X9_62_CHAR2_304W1 NID_X9_62_c2pnb304w1 +#define EC_GROUP_X9_62_CHAR2_359V1 NID_X9_62_c2tnb359v1 +#define EC_GROUP_X9_62_CHAR2_368W1 NID_X9_62_c2pnb368w1 +#define EC_GROUP_X9_62_CHAR2_431R1 NID_X9_62_c2tnb431r1 +#define EC_GROUP_SECG_CHAR2_113R1 NID_sect113r1 +#define EC_GROUP_SECG_CHAR2_113R2 NID_sect113r2 +#define EC_GROUP_SECG_CHAR2_131R1 NID_sect131r1 +#define EC_GROUP_SECG_CHAR2_131R2 NID_sect131r2 +#define EC_GROUP_SECG_CHAR2_163K1 NID_sect163k1 +#define EC_GROUP_SECG_CHAR2_163R1 NID_sect163r1 +#define EC_GROUP_SECG_CHAR2_163R2 NID_sect163r2 +#define EC_GROUP_SECG_CHAR2_193R1 NID_sect193r1 +#define EC_GROUP_SECG_CHAR2_193R2 NID_sect193r2 +#define EC_GROUP_SECG_CHAR2_233K1 NID_sect233k1 +#define EC_GROUP_SECG_CHAR2_233R1 NID_sect233r1 +#define EC_GROUP_SECG_CHAR2_239K1 NID_sect239k1 +#define EC_GROUP_SECG_CHAR2_283K1 NID_sect283k1 +#define EC_GROUP_SECG_CHAR2_283R1 NID_sect283r1 +#define EC_GROUP_SECG_CHAR2_409K1 NID_sect409k1 +#define EC_GROUP_SECG_CHAR2_409R1 NID_sect409r1 +#define EC_GROUP_SECG_CHAR2_571K1 NID_sect571k1 +#define EC_GROUP_SECG_CHAR2_571R1 NID_sect571r1 +#define EC_GROUP_WTLS_1 NID_wap_wsg_idm_ecid_wtls1 +#define EC_GROUP_WTLS_3 NID_wap_wsg_idm_ecid_wtls3 +#define EC_GROUP_WTLS_4 NID_wap_wsg_idm_ecid_wtls4 +#define EC_GROUP_WTLS_5 NID_wap_wsg_idm_ecid_wtls5 +#define EC_GROUP_WTLS_10 NID_wap_wsg_idm_ecid_wtls10 +#define EC_GROUP_WTLS_11 NID_wap_wsg_idm_ecid_wtls11 EC_POINT *EC_POINT_new(const EC_GROUP *); void EC_POINT_free(EC_POINT *); void EC_POINT_clear_free(EC_POINT *); int EC_POINT_copy(EC_POINT *, const EC_POINT *); +EC_POINT *EC_POINT_dup(const EC_POINT *, const EC_GROUP *); const EC_METHOD *EC_POINT_method_of(const EC_POINT *); @@ -205,6 +291,13 @@ int EC_POINT_get_affine_coordinates_GFp(const EC_GROUP *, const EC_POINT *, int EC_POINT_set_compressed_coordinates_GFp(const EC_GROUP *, EC_POINT *, const BIGNUM *x, int y_bit, BN_CTX *); +int EC_POINT_set_affine_coordinates_GF2m(const EC_GROUP *, EC_POINT *, + const BIGNUM *x, const BIGNUM *y, BN_CTX *); +int EC_POINT_get_affine_coordinates_GF2m(const EC_GROUP *, const EC_POINT *, + BIGNUM *x, BIGNUM *y, BN_CTX *); +int EC_POINT_set_compressed_coordinates_GF2m(const EC_GROUP *, EC_POINT *, + const BIGNUM *x, int y_bit, BN_CTX *); + size_t EC_POINT_point2oct(const EC_GROUP *, const EC_POINT *, point_conversion_form_t form, unsigned char *buf, size_t len, BN_CTX *); int EC_POINT_oct2point(const EC_GROUP *, EC_POINT *, @@ -241,21 +334,8 @@ int EC_GROUP_precompute_mult(EC_GROUP *, BN_CTX *); /* ASN1 stuff */ #define OPENSSL_EC_NAMED_CURVE 0x001 -typedef struct ec_parameters_st ECPARAMETERS; typedef struct ecpk_parameters_st ECPKPARAMETERS; -DECLARE_ASN1_ITEM(ECPARAMETERS) -DECLARE_ASN1_ITEM(ECPKPARAMETERS) -DECLARE_ASN1_ENCODE_FUNCTIONS_const(ECPARAMETERS, ECPARAMETERS) -DECLARE_ASN1_ENCODE_FUNCTIONS_const(ECPKPARAMETERS, ECPKPARAMETERS) - -EC_GROUP *EC_ASN1_pkparameters2group(const ECPKPARAMETERS *); -ECPKPARAMETERS *EC_ASN1_group2pkparameters(const EC_GROUP *, ECPKPARAMETERS *); - - -EC_GROUP *d2i_ECParameters(EC_GROUP **, const unsigned char **in, long len); -int i2d_ECParameters(const EC_GROUP *, unsigned char **out); - EC_GROUP *d2i_ECPKParameters(EC_GROUP **, const unsigned char **in, long len); int i2d_ECPKParameters(const EC_GROUP *, unsigned char **out); @@ -275,6 +355,66 @@ int ECPKParameters_print(BIO *bp, const EC_GROUP *x, int off); int ECPKParameters_print_fp(FILE *fp, const EC_GROUP *x, int off); #endif +/* the EC_KEY stuff */ +typedef struct ec_key_st EC_KEY; + +typedef struct ec_key_meth_data_st { + int (*init)(EC_KEY *); + void (*finish)(EC_KEY *); + } EC_KEY_METH_DATA; + +struct ec_key_st { + int version; + + EC_GROUP *group; + + EC_POINT *pub_key; + BIGNUM *priv_key; + + unsigned int enc_flag; + point_conversion_form_t conv_form; + + int references; + + EC_KEY_METH_DATA *meth_data; + }/* EC_KEY */; +/* some values for the encoding_flag */ +#define EC_PKEY_NO_PARAMETERS 0x001 +#define EC_PKEY_NO_PUBKEY 0x002 + +EC_KEY *EC_KEY_new(void); +void EC_KEY_free(EC_KEY *); +EC_KEY *EC_KEY_copy(EC_KEY *, const EC_KEY *); +EC_KEY *EC_KEY_dup(const EC_KEY *); +int EC_KEY_up_ref(EC_KEY *); + +/* EC_KEY_generate_key() creates a ec private (public) key */ +int EC_KEY_generate_key(EC_KEY *); +/* EC_KEY_check_key() */ +int EC_KEY_check_key(const EC_KEY *); + +/* de- and encode functions for the SEC1 ECPrivateKey */ +EC_KEY *d2i_ECPrivateKey(EC_KEY **a, const unsigned char **in, long len); +int i2d_ECPrivateKey(EC_KEY *a, unsigned char **out); +/* de- and encode functions for the elliptic curve parameters */ +EC_KEY *d2i_ECParameters(EC_KEY **a, const unsigned char **in, long len); +int i2d_ECParameters(EC_KEY *a, unsigned char **out); + +EC_KEY *ECPublicKey_set_octet_string(EC_KEY **a, const unsigned char **in, + long len); +int ECPublicKey_get_octet_string(EC_KEY *a, unsigned char **out); + +#ifndef OPENSSL_NO_BIO +int ECParameters_print(BIO *bp, const EC_KEY *x); +int EC_KEY_print(BIO *bp, const EC_KEY *x, int off); +#endif +#ifndef OPENSSL_NO_FP_API +int ECParameters_print_fp(FILE *fp, const EC_KEY *x); +int EC_KEY_print_fp(FILE *fp, const EC_KEY *x, int off); +#endif + +#define ECParameters_dup(x) (EC_KEY *)ASN1_dup((int (*)())i2d_ECParameters,\ + (char *(*)())d2i_ECParameters,(char *)(x)) /* BEGIN ERROR CODES */ /* The following lines are auto generated by the script mkerr.pl. Any changes @@ -286,70 +426,97 @@ void ERR_load_EC_strings(void); /* Function codes. */ #define EC_F_COMPUTE_WNAF 143 -#define EC_F_D2I_ECDSAPARAMETERS 154 #define EC_F_D2I_ECPARAMETERS 155 #define EC_F_D2I_ECPKPARAMETERS 161 +#define EC_F_D2I_ECPRIVATEKEY 168 +#define EC_F_ECPARAMETERS_PRINT 173 +#define EC_F_ECPARAMETERS_PRINT_FP 174 #define EC_F_ECPKPARAMETERS_PRINT 166 #define EC_F_ECPKPARAMETERS_PRINT_FP 167 +#define EC_F_ECPUBLICKEY_GET_OCTET 170 +#define EC_F_ECPUBLICKEY_SET_OCTET 171 #define EC_F_EC_ASN1_GROUP2CURVE 159 #define EC_F_EC_ASN1_GROUP2FIELDID 156 #define EC_F_EC_ASN1_GROUP2PARAMETERS 160 #define EC_F_EC_ASN1_GROUP2PKPARAMETERS 162 #define EC_F_EC_ASN1_PARAMETERS2GROUP 157 #define EC_F_EC_ASN1_PKPARAMETERS2GROUP 163 +#define EC_F_EC_GF2M_SIMPLE_GROUP_CHECK_DISCRIMINANT 168 +#define EC_F_EC_GF2M_SIMPLE_OCT2POINT 169 +#define EC_F_EC_GF2M_SIMPLE_POINT2OCT 170 +#define EC_F_EC_GF2M_SIMPLE_POINT_GET_AFFINE_COORDINATES 171 +#define EC_F_EC_GF2M_SIMPLE_POINT_SET_AFFINE_COORDINATES 172 +#define EC_F_EC_GF2M_SIMPLE_SET_COMPRESSED_COORDINATES 182 #define EC_F_EC_GFP_MONT_FIELD_DECODE 133 #define EC_F_EC_GFP_MONT_FIELD_ENCODE 134 #define EC_F_EC_GFP_MONT_FIELD_MUL 131 #define EC_F_EC_GFP_MONT_FIELD_SQR 132 #define EC_F_EC_GFP_SIMPLE_GROUP_CHECK_DISCRIMINANT 152 -#define EC_F_EC_GFP_SIMPLE_GROUP_SET_CURVE_GFP 100 +#define EC_F_EC_GFP_SIMPLE_GROUP_SET_CURVE 100 #define EC_F_EC_GFP_SIMPLE_GROUP_SET_GENERATOR 101 #define EC_F_EC_GFP_SIMPLE_MAKE_AFFINE 102 #define EC_F_EC_GFP_SIMPLE_OCT2POINT 103 #define EC_F_EC_GFP_SIMPLE_POINT2OCT 104 #define EC_F_EC_GFP_SIMPLE_POINTS_MAKE_AFFINE 137 -#define EC_F_EC_GFP_SIMPLE_POINT_GET_AFFINE_COORDINATES_GFP 105 -#define EC_F_EC_GFP_SIMPLE_POINT_SET_AFFINE_COORDINATES_GFP 128 -#define EC_F_EC_GFP_SIMPLE_SET_COMPRESSED_COORDINATES_GFP 129 +#define EC_F_EC_GFP_SIMPLE_POINT_GET_AFFINE_COORDINATES 105 +#define EC_F_EC_GFP_SIMPLE_POINT_SET_AFFINE_COORDINATES 128 +#define EC_F_EC_GFP_SIMPLE_SET_COMPRESSED_COORDINATES 129 #define EC_F_EC_GROUP_CHECK 150 #define EC_F_EC_GROUP_CHECK_DISCRIMINANT 153 #define EC_F_EC_GROUP_COPY 106 #define EC_F_EC_GROUP_GET0_GENERATOR 139 #define EC_F_EC_GROUP_GET_COFACTOR 140 +#define EC_F_EC_GROUP_GET_CURVE_GF2M 173 #define EC_F_EC_GROUP_GET_CURVE_GFP 130 +#define EC_F_EC_GROUP_GET_DEGREE 174 #define EC_F_EC_GROUP_GET_EXTRA_DATA 107 #define EC_F_EC_GROUP_GET_ORDER 141 #define EC_F_EC_GROUP_GROUP2NID 147 #define EC_F_EC_GROUP_NEW 108 #define EC_F_EC_GROUP_NEW_BY_NAME 144 #define EC_F_EC_GROUP_NEW_BY_NID 146 +#define EC_F_EC_GROUP_NEW_GF2M_FROM_HEX 175 #define EC_F_EC_GROUP_NEW_GFP_FROM_HEX 148 #define EC_F_EC_GROUP_PRECOMPUTE_MULT 142 +#define EC_F_EC_GROUP_SET_CURVE_GF2M 176 #define EC_F_EC_GROUP_SET_CURVE_GFP 109 #define EC_F_EC_GROUP_SET_EXTRA_DATA 110 #define EC_F_EC_GROUP_SET_GENERATOR 111 +#define EC_F_EC_KEY_CHECK_KEY 184 +#define EC_F_EC_KEY_COPY 186 +#define EC_F_EC_KEY_GENERATE_KEY 185 +#define EC_F_EC_KEY_PRINT 175 +#define EC_F_EC_KEY_PRINT_FP 176 +#define EC_F_EC_NEW 172 #define EC_F_EC_POINTS_MAKE_AFFINE 136 #define EC_F_EC_POINTS_MUL 138 #define EC_F_EC_POINT_ADD 112 #define EC_F_EC_POINT_CMP 113 #define EC_F_EC_POINT_COPY 114 #define EC_F_EC_POINT_DBL 115 +#define EC_F_EC_POINT_GET_AFFINE_COORDINATES_GF2M 177 #define EC_F_EC_POINT_GET_AFFINE_COORDINATES_GFP 116 #define EC_F_EC_POINT_GET_JPROJECTIVE_COORDINATES_GFP 117 #define EC_F_EC_POINT_IS_AT_INFINITY 118 #define EC_F_EC_POINT_IS_ON_CURVE 119 #define EC_F_EC_POINT_MAKE_AFFINE 120 +#define EC_F_EC_POINT_MUL 179 #define EC_F_EC_POINT_NEW 121 #define EC_F_EC_POINT_OCT2POINT 122 #define EC_F_EC_POINT_POINT2OCT 123 +#define EC_F_EC_POINT_SET_AFFINE_COORDINATES_GF2M 180 #define EC_F_EC_POINT_SET_AFFINE_COORDINATES_GFP 124 +#define EC_F_EC_POINT_SET_COMPRESSED_COORDINATES_GF2M 181 #define EC_F_EC_POINT_SET_COMPRESSED_COORDINATES_GFP 125 #define EC_F_EC_POINT_SET_JPROJECTIVE_COORDINATES_GFP 126 #define EC_F_EC_POINT_SET_TO_INFINITY 127 -#define EC_F_GFP_MONT_GROUP_SET_CURVE_GFP 135 +#define EC_F_EC_WNAF_MUL 183 +#define EC_F_EC_WNAF_PRECOMPUTE_MULT 178 +#define EC_F_GFP_MONT_GROUP_SET_CURVE 135 #define EC_F_I2D_ECDSAPARAMETERS 158 #define EC_F_I2D_ECPARAMETERS 164 #define EC_F_I2D_ECPKPARAMETERS 165 +#define EC_F_I2D_ECPRIVATEKEY 169 /* Reason codes. */ #define EC_R_ASN1_ERROR 130 @@ -372,7 +539,9 @@ void ERR_load_EC_strings(void); #define EC_R_INVALID_FIELD 103 #define EC_R_INVALID_FORM 104 #define EC_R_INVALID_GROUP_ORDER 119 +#define EC_R_INVALID_PRIVATE_KEY 139 #define EC_R_MISSING_PARAMETERS 127 +#define EC_R_MISSING_PRIVATE_KEY 138 #define EC_R_NOT_IMPLEMENTED 136 #define EC_R_NOT_INITIALIZED 111 #define EC_R_NO_SUCH_EXTRA_DATA 105 @@ -387,6 +556,7 @@ void ERR_load_EC_strings(void); #define EC_R_UNKNOWN_NID 117 #define EC_R_UNKNOWN_ORDER 114 #define EC_R_UNKNOWN_PARAMETERS_TYPE 129 +#define EC_R_WRONG_ORDER 140 #ifdef __cplusplus } diff --git a/crypto/ec/ec_asn1.c b/crypto/ec/ec_asn1.c index 009896b558..c1879dc510 100644 --- a/crypto/ec/ec_asn1.c +++ b/crypto/ec/ec_asn1.c @@ -53,11 +53,12 @@ * */ -#include "cryptlib.h" +#include <string.h> #include "ec_lcl.h" -#include <openssl/asn1.h> +#include <openssl/err.h> #include <openssl/asn1t.h> #include <openssl/objects.h> +#include <string.h> /* some structures needed for the asn1 encoding */ typedef struct x9_62_fieldid_st { @@ -83,14 +84,14 @@ typedef struct x9_62_curve_st { ASN1_BIT_STRING *seed; } X9_62_CURVE; -struct ec_parameters_st { +typedef struct ec_parameters_st { ASN1_INTEGER *version; X9_62_FIELDID *fieldID; X9_62_CURVE *curve; ASN1_OCTET_STRING *base; ASN1_INTEGER *order; ASN1_INTEGER *cofactor; - }/* ECPARAMETERS */; + } ECPARAMETERS; struct ecpk_parameters_st { int type; @@ -101,6 +102,14 @@ struct ecpk_parameters_st { } value; }/* ECPKPARAMETERS */; +/* SEC1 ECPrivateKey */ +typedef struct ec_privatekey_st { + int version; + ASN1_OCTET_STRING *privateKey; + ECPKPARAMETERS *parameters; + ASN1_BIT_STRING *publicKey; + } EC_PRIVATEKEY; + /* the OpenSSL asn1 definitions */ ASN1_SEQUENCE(X9_62_FIELDID) = { @@ -152,6 +161,7 @@ ASN1_SEQUENCE(ECPARAMETERS) = { } ASN1_SEQUENCE_END(ECPARAMETERS) DECLARE_ASN1_FUNCTIONS_const(ECPARAMETERS) +DECLARE_ASN1_ENCODE_FUNCTIONS_const(ECPARAMETERS, ECPARAMETERS) IMPLEMENT_ASN1_FUNCTIONS_const(ECPARAMETERS) ASN1_CHOICE(ECPKPARAMETERS) = { @@ -161,8 +171,20 @@ ASN1_CHOICE(ECPKPARAMETERS) = { } ASN1_CHOICE_END(ECPKPARAMETERS) DECLARE_ASN1_FUNCTIONS_const(ECPKPARAMETERS) +DECLARE_ASN1_ENCODE_FUNCTIONS_const(ECPKPARAMETERS, ECPKPARAMETERS) IMPLEMENT_ASN1_FUNCTIONS_const(ECPKPARAMETERS) +ASN1_SEQUENCE(EC_PRIVATEKEY) = { + ASN1_SIMPLE(EC_PRIVATEKEY, version, LONG), + ASN1_SIMPLE(EC_PRIVATEKEY, privateKey, ASN1_OCTET_STRING), + ASN1_EXP_OPT(EC_PRIVATEKEY, parameters, ECPKPARAMETERS, 0), + ASN1_EXP_OPT(EC_PRIVATEKEY, publicKey, ASN1_BIT_STRING, 1) +} ASN1_SEQUENCE_END(EC_PRIVATEKEY) + +DECLARE_ASN1_FUNCTIONS_const(EC_PRIVATEKEY) +DECLARE_ASN1_ENCODE_FUNCTIONS_const(EC_PRIVATEKEY, EC_PRIVATEKEY) +IMPLEMENT_ASN1_FUNCTIONS_const(EC_PRIVATEKEY) + /* some internal functions */ static X9_62_FIELDID *ec_asn1_group2field(const EC_GROUP *, X9_62_FIELDID *); @@ -170,6 +192,8 @@ static X9_62_CURVE *ec_asn1_group2curve(const EC_GROUP *, X9_62_CURVE *); static EC_GROUP *ec_asn1_parameters2group(const ECPARAMETERS *); static ECPARAMETERS *ec_asn1_group2parameters(const EC_GROUP *, ECPARAMETERS *); +EC_GROUP *EC_ASN1_pkparameters2group(const ECPKPARAMETERS *); +ECPKPARAMETERS *EC_ASN1_group2pkparameters(const EC_GROUP *, ECPKPARAMETERS *); static X9_62_FIELDID *ec_asn1_group2field(const EC_GROUP *group, X9_62_FIELDID *field) @@ -778,34 +802,7 @@ EC_GROUP *EC_ASN1_pkparameters2group(const ECPKPARAMETERS *params) return ret; } -/* EC_GROUP <-> DER encoding of EC[PK]PARAMETERS */ - -EC_GROUP *d2i_ECParameters(EC_GROUP **a, const unsigned char **in, long len) - { - EC_GROUP *group = NULL; - ECPARAMETERS *params = NULL; - - if ((params = d2i_ECPARAMETERS(NULL, in, len)) == NULL) - { - ECerr(EC_F_D2I_ECPARAMETERS, EC_R_D2I_ECPARAMETERS_FAILURE); - ECPARAMETERS_free(params); - return NULL; - } - - if ((group = ec_asn1_parameters2group(params)) == NULL) - { - ECerr(EC_F_D2I_ECPARAMETERS, EC_R_PARAMETERS2GROUP_FAILURE); - return NULL; - } - - if (a && *a) - EC_GROUP_clear_free(*a); - if (a) - *a = group; - - ECPARAMETERS_free(params); - return(group); - } +/* EC_GROUP <-> DER encoding of ECPKPARAMETERS */ EC_GROUP *d2i_ECPKParameters(EC_GROUP **a, const unsigned char **in, long len) { @@ -835,40 +832,346 @@ EC_GROUP *d2i_ECPKParameters(EC_GROUP **a, const unsigned char **in, long len) return(group); } -int i2d_ECParameters(const EC_GROUP *a, unsigned char **out) +int i2d_ECPKParameters(const EC_GROUP *a, unsigned char **out) { int ret=0; - ECPARAMETERS *tmp = ec_asn1_group2parameters(a, NULL); + ECPKPARAMETERS *tmp = EC_ASN1_group2pkparameters(a, NULL); if (tmp == NULL) { - ECerr(EC_F_I2D_ECPARAMETERS, EC_R_GROUP2PARAMETERS_FAILURE); + ECerr(EC_F_I2D_ECPKPARAMETERS, EC_R_GROUP2PKPARAMETERS_FAILURE); return 0; } - if ((ret = i2d_ECPARAMETERS(tmp, out)) == 0) + if ((ret = i2d_ECPKPARAMETERS(tmp, out)) == 0) { - ECerr(EC_F_I2D_ECPARAMETERS, EC_R_I2D_EC_PARAMETERS_FAILURE); - ECPARAMETERS_free(tmp); + ECerr(EC_F_I2D_ECPKPARAMETERS, EC_R_I2D_ECPKPARAMETERS_FAILURE); + ECPKPARAMETERS_free(tmp); return 0; } - ECPARAMETERS_free(tmp); + ECPKPARAMETERS_free(tmp); return(ret); } -int i2d_ECPKParameters(const EC_GROUP *a, unsigned char **out) +/* some EC_KEY functions */ + +EC_KEY *d2i_ECPrivateKey(EC_KEY **a, const unsigned char **in, long len) { - int ret=0; - ECPKPARAMETERS *tmp = EC_ASN1_group2pkparameters(a, NULL); - if (tmp == NULL) + int ok=0; + EC_KEY *ret=NULL; + EC_PRIVATEKEY *priv_key=NULL; + + if ((priv_key = EC_PRIVATEKEY_new()) == NULL) { - ECerr(EC_F_I2D_ECPKPARAMETERS, EC_R_GROUP2PKPARAMETERS_FAILURE); + ECerr(EC_F_D2I_ECPRIVATEKEY, ERR_R_MALLOC_FAILURE); + return NULL; + } + + if ((priv_key = d2i_EC_PRIVATEKEY(&priv_key, in, len)) == NULL) + { + ECerr(EC_F_D2I_ECPRIVATEKEY, ERR_R_EC_LIB); + EC_PRIVATEKEY_free(priv_key); + return NULL; + } + + if (a == NULL || *a == NULL) + { + if ((ret = EC_KEY_new()) == NULL) + { + ECerr(EC_F_D2I_ECPRIVATEKEY, + ERR_R_MALLOC_FAILURE); + goto err; + } + if (a) + *a = ret; + } + else + ret = *a; + + if (priv_key->parameters) + { + if (ret->group) + EC_GROUP_clear_free(ret->group); + ret->group = EC_ASN1_pkparameters2group(priv_key->parameters); + } + + if (ret->group == NULL) + { + ECerr(EC_F_D2I_ECPRIVATEKEY, ERR_R_EC_LIB); + goto err; + } + + ret->version = priv_key->version; + + if (priv_key->privateKey) + { + ret->priv_key = BN_bin2bn( + M_ASN1_STRING_data(priv_key->privateKey), + M_ASN1_STRING_length(priv_key->privateKey), + ret->priv_key); + if (ret->priv_key == NULL) + { + ECerr(EC_F_D2I_ECPRIVATEKEY, + ERR_R_BN_LIB); + goto err; + } + } + else + { + ECerr(EC_F_D2I_ECPRIVATEKEY, + EC_R_MISSING_PRIVATE_KEY); + goto err; + } + + if (priv_key->publicKey) + { + if (ret->pub_key) + EC_POINT_clear_free(ret->pub_key); + ret->pub_key = EC_POINT_new(ret->group); + if (ret->pub_key == NULL) + { + ECerr(EC_F_D2I_ECPRIVATEKEY, ERR_R_EC_LIB); + goto err; + } + if (!EC_POINT_oct2point(ret->group, ret->pub_key, + M_ASN1_STRING_data(priv_key->publicKey), + M_ASN1_STRING_length(priv_key->publicKey), NULL)) + { + ECerr(EC_F_D2I_ECPRIVATEKEY, ERR_R_EC_LIB); + goto err; + } + } + + ok = 1; +err: + if (!ok) + { + if (ret) + EC_KEY_free(ret); + ret = NULL; + } + + if (priv_key) + EC_PRIVATEKEY_free(priv_key); + + return(ret); + } + +int i2d_ECPrivateKey(EC_KEY *a, unsigned char **out) + { + int ret=0, ok=0; + unsigned char *buffer=NULL; + size_t buf_len=0, tmp_len; + EC_PRIVATEKEY *priv_key=NULL; + + if (a == NULL || a->group == NULL || a->priv_key == NULL) + { + ECerr(EC_F_I2D_ECPRIVATEKEY, + ERR_R_PASSED_NULL_PARAMETER); + goto err; + } + + if ((priv_key = EC_PRIVATEKEY_new()) == NULL) + { + ECerr(EC_F_I2D_ECPRIVATEKEY, + ERR_R_MALLOC_FAILURE); + goto err; + } + + priv_key->version = a->version; + + buf_len = (size_t)BN_num_bytes(a->priv_key); + buffer = OPENSSL_malloc(buf_len); + if (buffer == NULL) + { + ECerr(EC_F_I2D_ECPRIVATEKEY, + ERR_R_MALLOC_FAILURE); + goto err; + } + + if (!BN_bn2bin(a->priv_key, buffer)) + { + ECerr(EC_F_I2D_ECPRIVATEKEY, ERR_R_BN_LIB); + goto err; + } + + if (!M_ASN1_OCTET_STRING_set(priv_key->privateKey, buffer, buf_len)) + { + ECerr(EC_F_I2D_ECPRIVATEKEY, ERR_R_ASN1_LIB); + goto err; + } + + if (!(a->enc_flag & EC_PKEY_NO_PARAMETERS)) + { + if ((priv_key->parameters = EC_ASN1_group2pkparameters( + a->group, priv_key->parameters)) == NULL) + { + ECerr(EC_F_I2D_ECPRIVATEKEY, ERR_R_EC_LIB); + goto err; + } + } + + if (!(a->enc_flag & EC_PKEY_NO_PUBKEY)) + { + priv_key->publicKey = M_ASN1_BIT_STRING_new(); + if (priv_key->publicKey == NULL) + { + ECerr(EC_F_I2D_ECPRIVATEKEY, + ERR_R_MALLOC_FAILURE); + goto err; + } + + tmp_len = EC_POINT_point2oct(a->group, a->pub_key, + a->conv_form, NULL, 0, NULL); + + if (tmp_len > buf_len) + buffer = OPENSSL_realloc(buffer, tmp_len); + if (buffer == NULL) + { + ECerr(EC_F_I2D_ECPRIVATEKEY, + ERR_R_MALLOC_FAILURE); + goto err; + } + + buf_len = tmp_len; + + if (!EC_POINT_point2oct(a->group, a->pub_key, + a->conv_form, buffer, buf_len, NULL)) + { + ECerr(EC_F_I2D_ECPRIVATEKEY, ERR_R_EC_LIB); + goto err; + } + + if (!M_ASN1_BIT_STRING_set(priv_key->publicKey, buffer, + buf_len)) + { + ECerr(EC_F_I2D_ECPRIVATEKEY, ERR_R_ASN1_LIB); + goto err; + } + } + + if ((ret = i2d_EC_PRIVATEKEY(priv_key, out)) == 0) + { + ECerr(EC_F_I2D_ECPRIVATEKEY, ERR_R_EC_LIB); + goto err; + } + ok=1; +err: + if (buffer) + OPENSSL_free(buffer); + if (priv_key) + EC_PRIVATEKEY_free(priv_key); + return(ok?ret:0); + } + +int i2d_ECParameters(EC_KEY *a, unsigned char **out) + { + if (a == NULL) + { + ECerr(EC_F_I2D_ECPARAMETERS, ERR_R_PASSED_NULL_PARAMETER); return 0; } - if ((ret = i2d_ECPKPARAMETERS(tmp, out)) == 0) + return i2d_ECPKParameters(a->group, out); + } + +EC_KEY *d2i_ECParameters(EC_KEY **a, const unsigned char **in, long len) + { + EC_GROUP *group; + EC_KEY *ret; + + if (in == NULL || *in == NULL) { - ECerr(EC_F_I2D_ECPKPARAMETERS, EC_R_I2D_ECPKPARAMETERS_FAILURE); - ECPKPARAMETERS_free(tmp); + ECerr(EC_F_D2I_ECPARAMETERS, ERR_R_PASSED_NULL_PARAMETER); + return NULL; + } + + group = d2i_ECPKParameters(NULL, in, len); + + if (group == NULL) + { + ECerr(EC_F_D2I_ECPARAMETERS, ERR_R_EC_LIB); + return NULL; + } + + if (a == NULL || *a == NULL) + { + if ((ret = EC_KEY_new()) == NULL) + { + ECerr(EC_F_D2I_ECPARAMETERS, ERR_R_MALLOC_FAILURE); + return NULL; + } + if (a) + *a = ret; + } + else + ret = *a; + + if (ret->group) + EC_GROUP_clear_free(ret->group); + + ret->group = group; + + return ret; + } + +EC_KEY *ECPublicKey_set_octet_string(EC_KEY **a, const unsigned char **in, + long len) + { + EC_KEY *ret=NULL; + + if (a == NULL || (*a) == NULL || (*a)->group == NULL) + { + /* sorry, but a EC_GROUP-structur is necessary + * to set the public key */ + ECerr(EC_F_ECPUBLICKEY_SET_OCTET, ERR_R_PASSED_NULL_PARAMETER); return 0; - } - ECPKPARAMETERS_free(tmp); - return(ret); + } + ret = *a; + if (ret->pub_key == NULL && + (ret->pub_key = EC_POINT_new(ret->group)) == NULL) + { + ECerr(EC_F_ECPUBLICKEY_SET_OCTET, ERR_R_MALLOC_FAILURE); + return 0; + } + if (!EC_POINT_oct2point(ret->group, ret->pub_key, *in, len, NULL)) + { + ECerr(EC_F_ECPUBLICKEY_SET_OCTET, ERR_R_EC_LIB); + return 0; + } + /* save the point conversion form */ + ret->conv_form = (point_conversion_form_t)(*in[0] & ~0x01); + return ret; + } + +int ECPublicKey_get_octet_string(EC_KEY *a, unsigned char **out) + { + size_t buf_len=0; + + if (a == NULL) + { + ECerr(EC_F_ECPUBLICKEY_GET_OCTET, ERR_R_PASSED_NULL_PARAMETER); + return 0; + } + + buf_len = EC_POINT_point2oct(a->group, a->pub_key, + a->conv_form, NULL, 0, NULL); + + if (out == NULL || buf_len == 0) + /* out == NULL => just return the length of the octet string */ + return buf_len; + + if (*out == NULL) + if ((*out = OPENSSL_malloc(buf_len)) == NULL) + { + ECerr(EC_F_ECPUBLICKEY_GET_OCTET, + ERR_R_MALLOC_FAILURE); + return 0; + } + if (!EC_POINT_point2oct(a->group, a->pub_key, a->conv_form, + *out, buf_len, NULL)) + { + ECerr(EC_F_ECPUBLICKEY_GET_OCTET, ERR_R_EC_LIB); + OPENSSL_free(*out); + *out = NULL; + return 0; + } + return buf_len; } diff --git a/crypto/ec/ec_curve.c b/crypto/ec/ec_curve.c index a2fed3d603..55ce45d8cf 100644 --- a/crypto/ec/ec_curve.c +++ b/crypto/ec/ec_curve.c @@ -52,6 +52,32 @@ * Hudson (tjh@cryptsoft.com). * */ +/* ==================================================================== + * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. + * + * Portions of the attached software ("Contribution") are developed by + * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project. + * + * The Contribution is licensed pursuant to the OpenSSL open source + * license provided above. + * + * In addition, Sun covenants to all licensees who provide a reciprocal + * covenant with respect to their own patents if any, not to sue under + * current and future patent claims necessarily infringed by the making, + * using, practicing, selling, offering for sale and/or otherwise + * disposing of the Contribution as delivered hereunder + * (or portions thereof), provided that such covenant shall not apply: + * 1) for code that a licensee deletes from the Contribution; + * 2) separates from the Contribution; or + * 3) for infringements caused by: + * i) the modification of the Contribution or + * ii) the combination of the Contribution with other software or + * devices where such combination causes the infringement. + * + * The elliptic curve binary polynomial software is originally written by + * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories. + * + */ #include "ec_lcl.h" #include <openssl/err.h> @@ -191,12 +217,6 @@ "79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798",0,\ "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141",1 /* some wap/wtls curves */ -#define _EC_GROUP_WTLS_6 \ - "DB7C2ABF62E35E668076BEAD208B",\ - "DB7C2ABF62E35E668076BEAD2088",\ - "659EF8BA043916EEDE8911702B22",\ - "09487239995A5EE76B55F9C2F098",0,\ - "DB7C2ABF62E35E7628DFAC6561C5",1 #define _EC_GROUP_WTLS_8 \ "FFFFFFFFFFFFFFFFFFFFFFFFFDE7",\ "0",\ @@ -209,6 +229,264 @@ "3",\ "1",0,\ "0100000000000000000001CDC98AE0E2DE574ABF33",1 +#define _EC_GROUP_WTLS_12 \ + "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000001", \ + "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFE", \ + "B4050A850C04B3ABF54132565044B0B7D7BFD8BA270B39432355FFB4", \ + "B70E0CBD6BB4BF7F321390B94A03C1D356C21122343280D6115C1D21", 0, \ + "FFFFFFFFFFFFFFFFFFFFFFFFFFFF16A2E0B8F03E13DD29455C5C2A3D", 1 + +/* #define _EC_GROUP_EXAMPLE_CHAR2_CURVE \ + * "prime polynomial", "a", "b", "base point x-coord", "base point y-coord", "order", "cofactor" + */ +#define _EC_GROUP_SECG_CHAR2_113R1 \ + "020000000000000000000000000201", \ + "003088250CA6E7C7FE649CE85820F7", \ + "00E8BEE4D3E2260744188BE0E9C723", \ + "009D73616F35F4AB1407D73562C10F", \ + "00A52830277958EE84D1315ED31886", \ + "0100000000000000D9CCEC8A39E56F", 2 +#define _EC_GROUP_SECG_CHAR2_113R2 \ + "020000000000000000000000000201", \ + "00689918DBEC7E5A0DD6DFC0AA55C7", \ + "0095E9A9EC9B297BD4BF36E059184F", \ + "01A57A6A7B26CA5EF52FCDB8164797", \ + "00B3ADC94ED1FE674C06E695BABA1D", \ + "010000000000000108789B2496AF93", 2 +#define _EC_GROUP_SECG_CHAR2_131R1 \ + "080000000000000000000000000000010D", \ + "07A11B09A76B562144418FF3FF8C2570B8", \ + "0217C05610884B63B9C6C7291678F9D341", \ + "0081BAF91FDF9833C40F9C181343638399", \ + "078C6E7EA38C001F73C8134B1B4EF9E150", \ + "0400000000000000023123953A9464B54D", 2 +#define _EC_GROUP_SECG_CHAR2_131R2 \ + "080000000000000000000000000000010D", \ + "03E5A88919D7CAFCBF415F07C2176573B2", \ + "04B8266A46C55657AC734CE38F018F2192", \ + "0356DCD8F2F95031AD652D23951BB366A8", \ + "0648F06D867940A5366D9E265DE9EB240F", \ + "0400000000000000016954A233049BA98F", 2 +#define _EC_GROUP_SECG_CHAR2_163K1 \ + "0800000000000000000000000000000000000000C9", \ + "1", \ + "1", \ + "02FE13C0537BBC11ACAA07D793DE4E6D5E5C94EEE8", \ + "0289070FB05D38FF58321F2E800536D538CCDAA3D9", \ + "04000000000000000000020108A2E0CC0D99F8A5EF", 2 +#define _EC_GROUP_SECG_CHAR2_163R1 \ + "0800000000000000000000000000000000000000C9", \ + "07B6882CAAEFA84F9554FF8428BD88E246D2782AE2", \ + "0713612DCDDCB40AAB946BDA29CA91F73AF958AFD9", \ + "0369979697AB43897789566789567F787A7876A654", \ + "00435EDB42EFAFB2989D51FEFCE3C80988F41FF883", \ + "03FFFFFFFFFFFFFFFFFFFF48AAB689C29CA710279B", 2 +#define _EC_GROUP_SECG_CHAR2_163R2 \ + "0800000000000000000000000000000000000000C9", \ + "1", \ + "020A601907B8C953CA1481EB10512F78744A3205FD", \ + "03F0EBA16286A2D57EA0991168D4994637E8343E36", \ + "00D51FBC6C71A0094FA2CDD545B11C5C0C797324F1", \ + "040000000000000000000292FE77E70C12A4234C33", 2 +#define _EC_GROUP_SECG_CHAR2_193R1 \ + "02000000000000000000000000000000000000000000008001", \ + "0017858FEB7A98975169E171F77B4087DE098AC8A911DF7B01", \ + "00FDFB49BFE6C3A89FACADAA7A1E5BBC7CC1C2E5D831478814", \ + "01F481BC5F0FF84A74AD6CDF6FDEF4BF6179625372D8C0C5E1", \ + "0025E399F2903712CCF3EA9E3A1AD17FB0B3201B6AF7CE1B05", \ + "01000000000000000000000000C7F34A778F443ACC920EBA49", 2 +#define _EC_GROUP_SECG_CHAR2_193R2 \ + "02000000000000000000000000000000000000000000008001", \ + "0163F35A5137C2CE3EA6ED8667190B0BC43ECD69977702709B", \ + "00C9BB9E8927D4D64C377E2AB2856A5B16E3EFB7F61D4316AE", \ + "00D9B67D192E0367C803F39E1A7E82CA14A651350AAE617E8F", \ + "01CE94335607C304AC29E7DEFBD9CA01F596F927224CDECF6C", \ + "010000000000000000000000015AAB561B005413CCD4EE99D5", 2 +#define _EC_GROUP_SECG_CHAR2_233K1 \ + "020000000000000000000000000000000000000004000000000000000001", \ + "0", \ + "1", \ + "017232BA853A7E731AF129F22FF4149563A419C26BF50A4C9D6EEFAD6126", \ + "01DB537DECE819B7F70F555A67C427A8CD9BF18AEB9B56E0C11056FAE6A3", \ + "008000000000000000000000000000069D5BB915BCD46EFB1AD5F173ABDF", 4 +#define _EC_GROUP_SECG_CHAR2_233R1 \ + "020000000000000000000000000000000000000004000000000000000001", \ + "000000000000000000000000000000000000000000000000000000000001", \ + "0066647EDE6C332C7F8C0923BB58213B333B20E9CE4281FE115F7D8F90AD", \ + "00FAC9DFCBAC8313BB2139F1BB755FEF65BC391F8B36F8F8EB7371FD558B", \ + "01006A08A41903350678E58528BEBF8A0BEFF867A7CA36716F7E01F81052", \ + "01000000000000000000000000000013E974E72F8A6922031D2603CFE0D7", 2 +#define _EC_GROUP_SECG_CHAR2_239K1 \ + "800000000000000000004000000000000000000000000000000000000001", \ + "0", \ + "1", \ + "29A0B6A887A983E9730988A68727A8B2D126C44CC2CC7B2A6555193035DC", \ + "76310804F12E549BDB011C103089E73510ACB275FC312A5DC6B76553F0CA", \ + "2000000000000000000000000000005A79FEC67CB6E91F1C1DA800E478A5", 4 +#define _EC_GROUP_SECG_CHAR2_283K1 \ + "0800000000000000000000000000000000000000000000000000000000000000000010A1", \ + "0", \ + "1", \ + "0503213F78CA44883F1A3B8162F188E553CD265F23C1567A16876913B0C2AC2458492836", \ + "01CCDA380F1C9E318D90F95D07E5426FE87E45C0E8184698E45962364E34116177DD2259", \ + "01FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE9AE2ED07577265DFF7F94451E061E163C61", 4 +#define _EC_GROUP_SECG_CHAR2_283R1 \ + "0800000000000000000000000000000000000000000000000000000000000000000010A1", \ + "000000000000000000000000000000000000000000000000000000000000000000000001", \ + "027B680AC8B8596DA5A4AF8A19A0303FCA97FD7645309FA2A581485AF6263E313B79A2F5", \ + "05F939258DB7DD90E1934F8C70B0DFEC2EED25B8557EAC9C80E2E198F8CDBECD86B12053", \ + "03676854FE24141CB98FE6D4B20D02B4516FF702350EDDB0826779C813F0DF45BE8112F4", \ + "03FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEF90399660FC938A90165B042A7CEFADB307", 2 +#define _EC_GROUP_SECG_CHAR2_409K1 \ + "02000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000001", \ + "0", \ + "1", \ + "0060F05F658F49C1AD3AB1890F7184210EFD0987E307C84C27ACCFB8F9F67CC2C460189EB5AAAA62EE222EB1B35540CFE9023746", \ + "01E369050B7C4E42ACBA1DACBF04299C3460782F918EA427E6325165E9EA10E3DA5F6C42E9C55215AA9CA27A5863EC48D8E0286B", \ + "007FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE5F83B2D4EA20400EC4557D5ED3E3E7CA5B4B5C83B8E01E5FCF", 4 + +#define _EC_GROUP_SECG_CHAR2_409R1 \ + "02000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000001", \ + "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001", \ + "0021A5C2C8EE9FEB5C4B9A753B7B476B7FD6422EF1F3DD674761FA99D6AC27C8A9A197B272822F6CD57A55AA4F50AE317B13545F", \ + "015D4860D088DDB3496B0C6064756260441CDE4AF1771D4DB01FFE5B34E59703DC255A868A1180515603AEAB60794E54BB7996A7", \ + "0061B1CFAB6BE5F32BBFA78324ED106A7636B9C5A7BD198D0158AA4F5488D08F38514F1FDF4B4F40D2181B3681C364BA0273C706", \ + "010000000000000000000000000000000000000000000000000001E2AAD6A612F33307BE5FA47C3C9E052F838164CD37D9A21173", 2 +#define _EC_GROUP_SECG_CHAR2_571K1 \ + "80000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000425", \ + "0", \ + "1", \ + "026EB7A859923FBC82189631F8103FE4AC9CA2970012D5D46024804801841CA44370958493B205E647DA304DB4CEB08CBBD1BA39494776FB988B47174DCA88C7E2945283A01C8972", \ + "0349DC807F4FBF374F4AEADE3BCA95314DD58CEC9F307A54FFC61EFC006D8A2C9D4979C0AC44AEA74FBEBBB9F772AEDCB620B01A7BA7AF1B320430C8591984F601CD4C143EF1C7A3", \ + "020000000000000000000000000000000000000000000000000000000000000000000000131850E1F19A63E4B391A8DB917F4138B630D84BE5D639381E91DEB45CFE778F637C1001", 4 +#define _EC_GROUP_SECG_CHAR2_571R1 \ + "80000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000425", \ + "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001", \ + "02F40E7E2221F295DE297117B7F3D62F5C6A97FFCB8CEFF1CD6BA8CE4A9A18AD84FFABBD8EFA59332BE7AD6756A66E294AFD185A78FF12AA520E4DE739BACA0C7FFEFF7F2955727A", \ + "0303001D34B856296C16C0D40D3CD7750A93D1D2955FA80AA5F40FC8DB7B2ABDBDE53950F4C0D293CDD711A35B67FB1499AE60038614F1394ABFA3B4C850D927E1E7769C8EEC2D19", \ + "037BF27342DA639B6DCCFFFEB73D69D78C6C27A6009CBBCA1980F8533921E8A684423E43BAB08A576291AF8F461BB2A8B3531D2F0485C19B16E2F1516E23DD3C1A4827AF1B8AC15B", \ + "03FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE661CE18FF55987308059B186823851EC7DD9CA1161DE93D5174D66E8382E9BB2FE84E47", 2 + +#define _EC_GROUP_X9_62_CHAR2_163V1 \ + "0800000000000000000000000000000000000000C9", \ + "072546B5435234A422E0789675F432C89435DE5242", \ + "00C9517D06D5240D3CFF38C74B20B6CD4D6F9DD4D9", \ + "07AF69989546103D79329FCC3D74880F33BBE803CB", \ + "0190C402D65BCC2B845337BC52352774E879B94B0D", \ + "0400000000000000000001E60FC8821CC74DAEAFC1", 2 +#define _EC_GROUP_X9_62_CHAR2_163V2 \ + "0800000000000000000000000000000000000000C9", \ + "0108B39E77C4B108BED981ED0E890E117C511CF072", \ + "0667ACEB38AF4E488C407433FFAE4F1C811638DF20", \ + "0024266E4EB5106D0A964D92C4860E2671DB9B6CC5", \ + "01F64F1C0280E19A062003DBAECEAEDEC1CE141D41", \ + "03FFFFFFFFFFFFFFFFFFFDF64DE1151ADBB78F10A7", 2 +#define _EC_GROUP_X9_62_CHAR2_163V3 \ + "0800000000000000000000000000000000000000C9", \ + "07A526C63D3E25A256A007699F5447E32AE456B50E", \ + "03F7061798EB99E238FD6F1BF95B48FEEB4854252B", \ + "02F9F87B7C574D0BDECF8A22E6524775F98CDEBDCB", \ + "01D42417D750A363F61E455807D047059CA039ACFE", \ + "03FFFFFFFFFFFFFFFFFFFE1AEE140F110AFF961309", 2 +#define _EC_GROUP_X9_62_CHAR2_176V1 \ + "0100000000000000000000000000000000080000000007", \ + "E4E6DB2995065C407D9D39B8D0967B96704BA8E9C90B", \ + "5DDA470ABE6414DE8EC133AE28E9BBD7FCEC0AE0FFF2", \ + "8D16C2866798B600F9F08BB4A8E860F3298CE04A5798", \ + "6FA4539C2DADDDD6BAB5167D61B436E1D92BB16A562C", \ + "00010092537397ECA4F6145799D62B0A19CE06FE26AD", 0xFF6E +#define _EC_GROUP_X9_62_CHAR2_191V1 \ + "800000000000000000000000000000000000000000000201", \ + "2866537B676752636A68F56554E12640276B649EF7526267", \ + "2E45EF571F00786F67B0081B9495A3D95462F5DE0AA185EC", \ + "36B3DAF8A23206F9C4F299D7B21A9C369137F2C84AE1AA0D", \ + "765BE73433B3F95E332932E70EA245CA2418EA0EF98018FB", \ + "40000000000000000000000004A20E90C39067C893BBB9A5", 2 +#define _EC_GROUP_X9_62_CHAR2_191V2 \ + "800000000000000000000000000000000000000000000201", \ + "401028774D7777C7B7666D1366EA432071274F89FF01E718", \ + "0620048D28BCBD03B6249C99182B7C8CD19700C362C46A01", \ + "3809B2B7CC1B28CC5A87926AAD83FD28789E81E2C9E3BF10", \ + "17434386626D14F3DBF01760D9213A3E1CF37AEC437D668A", \ + "20000000000000000000000050508CB89F652824E06B8173", 4 +#define _EC_GROUP_X9_62_CHAR2_191V3 \ + "800000000000000000000000000000000000000000000201", \ + "6C01074756099122221056911C77D77E77A777E7E7E77FCB", \ + "71FE1AF926CF847989EFEF8DB459F66394D90F32AD3F15E8", \ + "375D4CE24FDE434489DE8746E71786015009E66E38A926DD", \ + "545A39176196575D985999366E6AD34CE0A77CD7127B06BE", \ + "155555555555555555555555610C0B196812BFB6288A3EA3", 6 +#define _EC_GROUP_X9_62_CHAR2_208W1 \ + "010000000000000000000000000000000800000000000000000007", \ + "0000000000000000000000000000000000000000000000000000", \ + "C8619ED45A62E6212E1160349E2BFA844439FAFC2A3FD1638F9E", \ + "89FDFBE4ABE193DF9559ECF07AC0CE78554E2784EB8C1ED1A57A", \ + "0F55B51A06E78E9AC38A035FF520D8B01781BEB1A6BB08617DE3", \ + "000101BAF95C9723C57B6C21DA2EFF2D5ED588BDD5717E212F9D", 0xFE48 +#define _EC_GROUP_X9_62_CHAR2_239V1 \ + "800000000000000000000000000000000000000000000000001000000001", \ + "32010857077C5431123A46B808906756F543423E8D27877578125778AC76", \ + "790408F2EEDAF392B012EDEFB3392F30F4327C0CA3F31FC383C422AA8C16", \ + "57927098FA932E7C0A96D3FD5B706EF7E5F5C156E16B7E7C86038552E91D", \ + "61D8EE5077C33FECF6F1A16B268DE469C3C7744EA9A971649FC7A9616305", \ + "2000000000000000000000000000000F4D42FFE1492A4993F1CAD666E447", 4 +#define _EC_GROUP_X9_62_CHAR2_239V2 \ + "800000000000000000000000000000000000000000000000001000000001", \ + "4230017757A767FAE42398569B746325D45313AF0766266479B75654E65F", \ + "5037EA654196CFF0CD82B2C14A2FCF2E3FF8775285B545722F03EACDB74B", \ + "28F9D04E900069C8DC47A08534FE76D2B900B7D7EF31F5709F200C4CA205", \ + "5667334C45AFF3B5A03BAD9DD75E2C71A99362567D5453F7FA6E227EC833", \ + "1555555555555555555555555555553C6F2885259C31E3FCDF154624522D", 6 +#define _EC_GROUP_X9_62_CHAR2_239V3 \ + "800000000000000000000000000000000000000000000000001000000001", \ + "01238774666A67766D6676F778E676B66999176666E687666D8766C66A9F", \ + "6A941977BA9F6A435199ACFC51067ED587F519C5ECB541B8E44111DE1D40", \ + "70F6E9D04D289C4E89913CE3530BFDE903977D42B146D539BF1BDE4E9C92", \ + "2E5A0EAF6E5E1305B9004DCE5C0ED7FE59A35608F33837C816D80B79F461", \ + "0CCCCCCCCCCCCCCCCCCCCCCCCCCCCCAC4912D2D9DF903EF9888B8A0E4CFF", 0xA +#define _EC_GROUP_X9_62_CHAR2_272W1 \ + "010000000000000000000000000000000000000000000000000000010000000000000B", \ + "91A091F03B5FBA4AB2CCF49C4EDD220FB028712D42BE752B2C40094DBACDB586FB20", \ + "7167EFC92BB2E3CE7C8AAAFF34E12A9C557003D7C73A6FAF003F99F6CC8482E540F7", \ + "6108BABB2CEEBCF787058A056CBE0CFE622D7723A289E08A07AE13EF0D10D171DD8D", \ + "10C7695716851EEF6BA7F6872E6142FBD241B830FF5EFCACECCAB05E02005DDE9D23", \ + "000100FAF51354E0E39E4892DF6E319C72C8161603FA45AA7B998A167B8F1E629521", 0xFF06 +#define _EC_GROUP_X9_62_CHAR2_304W1 \ + "010000000000000000000000000000000000000000000000000000000000000000000000000807", \ + "FD0D693149A118F651E6DCE6802085377E5F882D1B510B44160074C1288078365A0396C8E681", \ + "BDDB97E555A50A908E43B01C798EA5DAA6788F1EA2794EFCF57166B8C14039601E55827340BE", \ + "197B07845E9BE2D96ADB0F5F3C7F2CFFBD7A3EB8B6FEC35C7FD67F26DDF6285A644F740A2614", \ + "E19FBEB76E0DA171517ECF401B50289BF014103288527A9B416A105E80260B549FDC1B92C03B", \ + "000101D556572AABAC800101D556572AABAC8001022D5C91DD173F8FB561DA6899164443051D", 0xFE2E +#define _EC_GROUP_X9_62_CHAR2_359V1 \ + "800000000000000000000000000000000000000000000000000000000000000000000000100000000000000001", \ + "5667676A654B20754F356EA92017D946567C46675556F19556A04616B567D223A5E05656FB549016A96656A557", \ + "2472E2D0197C49363F1FE7F5B6DB075D52B6947D135D8CA445805D39BC345626089687742B6329E70680231988", \ + "3C258EF3047767E7EDE0F1FDAA79DAEE3841366A132E163ACED4ED2401DF9C6BDCDE98E8E707C07A2239B1B097", \ + "53D7E08529547048121E9C95F3791DD804963948F34FAE7BF44EA82365DC7868FE57E4AE2DE211305A407104BD", \ + "01AF286BCA1AF286BCA1AF286BCA1AF286BCA1AF286BC9FB8F6B85C556892C20A7EB964FE7719E74F490758D3B", 0x4C +#define _EC_GROUP_X9_62_CHAR2_368W1 \ + "0100000000000000000000000000000000000000000000000000000000000000000000002000000000000000000007", \ + "E0D2EE25095206F5E2A4F9ED229F1F256E79A0E2B455970D8D0D865BD94778C576D62F0AB7519CCD2A1A906AE30D", \ + "FC1217D4320A90452C760A58EDCD30C8DD069B3C34453837A34ED50CB54917E1C2112D84D164F444F8F74786046A", \ + "1085E2755381DCCCE3C1557AFA10C2F0C0C2825646C5B34A394CBCFA8BC16B22E7E789E927BE216F02E1FB136A5F", \ + "7B3EB1BDDCBA62D5D8B2059B525797FC73822C59059C623A45FF3843CEE8F87CD1855ADAA81E2A0750B80FDA2310", \ + "00010090512DA9AF72B08349D98A5DD4C7B0532ECA51CE03E2D10F3B7AC579BD87E909AE40A6F131E9CFCE5BD967", 0xFF70 +#define _EC_GROUP_X9_62_CHAR2_431R1 \ + "800000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000001", \ + "1A827EF00DD6FC0E234CAF046C6A5D8A85395B236CC4AD2CF32A0CADBDC9DDF620B0EB9906D0957F6C6FEACD615468DF104DE296CD8F", \ + "10D9B4A3D9047D8B154359ABFB1B7F5485B04CEB868237DDC9DEDA982A679A5A919B626D4E50A8DD731B107A9962381FB5D807BF2618", \ + "120FC05D3C67A99DE161D2F4092622FECA701BE4F50F4758714E8A87BBF2A658EF8C21E7C5EFE965361F6C2999C0C247B0DBD70CE6B7", \ + "20D0AF8903A96F8D5FA2C255745D3C451B302C9346D9B7E485E7BCE41F6B591F3E8F6ADDCBB0BC4C2F947A7DE1A89B625D6A598B3760", \ + "0340340340340340340340340340340340340340340340340340340323C313FAB50589703B5EC68D3587FEC60D161CC149C1AD4A91", 0x2760 + +#define _EC_GROUP_WTLS_1 \ + "020000000000000000000000000201", \ + "1", \ + "1", \ + "01667979A40BA497E5D5C270780617", \ + "00F44B4AF1ECC2630E08785CEBCC15", \ + "00FFFFFFFFFFFFFFFDBF91AF6DEA73", 2 static EC_GROUP *ec_group_new_GFp_from_hex(const char *prime_in, const char *a_in, const char *b_in, @@ -256,6 +534,54 @@ err: return(group); } +static EC_GROUP *ec_group_new_GF2m_from_hex(const char *prime_in, + const char *a_in, const char *b_in, + const char *x_in, const char *y_in, const char *order_in, const BN_ULONG cofac_in) + { + EC_GROUP *group=NULL; + EC_POINT *P=NULL; + BN_CTX *ctx=NULL; + BIGNUM *prime=NULL,*a=NULL,*b=NULL,*x=NULL,*y=NULL,*order=NULL; + int ok=0; + + if ((ctx = BN_CTX_new()) == NULL) goto bn_err; + if ((prime = BN_new()) == NULL || (a = BN_new()) == NULL || (b = BN_new()) == NULL || + (x = BN_new()) == NULL || (y = BN_new()) == NULL || (order = BN_new()) == NULL) goto bn_err; + + if (!BN_hex2bn(&prime, prime_in)) goto bn_err; + if (!BN_hex2bn(&a, a_in)) goto bn_err; + if (!BN_hex2bn(&b, b_in)) goto bn_err; + + if ((group = EC_GROUP_new_curve_GF2m(prime, a, b, ctx)) == NULL) goto err; + if ((P = EC_POINT_new(group)) == NULL) goto err; + + if (!BN_hex2bn(&x, x_in)) goto bn_err; + if (!BN_hex2bn(&y, y_in)) goto bn_err; + if (!EC_POINT_set_affine_coordinates_GF2m(group, P, x, y, ctx)) goto err; + if (!BN_hex2bn(&order, order_in)) goto bn_err; + if (!BN_set_word(x, cofac_in)) goto bn_err; + if (!EC_GROUP_set_generator(group, P, order, x)) goto err; + ok=1; +bn_err: + if (!ok) + ECerr(EC_F_EC_GROUP_NEW_GF2M_FROM_HEX, ERR_R_BN_LIB); +err: + if (!ok) + { + EC_GROUP_free(group); + group = NULL; + } + if (P) EC_POINT_free(P); + if (ctx) BN_CTX_free(ctx); + if (prime) BN_free(prime); + if (a) BN_free(a); + if (b) BN_free(b); + if (order) BN_free(order); + if (x) BN_free(x); + if (y) BN_free(y); + return(group); + } + EC_GROUP *EC_GROUP_new_by_name(int name) { EC_GROUP *ret = NULL; @@ -263,86 +589,272 @@ EC_GROUP *EC_GROUP_new_by_name(int name) { case EC_GROUP_NO_CURVE: return NULL; - /* some nist curves */ - case EC_GROUP_NIST_PRIME_224: /* EC_GROUP_NIST_PRIME_224 == EC_GROUP_SECG_PRIME_224R1 */ - ret = ec_group_new_GFp_from_hex(_EC_GROUP_NIST_PRIME_224); - break; - case EC_GROUP_NIST_PRIME_384: /* EC_GROUP_NIST_PRIME_384 == EC_GROUP_SECG_PRIME_384R1 */ - ret = ec_group_new_GFp_from_hex(_EC_GROUP_NIST_PRIME_384); + /* prime field curves */ + /* prime field curves of degree 112 */ + case EC_GROUP_SECG_PRIME_112R1: + case EC_GROUP_WTLS_6: + ret = ec_group_new_GFp_from_hex(_EC_GROUP_SECG_PRIME_112R1); break; - - case EC_GROUP_NIST_PRIME_521: /* EC_GROUP_NIST_PRIME_521 == EC_GROUP_SECG_PRIME_521R1 */ - ret = ec_group_new_GFp_from_hex(_EC_GROUP_NIST_PRIME_521); + + case EC_GROUP_SECG_PRIME_112R2: + ret = ec_group_new_GFp_from_hex(_EC_GROUP_SECG_PRIME_112R2); + break; + + case EC_GROUP_WTLS_8: + ret = ec_group_new_GFp_from_hex(_EC_GROUP_WTLS_8); + break; + + /* prime field curves of degree 128 */ + case EC_GROUP_SECG_PRIME_128R1: + ret = ec_group_new_GFp_from_hex(_EC_GROUP_SECG_PRIME_128R1); break; - /* x9.62 prime curves */ + + case EC_GROUP_SECG_PRIME_128R2: + ret = ec_group_new_GFp_from_hex(_EC_GROUP_SECG_PRIME_128R2); + break; + + /* prime field curves of degree 160 */ + case EC_GROUP_SECG_PRIME_160K1: + ret = ec_group_new_GFp_from_hex(_EC_GROUP_SECG_PRIME_160K1); + break; + + case EC_GROUP_SECG_PRIME_160R1: + ret = ec_group_new_GFp_from_hex(_EC_GROUP_SECG_PRIME_160R1); + break; + + case EC_GROUP_SECG_PRIME_160R2: + case EC_GROUP_WTLS_7: + ret = ec_group_new_GFp_from_hex(_EC_GROUP_SECG_PRIME_160R2); + break; + + case EC_GROUP_WTLS_9: + ret = ec_group_new_GFp_from_hex(_EC_GROUP_WTLS_9); + break; + + /* prime field curves of degree 192 */ + case EC_GROUP_SECG_PRIME_192K1: + ret = ec_group_new_GFp_from_hex(_EC_GROUP_SECG_PRIME_192K1); + break; + case EC_GROUP_X9_62_PRIME_192V1: /* == EC_GROUP_NIST_PRIME_192 == EC_GROUP_SECG_PRIME_192R1 */ ret = ec_group_new_GFp_from_hex(_EC_GROUP_NIST_PRIME_192); break; - + case EC_GROUP_X9_62_PRIME_192V2: ret = ec_group_new_GFp_from_hex(_EC_GROUP_X9_62_PRIME_192V2); break; - + case EC_GROUP_X9_62_PRIME_192V3: ret = ec_group_new_GFp_from_hex(_EC_GROUP_X9_62_PRIME_192V3); break; - + + /* prime field curves of degree 224 */ + case EC_GROUP_SECG_PRIME_224K1: + ret = ec_group_new_GFp_from_hex(_EC_GROUP_SECG_PRIME_224K1); + break; + + case EC_GROUP_SECG_PRIME_224R1: /* == EC_GROUP_NIST_PRIME_224 */ + ret = ec_group_new_GFp_from_hex(_EC_GROUP_NIST_PRIME_224); + break; + + case EC_GROUP_WTLS_12: + ret = ec_group_new_GFp_from_hex(_EC_GROUP_WTLS_12); + break; + + /* prime field curves of degree 239 */ case EC_GROUP_X9_62_PRIME_239V1: ret = ec_group_new_GFp_from_hex(_EC_GROUP_X9_62_PRIME_239V1); break; - + case EC_GROUP_X9_62_PRIME_239V2: ret = ec_group_new_GFp_from_hex(_EC_GROUP_X9_62_PRIME_239V2); break; - + case EC_GROUP_X9_62_PRIME_239V3: ret = ec_group_new_GFp_from_hex(_EC_GROUP_X9_62_PRIME_239V3); break; - - case EC_GROUP_X9_62_PRIME_256V1: /* == EC_GROUP_NIST_PRIME_256 == EC_GROUP_SECG_PRIME_256R1 */ + + /* prime field curves of degree 256 */ + case EC_GROUP_SECG_PRIME_256K1: + ret = ec_group_new_GFp_from_hex(_EC_GROUP_SECG_PRIME_256K1); + break; + + case EC_GROUP_SECG_PRIME_256R1: /* == EC_GROUP_NIST_PRIME_256 == EC_GROUP_X9_62_PRIME_256V1 */ ret = ec_group_new_GFp_from_hex(_EC_GROUP_X9_62_PRIME_256V1); break; - /* the remaining secg curves */ - case EC_GROUP_SECG_PRIME_112R1: - ret = ec_group_new_GFp_from_hex(_EC_GROUP_SECG_PRIME_112R1); + + /* prime field curves of degree 384 */ + case EC_GROUP_SECG_PRIME_384R1: /* == EC_GROUP_NIST_PRIME_384 */ + ret = ec_group_new_GFp_from_hex(_EC_GROUP_NIST_PRIME_384); break; - case EC_GROUP_SECG_PRIME_112R2: - ret = ec_group_new_GFp_from_hex(_EC_GROUP_SECG_PRIME_112R2); + + /* prime field curves of degree 521 */ + case EC_GROUP_SECG_PRIME_521R1: /* == EC_GROUP_NIST_PRIME_521 */ + ret = ec_group_new_GFp_from_hex(_EC_GROUP_NIST_PRIME_521); break; - case EC_GROUP_SECG_PRIME_128R1: - ret = ec_group_new_GFp_from_hex(_EC_GROUP_SECG_PRIME_128R1); + + /* characteristic two field curves */ + /* binary curves of degree 113 */ + case EC_GROUP_SECG_CHAR2_113R1: + case EC_GROUP_WTLS_4: + ret = ec_group_new_GF2m_from_hex(_EC_GROUP_SECG_CHAR2_113R1); break; - case EC_GROUP_SECG_PRIME_128R2: - ret = ec_group_new_GFp_from_hex(_EC_GROUP_SECG_PRIME_128R2); + + case EC_GROUP_SECG_CHAR2_113R2: + ret = ec_group_new_GF2m_from_hex(_EC_GROUP_SECG_CHAR2_113R2); break; - case EC_GROUP_SECG_PRIME_160K1: - ret = ec_group_new_GFp_from_hex(_EC_GROUP_SECG_PRIME_160K1); + + case EC_GROUP_WTLS_1: + ret = ec_group_new_GF2m_from_hex(_EC_GROUP_WTLS_1); break; - case EC_GROUP_SECG_PRIME_160R1: - ret = ec_group_new_GFp_from_hex(_EC_GROUP_SECG_PRIME_160R1); + + /* binary curves of degree 131 */ + case EC_GROUP_SECG_CHAR2_131R1: + ret = ec_group_new_GF2m_from_hex(_EC_GROUP_SECG_CHAR2_131R1); break; - case EC_GROUP_SECG_PRIME_160R2: - ret = ec_group_new_GFp_from_hex(_EC_GROUP_SECG_PRIME_160R2); + + case EC_GROUP_SECG_CHAR2_131R2: + ret = ec_group_new_GF2m_from_hex(_EC_GROUP_SECG_CHAR2_131R2); break; - case EC_GROUP_SECG_PRIME_192K1: - ret = ec_group_new_GFp_from_hex(_EC_GROUP_SECG_PRIME_192K1); + + /* binary curves of degree 163 */ + case EC_GROUP_SECG_CHAR2_163K1: /* == EC_GROUP_NIST_CHAR2_K163 */ + case EC_GROUP_WTLS_3: + ret = ec_group_new_GF2m_from_hex(_EC_GROUP_SECG_CHAR2_163K1); break; - case EC_GROUP_SECG_PRIME_224K1: - ret = ec_group_new_GFp_from_hex(_EC_GROUP_SECG_PRIME_224K1); + + case EC_GROUP_SECG_CHAR2_163R1: + ret = ec_group_new_GF2m_from_hex(_EC_GROUP_SECG_CHAR2_163R1); break; - case EC_GROUP_SECG_PRIME_256K1: - ret = ec_group_new_GFp_from_hex(_EC_GROUP_SECG_PRIME_256K1); + + case EC_GROUP_SECG_CHAR2_163R2: /* == EC_GROUP_NIST_CHAR2_B163 */ + ret = ec_group_new_GF2m_from_hex(_EC_GROUP_SECG_CHAR2_163R2); break; - /* some wap/wtls curves */ - case EC_GROUP_WTLS_6: - ret = ec_group_new_GFp_from_hex(_EC_GROUP_WTLS_6); + + case EC_GROUP_X9_62_CHAR2_163V1: + case EC_GROUP_WTLS_5: + ret = ec_group_new_GF2m_from_hex(_EC_GROUP_X9_62_CHAR2_163V1); break; - case EC_GROUP_WTLS_8: - ret = ec_group_new_GFp_from_hex(_EC_GROUP_WTLS_8); + + case EC_GROUP_X9_62_CHAR2_163V2: + ret = ec_group_new_GF2m_from_hex(_EC_GROUP_X9_62_CHAR2_163V2); break; - case EC_GROUP_WTLS_9: - ret = ec_group_new_GFp_from_hex(_EC_GROUP_WTLS_9); + + case EC_GROUP_X9_62_CHAR2_163V3: + ret = ec_group_new_GF2m_from_hex(_EC_GROUP_X9_62_CHAR2_163V3); + break; + + /* binary curves of degree 176 */ + case EC_GROUP_X9_62_CHAR2_176V1: + ret = ec_group_new_GF2m_from_hex(_EC_GROUP_X9_62_CHAR2_176V1); + break; + + /* binary curves of degree 191 */ + case EC_GROUP_X9_62_CHAR2_191V1: + ret = ec_group_new_GF2m_from_hex(_EC_GROUP_X9_62_CHAR2_191V1); + break; + + case EC_GROUP_X9_62_CHAR2_191V2: + ret = ec_group_new_GF2m_from_hex(_EC_GROUP_X9_62_CHAR2_191V2); + break; + + case EC_GROUP_X9_62_CHAR2_191V3: + ret = ec_group_new_GF2m_from_hex(_EC_GROUP_X9_62_CHAR2_191V3); + break; + + /* binary curves of degree 193 */ + case EC_GROUP_SECG_CHAR2_193R1: + ret = ec_group_new_GF2m_from_hex(_EC_GROUP_SECG_CHAR2_193R1); + break; + + case EC_GROUP_SECG_CHAR2_193R2: + ret = ec_group_new_GF2m_from_hex(_EC_GROUP_SECG_CHAR2_193R2); + break; + + /* binary curves of degree 208 */ + case EC_GROUP_X9_62_CHAR2_208W1: + ret = ec_group_new_GF2m_from_hex(_EC_GROUP_X9_62_CHAR2_208W1); + break; + + /* binary curves of degree 233 */ + case EC_GROUP_SECG_CHAR2_233K1: /* == EC_GROUP_NIST_CHAR2_K233 */ + case EC_GROUP_WTLS_10: + ret = ec_group_new_GF2m_from_hex(_EC_GROUP_SECG_CHAR2_233K1); + break; + + case EC_GROUP_SECG_CHAR2_233R1: /* == EC_GROUP_NIST_CHAR2_B233 */ + case EC_GROUP_WTLS_11: + ret = ec_group_new_GF2m_from_hex(_EC_GROUP_SECG_CHAR2_233R1); + break; + + /* binary curves of degree 239 */ + case EC_GROUP_SECG_CHAR2_239K1: + ret = ec_group_new_GF2m_from_hex(_EC_GROUP_SECG_CHAR2_239K1); + break; + + case EC_GROUP_X9_62_CHAR2_239V1: + ret = ec_group_new_GF2m_from_hex(_EC_GROUP_X9_62_CHAR2_239V1); + break; + + case EC_GROUP_X9_62_CHAR2_239V2: + ret = ec_group_new_GF2m_from_hex(_EC_GROUP_X9_62_CHAR2_239V2); + break; + + case EC_GROUP_X9_62_CHAR2_239V3: + ret = ec_group_new_GF2m_from_hex(_EC_GROUP_X9_62_CHAR2_239V3); + break; + + /* binary curves of degree 272 */ + case EC_GROUP_X9_62_CHAR2_272W1: + ret = ec_group_new_GF2m_from_hex(_EC_GROUP_X9_62_CHAR2_272W1); + break; + + /* binary curves of degree 283 */ + case EC_GROUP_SECG_CHAR2_283K1: /* == EC_GROUP_NIST_CHAR2_K283 */ + ret = ec_group_new_GF2m_from_hex(_EC_GROUP_SECG_CHAR2_283K1); + break; + + case EC_GROUP_SECG_CHAR2_283R1: /* == EC_GROUP_NIST_CHAR2_B283 */ + ret = ec_group_new_GF2m_from_hex(_EC_GROUP_SECG_CHAR2_283R1); + break; + + /* binary curves of degree 304 */ + case EC_GROUP_X9_62_CHAR2_304W1: + ret = ec_group_new_GF2m_from_hex(_EC_GROUP_X9_62_CHAR2_304W1); + break; + + /* binary curves of degree 359 */ + case EC_GROUP_X9_62_CHAR2_359V1: + ret = ec_group_new_GF2m_from_hex(_EC_GROUP_X9_62_CHAR2_359V1); + break; + + /* binary curves of degree 368 */ + case EC_GROUP_X9_62_CHAR2_368W1: + ret = ec_group_new_GF2m_from_hex(_EC_GROUP_X9_62_CHAR2_368W1); + break; + + /* binary curves of degree 409 */ + case EC_GROUP_SECG_CHAR2_409K1: /* == EC_GROUP_NIST_CHAR2_K409 */ + ret = ec_group_new_GF2m_from_hex(_EC_GROUP_SECG_CHAR2_409K1); + break; + + case EC_GROUP_SECG_CHAR2_409R1: /* == EC_GROUP_NIST_CHAR2_B409 */ + ret = ec_group_new_GF2m_from_hex(_EC_GROUP_SECG_CHAR2_409R1); + break; + + /* binary curves of degree 431 */ + case EC_GROUP_X9_62_CHAR2_431R1: + ret = ec_group_new_GF2m_from_hex(_EC_GROUP_X9_62_CHAR2_431R1); + break; + + /* binary curves of degree 571 */ + case EC_GROUP_SECG_CHAR2_571K1: /* == EC_GROUP_NIST_CHAR2_K571 */ + ret = ec_group_new_GF2m_from_hex(_EC_GROUP_SECG_CHAR2_571K1); + break; + + case EC_GROUP_SECG_CHAR2_571R1: /* == EC_GROUP_NIST_CHAR2_B571 */ + ret = ec_group_new_GF2m_from_hex(_EC_GROUP_SECG_CHAR2_571R1); break; } diff --git a/crypto/ec/ec_cvt.c b/crypto/ec/ec_cvt.c index 3daeb19509..22789a57e5 100644 --- a/crypto/ec/ec_cvt.c +++ b/crypto/ec/ec_cvt.c @@ -1,4 +1,7 @@ /* crypto/ec/ec_cvt.c */ +/* + * Originally written by Bodo Moeller for the OpenSSL project. + */ /* ==================================================================== * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved. * @@ -52,6 +55,32 @@ * Hudson (tjh@cryptsoft.com). * */ +/* ==================================================================== + * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. + * + * Portions of the attached software ("Contribution") are developed by + * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project. + * + * The Contribution is licensed pursuant to the OpenSSL open source + * license provided above. + * + * In addition, Sun covenants to all licensees who provide a reciprocal + * covenant with respect to their own patents if any, not to sue under + * current and future patent claims necessarily infringed by the making, + * using, practicing, selling, offering for sale and/or otherwise + * disposing of the Contribution as delivered hereunder + * (or portions thereof), provided that such covenant shall not apply: + * 1) for code that a licensee deletes from the Contribution; + * 2) separates from the Contribution; or + * 3) for infringements caused by: + * i) the modification of the Contribution or + * ii) the combination of the Contribution with other software or + * devices where such combination causes the infringement. + * + * The elliptic curve binary polynomial software is originally written by + * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories. + * + */ #include "ec_lcl.h" @@ -78,3 +107,23 @@ EC_GROUP *EC_GROUP_new_curve_GFp(const BIGNUM *p, const BIGNUM *a, const BIGNUM return ret; } + +EC_GROUP *EC_GROUP_new_curve_GF2m(const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx) + { + const EC_METHOD *meth; + EC_GROUP *ret; + + meth = EC_GF2m_simple_method(); + + ret = EC_GROUP_new(meth); + if (ret == NULL) + return NULL; + + if (!EC_GROUP_set_curve_GF2m(ret, p, a, b, ctx)) + { + EC_GROUP_clear_free(ret); + return NULL; + } + + return ret; + } diff --git a/crypto/ec/ec_err.c b/crypto/ec/ec_err.c index bb517d90ac..8626ef0d3a 100644 --- a/crypto/ec/ec_err.c +++ b/crypto/ec/ec_err.c @@ -67,70 +67,97 @@ static ERR_STRING_DATA EC_str_functs[]= { {ERR_PACK(0,EC_F_COMPUTE_WNAF,0), "COMPUTE_WNAF"}, -{ERR_PACK(0,EC_F_D2I_ECDSAPARAMETERS,0), "d2i_ECDSAParameters"}, {ERR_PACK(0,EC_F_D2I_ECPARAMETERS,0), "d2i_ECParameters"}, {ERR_PACK(0,EC_F_D2I_ECPKPARAMETERS,0), "d2i_ECPKParameters"}, +{ERR_PACK(0,EC_F_D2I_ECPRIVATEKEY,0), "d2i_ECPrivateKey"}, +{ERR_PACK(0,EC_F_ECPARAMETERS_PRINT,0), "ECParameters_print"}, +{ERR_PACK(0,EC_F_ECPARAMETERS_PRINT_FP,0), "ECParameters_print_fp"}, {ERR_PACK(0,EC_F_ECPKPARAMETERS_PRINT,0), "ECPKParameters_print"}, {ERR_PACK(0,EC_F_ECPKPARAMETERS_PRINT_FP,0), "ECPKParameters_print_fp"}, +{ERR_PACK(0,EC_F_ECPUBLICKEY_GET_OCTET,0), "ECPUBLICKEY_GET_OCTET"}, +{ERR_PACK(0,EC_F_ECPUBLICKEY_SET_OCTET,0), "ECPUBLICKEY_SET_OCTET"}, {ERR_PACK(0,EC_F_EC_ASN1_GROUP2CURVE,0), "EC_ASN1_GROUP2CURVE"}, {ERR_PACK(0,EC_F_EC_ASN1_GROUP2FIELDID,0), "EC_ASN1_GROUP2FIELDID"}, {ERR_PACK(0,EC_F_EC_ASN1_GROUP2PARAMETERS,0), "EC_ASN1_GROUP2PARAMETERS"}, -{ERR_PACK(0,EC_F_EC_ASN1_GROUP2PKPARAMETERS,0), "EC_ASN1_group2pkparameters"}, +{ERR_PACK(0,EC_F_EC_ASN1_GROUP2PKPARAMETERS,0), "EC_ASN1_GROUP2PKPARAMETERS"}, {ERR_PACK(0,EC_F_EC_ASN1_PARAMETERS2GROUP,0), "EC_ASN1_PARAMETERS2GROUP"}, -{ERR_PACK(0,EC_F_EC_ASN1_PKPARAMETERS2GROUP,0), "EC_ASN1_pkparameters2group"}, +{ERR_PACK(0,EC_F_EC_ASN1_PKPARAMETERS2GROUP,0), "EC_ASN1_PKPARAMETERS2GROUP"}, +{ERR_PACK(0,EC_F_EC_GF2M_SIMPLE_GROUP_CHECK_DISCRIMINANT,0), "ec_GF2m_simple_group_check_discriminant"}, +{ERR_PACK(0,EC_F_EC_GF2M_SIMPLE_OCT2POINT,0), "ec_GF2m_simple_oct2point"}, +{ERR_PACK(0,EC_F_EC_GF2M_SIMPLE_POINT2OCT,0), "ec_GF2m_simple_point2oct"}, +{ERR_PACK(0,EC_F_EC_GF2M_SIMPLE_POINT_GET_AFFINE_COORDINATES,0), "ec_GF2m_simple_point_get_affine_coordinates"}, +{ERR_PACK(0,EC_F_EC_GF2M_SIMPLE_POINT_SET_AFFINE_COORDINATES,0), "ec_GF2m_simple_point_set_affine_coordinates"}, +{ERR_PACK(0,EC_F_EC_GF2M_SIMPLE_SET_COMPRESSED_COORDINATES,0), "ec_GF2m_simple_set_compressed_coordinates"}, {ERR_PACK(0,EC_F_EC_GFP_MONT_FIELD_DECODE,0), "ec_GFp_mont_field_decode"}, {ERR_PACK(0,EC_F_EC_GFP_MONT_FIELD_ENCODE,0), "ec_GFp_mont_field_encode"}, {ERR_PACK(0,EC_F_EC_GFP_MONT_FIELD_MUL,0), "ec_GFp_mont_field_mul"}, {ERR_PACK(0,EC_F_EC_GFP_MONT_FIELD_SQR,0), "ec_GFp_mont_field_sqr"}, {ERR_PACK(0,EC_F_EC_GFP_SIMPLE_GROUP_CHECK_DISCRIMINANT,0), "ec_GFp_simple_group_check_discriminant"}, -{ERR_PACK(0,EC_F_EC_GFP_SIMPLE_GROUP_SET_CURVE_GFP,0), "ec_GFp_simple_group_set_curve_GFp"}, +{ERR_PACK(0,EC_F_EC_GFP_SIMPLE_GROUP_SET_CURVE,0), "ec_GFp_simple_group_set_curve"}, {ERR_PACK(0,EC_F_EC_GFP_SIMPLE_GROUP_SET_GENERATOR,0), "EC_GFP_SIMPLE_GROUP_SET_GENERATOR"}, {ERR_PACK(0,EC_F_EC_GFP_SIMPLE_MAKE_AFFINE,0), "ec_GFp_simple_make_affine"}, {ERR_PACK(0,EC_F_EC_GFP_SIMPLE_OCT2POINT,0), "ec_GFp_simple_oct2point"}, {ERR_PACK(0,EC_F_EC_GFP_SIMPLE_POINT2OCT,0), "ec_GFp_simple_point2oct"}, {ERR_PACK(0,EC_F_EC_GFP_SIMPLE_POINTS_MAKE_AFFINE,0), "ec_GFp_simple_points_make_affine"}, -{ERR_PACK(0,EC_F_EC_GFP_SIMPLE_POINT_GET_AFFINE_COORDINATES_GFP,0), "ec_GFp_simple_point_get_affine_coordinates_GFp"}, -{ERR_PACK(0,EC_F_EC_GFP_SIMPLE_POINT_SET_AFFINE_COORDINATES_GFP,0), "ec_GFp_simple_point_set_affine_coordinates_GFp"}, -{ERR_PACK(0,EC_F_EC_GFP_SIMPLE_SET_COMPRESSED_COORDINATES_GFP,0), "ec_GFp_simple_set_compressed_coordinates_GFp"}, +{ERR_PACK(0,EC_F_EC_GFP_SIMPLE_POINT_GET_AFFINE_COORDINATES,0), "ec_GFp_simple_point_get_affine_coordinates"}, +{ERR_PACK(0,EC_F_EC_GFP_SIMPLE_POINT_SET_AFFINE_COORDINATES,0), "ec_GFp_simple_point_set_affine_coordinates"}, +{ERR_PACK(0,EC_F_EC_GFP_SIMPLE_SET_COMPRESSED_COORDINATES,0), "ec_GFp_simple_set_compressed_coordinates"}, {ERR_PACK(0,EC_F_EC_GROUP_CHECK,0), "EC_GROUP_check"}, {ERR_PACK(0,EC_F_EC_GROUP_CHECK_DISCRIMINANT,0), "EC_GROUP_check_discriminant"}, {ERR_PACK(0,EC_F_EC_GROUP_COPY,0), "EC_GROUP_copy"}, {ERR_PACK(0,EC_F_EC_GROUP_GET0_GENERATOR,0), "EC_GROUP_get0_generator"}, {ERR_PACK(0,EC_F_EC_GROUP_GET_COFACTOR,0), "EC_GROUP_get_cofactor"}, +{ERR_PACK(0,EC_F_EC_GROUP_GET_CURVE_GF2M,0), "EC_GROUP_get_curve_GF2m"}, {ERR_PACK(0,EC_F_EC_GROUP_GET_CURVE_GFP,0), "EC_GROUP_get_curve_GFp"}, +{ERR_PACK(0,EC_F_EC_GROUP_GET_DEGREE,0), "EC_GROUP_get_degree"}, {ERR_PACK(0,EC_F_EC_GROUP_GET_EXTRA_DATA,0), "EC_GROUP_get_extra_data"}, {ERR_PACK(0,EC_F_EC_GROUP_GET_ORDER,0), "EC_GROUP_get_order"}, {ERR_PACK(0,EC_F_EC_GROUP_GROUP2NID,0), "EC_GROUP_GROUP2NID"}, {ERR_PACK(0,EC_F_EC_GROUP_NEW,0), "EC_GROUP_new"}, {ERR_PACK(0,EC_F_EC_GROUP_NEW_BY_NAME,0), "EC_GROUP_new_by_name"}, {ERR_PACK(0,EC_F_EC_GROUP_NEW_BY_NID,0), "EC_GROUP_new_by_nid"}, +{ERR_PACK(0,EC_F_EC_GROUP_NEW_GF2M_FROM_HEX,0), "EC_GROUP_NEW_GF2M_FROM_HEX"}, {ERR_PACK(0,EC_F_EC_GROUP_NEW_GFP_FROM_HEX,0), "EC_GROUP_NEW_GFP_FROM_HEX"}, {ERR_PACK(0,EC_F_EC_GROUP_PRECOMPUTE_MULT,0), "EC_GROUP_precompute_mult"}, +{ERR_PACK(0,EC_F_EC_GROUP_SET_CURVE_GF2M,0), "EC_GROUP_set_curve_GF2m"}, {ERR_PACK(0,EC_F_EC_GROUP_SET_CURVE_GFP,0), "EC_GROUP_set_curve_GFp"}, {ERR_PACK(0,EC_F_EC_GROUP_SET_EXTRA_DATA,0), "EC_GROUP_set_extra_data"}, {ERR_PACK(0,EC_F_EC_GROUP_SET_GENERATOR,0), "EC_GROUP_set_generator"}, +{ERR_PACK(0,EC_F_EC_KEY_CHECK_KEY,0), "EC_KEY_check_key"}, +{ERR_PACK(0,EC_F_EC_KEY_COPY,0), "EC_KEY_copy"}, +{ERR_PACK(0,EC_F_EC_KEY_GENERATE_KEY,0), "EC_KEY_generate_key"}, +{ERR_PACK(0,EC_F_EC_KEY_PRINT,0), "EC_KEY_print"}, +{ERR_PACK(0,EC_F_EC_KEY_PRINT_FP,0), "EC_KEY_print_fp"}, +{ERR_PACK(0,EC_F_EC_NEW,0), "EC_NEW"}, {ERR_PACK(0,EC_F_EC_POINTS_MAKE_AFFINE,0), "EC_POINTs_make_affine"}, {ERR_PACK(0,EC_F_EC_POINTS_MUL,0), "EC_POINTs_mul"}, {ERR_PACK(0,EC_F_EC_POINT_ADD,0), "EC_POINT_add"}, {ERR_PACK(0,EC_F_EC_POINT_CMP,0), "EC_POINT_cmp"}, {ERR_PACK(0,EC_F_EC_POINT_COPY,0), "EC_POINT_copy"}, {ERR_PACK(0,EC_F_EC_POINT_DBL,0), "EC_POINT_dbl"}, +{ERR_PACK(0,EC_F_EC_POINT_GET_AFFINE_COORDINATES_GF2M,0), "EC_POINT_get_affine_coordinates_GF2m"}, {ERR_PACK(0,EC_F_EC_POINT_GET_AFFINE_COORDINATES_GFP,0), "EC_POINT_get_affine_coordinates_GFp"}, {ERR_PACK(0,EC_F_EC_POINT_GET_JPROJECTIVE_COORDINATES_GFP,0), "EC_POINT_get_Jprojective_coordinates_GFp"}, {ERR_PACK(0,EC_F_EC_POINT_IS_AT_INFINITY,0), "EC_POINT_is_at_infinity"}, {ERR_PACK(0,EC_F_EC_POINT_IS_ON_CURVE,0), "EC_POINT_is_on_curve"}, {ERR_PACK(0,EC_F_EC_POINT_MAKE_AFFINE,0), "EC_POINT_make_affine"}, +{ERR_PACK(0,EC_F_EC_POINT_MUL,0), "EC_POINT_mul"}, {ERR_PACK(0,EC_F_EC_POINT_NEW,0), "EC_POINT_new"}, {ERR_PACK(0,EC_F_EC_POINT_OCT2POINT,0), "EC_POINT_oct2point"}, {ERR_PACK(0,EC_F_EC_POINT_POINT2OCT,0), "EC_POINT_point2oct"}, +{ERR_PACK(0,EC_F_EC_POINT_SET_AFFINE_COORDINATES_GF2M,0), "EC_POINT_set_affine_coordinates_GF2m"}, {ERR_PACK(0,EC_F_EC_POINT_SET_AFFINE_COORDINATES_GFP,0), "EC_POINT_set_affine_coordinates_GFp"}, +{ERR_PACK(0,EC_F_EC_POINT_SET_COMPRESSED_COORDINATES_GF2M,0), "EC_POINT_set_compressed_coordinates_GF2m"}, {ERR_PACK(0,EC_F_EC_POINT_SET_COMPRESSED_COORDINATES_GFP,0), "EC_POINT_set_compressed_coordinates_GFp"}, {ERR_PACK(0,EC_F_EC_POINT_SET_JPROJECTIVE_COORDINATES_GFP,0), "EC_POINT_set_Jprojective_coordinates_GFp"}, {ERR_PACK(0,EC_F_EC_POINT_SET_TO_INFINITY,0), "EC_POINT_set_to_infinity"}, -{ERR_PACK(0,EC_F_GFP_MONT_GROUP_SET_CURVE_GFP,0), "GFP_MONT_GROUP_SET_CURVE_GFP"}, -{ERR_PACK(0,EC_F_I2D_ECDSAPARAMETERS,0), "i2d_ECDSAParameters"}, +{ERR_PACK(0,EC_F_EC_WNAF_MUL,0), "ec_wNAF_mul"}, +{ERR_PACK(0,EC_F_EC_WNAF_PRECOMPUTE_MULT,0), "ec_wNAF_precompute_mult"}, +{ERR_PACK(0,EC_F_GFP_MONT_GROUP_SET_CURVE,0), "GFP_MONT_GROUP_SET_CURVE"}, +{ERR_PACK(0,EC_F_I2D_ECDSAPARAMETERS,0), "I2D_ECDSAPARAMETERS"}, {ERR_PACK(0,EC_F_I2D_ECPARAMETERS,0), "i2d_ECParameters"}, {ERR_PACK(0,EC_F_I2D_ECPKPARAMETERS,0), "i2d_ECPKParameters"}, +{ERR_PACK(0,EC_F_I2D_ECPRIVATEKEY,0), "i2d_ECPrivateKey"}, {0,NULL} }; @@ -156,7 +183,9 @@ static ERR_STRING_DATA EC_str_reasons[]= {EC_R_INVALID_FIELD ,"invalid field"}, {EC_R_INVALID_FORM ,"invalid form"}, {EC_R_INVALID_GROUP_ORDER ,"invalid group order"}, +{EC_R_INVALID_PRIVATE_KEY ,"invalid private key"}, {EC_R_MISSING_PARAMETERS ,"missing parameters"}, +{EC_R_MISSING_PRIVATE_KEY ,"missing private key"}, {EC_R_NOT_IMPLEMENTED ,"not implemented"}, {EC_R_NOT_INITIALIZED ,"not initialized"}, {EC_R_NO_SUCH_EXTRA_DATA ,"no such extra data"}, @@ -171,6 +200,7 @@ static ERR_STRING_DATA EC_str_reasons[]= {EC_R_UNKNOWN_NID ,"unknown nid"}, {EC_R_UNKNOWN_ORDER ,"unknown order"}, {EC_R_UNKNOWN_PARAMETERS_TYPE ,"unknown parameters type"}, +{EC_R_WRONG_ORDER ,"wrong order"}, {0,NULL} }; diff --git a/crypto/ec/ec_lcl.h b/crypto/ec/ec_lcl.h index 7457c423ff..247c985a23 100644 --- a/crypto/ec/ec_lcl.h +++ b/crypto/ec/ec_lcl.h @@ -1,4 +1,7 @@ /* crypto/ec/ec_lcl.h */ +/* + * Originally written by Bodo Moeller for the OpenSSL project. + */ /* ==================================================================== * Copyright (c) 1998-2001 The OpenSSL Project. All rights reserved. * @@ -52,6 +55,32 @@ * Hudson (tjh@cryptsoft.com). * */ +/* ==================================================================== + * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. + * + * Portions of the attached software ("Contribution") are developed by + * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project. + * + * The Contribution is licensed pursuant to the OpenSSL open source + * license provided above. + * + * In addition, Sun covenants to all licensees who provide a reciprocal + * covenant with respect to their own patents if any, not to sue under + * current and future patent claims necessarily infringed by the making, + * using, practicing, selling, offering for sale and/or otherwise + * disposing of the Contribution as delivered hereunder + * (or portions thereof), provided that such covenant shall not apply: + * 1) for code that a licensee deletes from the Contribution; + * 2) separates from the Contribution; or + * 3) for infringements caused by: + * i) the modification of the Contribution or + * ii) the combination of the Contribution with other software or + * devices where such combination causes the infringement. + * + * The elliptic curve binary polynomial software is originally written by + * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories. + * + */ #include <stdlib.h> @@ -73,9 +102,13 @@ struct ec_method_st { void (*group_clear_finish)(EC_GROUP *); int (*group_copy)(EC_GROUP *, const EC_GROUP *); - /* used by EC_GROUP_set_curve_GFp and EC_GROUP_get_curve_GFp: */ - int (*group_set_curve_GFp)(EC_GROUP *, const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *); - int (*group_get_curve_GFp)(const EC_GROUP *, BIGNUM *p, BIGNUM *a, BIGNUM *b, BN_CTX *); + /* used by EC_GROUP_set_curve_GFp, EC_GROUP_get_curve_GFp, */ + /* EC_GROUP_set_curve_GF2m, and EC_GROUP_get_curve_GF2m: */ + int (*group_set_curve)(EC_GROUP *, const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *); + int (*group_get_curve)(const EC_GROUP *, BIGNUM *p, BIGNUM *a, BIGNUM *b, BN_CTX *); + + /* used by EC_GROUP_get_degree: */ + int (*group_get_degree)(const EC_GROUP *); /* used by EC_GROUP_check: */ int (*group_check_discriminant)(const EC_GROUP *, BN_CTX *); @@ -87,20 +120,22 @@ struct ec_method_st { int (*point_copy)(EC_POINT *, const EC_POINT *); /* used by EC_POINT_set_to_infinity, - * EC_POINT_set_Jprojective_coordinates_GFp, EC_POINT_get_Jprojective_coordinates_GFp, - * EC_POINT_set_affine_coordinates_GFp, EC_POINT_get_affine_coordinates_GFp, - * EC_POINT_set_compressed_coordinates_GFp: + * EC_POINT_set_Jprojective_coordinates_GFp, + * EC_POINT_get_Jprojective_coordinates_GFp, + * EC_POINT_set_affine_coordinates_GFp, ..._GF2m, + * EC_POINT_get_affine_coordinates_GFp, ..._GF2m, + * EC_POINT_set_compressed_coordinates_GFp, ..._GF2m: */ int (*point_set_to_infinity)(const EC_GROUP *, EC_POINT *); int (*point_set_Jprojective_coordinates_GFp)(const EC_GROUP *, EC_POINT *, const BIGNUM *x, const BIGNUM *y, const BIGNUM *z, BN_CTX *); int (*point_get_Jprojective_coordinates_GFp)(const EC_GROUP *, const EC_POINT *, BIGNUM *x, BIGNUM *y, BIGNUM *z, BN_CTX *); - int (*point_set_affine_coordinates_GFp)(const EC_GROUP *, EC_POINT *, + int (*point_set_affine_coordinates)(const EC_GROUP *, EC_POINT *, const BIGNUM *x, const BIGNUM *y, BN_CTX *); - int (*point_get_affine_coordinates_GFp)(const EC_GROUP *, const EC_POINT *, + int (*point_get_affine_coordinates)(const EC_GROUP *, const EC_POINT *, BIGNUM *x, BIGNUM *y, BN_CTX *); - int (*point_set_compressed_coordinates_GFp)(const EC_GROUP *, EC_POINT *, + int (*point_set_compressed_coordinates)(const EC_GROUP *, EC_POINT *, const BIGNUM *x, int y_bit, BN_CTX *); /* used by EC_POINT_point2oct, EC_POINT_oct2point: */ @@ -114,6 +149,11 @@ struct ec_method_st { int (*dbl)(const EC_GROUP *, EC_POINT *r, const EC_POINT *a, BN_CTX *); int (*invert)(const EC_GROUP *, EC_POINT *, BN_CTX *); + /* used by EC_POINTs_mul, EC_POINT_mul, EC_POINT_precompute_mult: */ + int (*mul)(const EC_GROUP *group, EC_POINT *r, const BIGNUM *scalar, + size_t num, const EC_POINT *points[], const BIGNUM *scalars[], BN_CTX *); + int (*precompute_mult)(EC_GROUP *group, BN_CTX *); + /* used by EC_POINT_is_at_infinity, EC_POINT_is_on_curve, EC_POINT_cmp: */ int (*is_at_infinity)(const EC_GROUP *, const EC_POINT *); int (*is_on_curve)(const EC_GROUP *, const EC_POINT *, BN_CTX *); @@ -126,11 +166,12 @@ struct ec_method_st { /* internal functions */ - /* 'field_mul' and 'field_sqr' can be used by 'add' and 'dbl' so that + /* 'field_mul', 'field_sqr', and 'field_div' can be used by 'add' and 'dbl' so that * the same implementations of point operations can be used with different * optimized implementations of expensive field operations: */ int (*field_mul)(const EC_GROUP *, BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *); int (*field_sqr)(const EC_GROUP *, BIGNUM *r, const BIGNUM *a, BN_CTX *); + int (*field_div)(const EC_GROUP *, BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *); int (*field_encode)(const EC_GROUP *, BIGNUM *r, const BIGNUM *a, BN_CTX *); /* e.g. to Montgomery */ int (*field_decode)(const EC_GROUP *, BIGNUM *r, const BIGNUM *a, BN_CTX *); /* e.g. from Montgomery */ @@ -165,6 +206,12 @@ struct ec_group_st { * irreducible polynomial defining the field. */ + unsigned int poly[5]; /* Field specification for curves over GF(2^m). + * The irreducible f(t) is then of the form: + * t^poly[0] + t^poly[1] + ... + t^poly[k] + * where m = poly[0] > poly[1] > ... > poly[k] = 0. + */ + BIGNUM a, b; /* Curve coefficients. * (Here the assumption is that BIGNUMs can be used * or abused for all kinds of fields, not just GF(p).) @@ -213,13 +260,19 @@ struct ec_point_st { +/* method functions in ec_mult.c */ +int ec_wNAF_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *scalar, + size_t num, const EC_POINT *points[], const BIGNUM *scalars[], BN_CTX *); +int ec_wNAF_precompute_mult(EC_GROUP *group, BN_CTX *); + /* method functions in ecp_smpl.c */ int ec_GFp_simple_group_init(EC_GROUP *); void ec_GFp_simple_group_finish(EC_GROUP *); void ec_GFp_simple_group_clear_finish(EC_GROUP *); int ec_GFp_simple_group_copy(EC_GROUP *, const EC_GROUP *); -int ec_GFp_simple_group_set_curve_GFp(EC_GROUP *, const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *); -int ec_GFp_simple_group_get_curve_GFp(const EC_GROUP *, BIGNUM *p, BIGNUM *a, BIGNUM *b, BN_CTX *); +int ec_GFp_simple_group_set_curve(EC_GROUP *, const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *); +int ec_GFp_simple_group_get_curve(const EC_GROUP *, BIGNUM *p, BIGNUM *a, BIGNUM *b, BN_CTX *); +int ec_GFp_simple_group_get_degree(const EC_GROUP *); int ec_GFp_simple_group_check_discriminant(const EC_GROUP *, BN_CTX *); int ec_GFp_simple_point_init(EC_POINT *); void ec_GFp_simple_point_finish(EC_POINT *); @@ -230,11 +283,11 @@ int ec_GFp_simple_set_Jprojective_coordinates_GFp(const EC_GROUP *, EC_POINT *, const BIGNUM *x, const BIGNUM *y, const BIGNUM *z, BN_CTX *); int ec_GFp_simple_get_Jprojective_coordinates_GFp(const EC_GROUP *, const EC_POINT *, BIGNUM *x, BIGNUM *y, BIGNUM *z, BN_CTX *); -int ec_GFp_simple_point_set_affine_coordinates_GFp(const EC_GROUP *, EC_POINT *, +int ec_GFp_simple_point_set_affine_coordinates(const EC_GROUP *, EC_POINT *, const BIGNUM *x, const BIGNUM *y, BN_CTX *); -int ec_GFp_simple_point_get_affine_coordinates_GFp(const EC_GROUP *, const EC_POINT *, +int ec_GFp_simple_point_get_affine_coordinates(const EC_GROUP *, const EC_POINT *, BIGNUM *x, BIGNUM *y, BN_CTX *); -int ec_GFp_simple_set_compressed_coordinates_GFp(const EC_GROUP *, EC_POINT *, +int ec_GFp_simple_set_compressed_coordinates(const EC_GROUP *, EC_POINT *, const BIGNUM *x, int y_bit, BN_CTX *); size_t ec_GFp_simple_point2oct(const EC_GROUP *, const EC_POINT *, point_conversion_form_t form, unsigned char *buf, size_t len, BN_CTX *); @@ -254,7 +307,7 @@ int ec_GFp_simple_field_sqr(const EC_GROUP *, BIGNUM *r, const BIGNUM *a, BN_CTX /* method functions in ecp_mont.c */ int ec_GFp_mont_group_init(EC_GROUP *); -int ec_GFp_mont_group_set_curve_GFp(EC_GROUP *, const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *); +int ec_GFp_mont_group_set_curve(EC_GROUP *, const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *); void ec_GFp_mont_group_finish(EC_GROUP *); void ec_GFp_mont_group_clear_finish(EC_GROUP *); int ec_GFp_mont_group_copy(EC_GROUP *, const EC_GROUP *); @@ -267,7 +320,7 @@ int ec_GFp_mont_field_set_to_one(const EC_GROUP *, BIGNUM *r, BN_CTX *); /* method functions in ecp_recp.c */ int ec_GFp_recp_group_init(EC_GROUP *); -int ec_GFp_recp_group_set_curve_GFp(EC_GROUP *, const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *); +int ec_GFp_recp_group_set_curve(EC_GROUP *, const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *); void ec_GFp_recp_group_finish(EC_GROUP *); void ec_GFp_recp_group_clear_finish(EC_GROUP *); int ec_GFp_recp_group_copy(EC_GROUP *, const EC_GROUP *); @@ -277,9 +330,52 @@ int ec_GFp_recp_field_sqr(const EC_GROUP *, BIGNUM *r, const BIGNUM *a, BN_CTX * /* method functions in ecp_nist.c */ int ec_GFp_nist_group_init(EC_GROUP *); -int ec_GFp_nist_group_set_curve_GFp(EC_GROUP *, const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *); +int ec_GFp_nist_group_set_curve(EC_GROUP *, const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *); void ec_GFp_nist_group_finish(EC_GROUP *); void ec_GFp_nist_group_clear_finish(EC_GROUP *); int ec_GFp_nist_group_copy(EC_GROUP *, const EC_GROUP *); int ec_GFp_nist_field_mul(const EC_GROUP *, BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *); int ec_GFp_nist_field_sqr(const EC_GROUP *, BIGNUM *r, const BIGNUM *a, BN_CTX *); + + +/* method functions in ec2_smpl.c */ +int ec_GF2m_simple_group_init(EC_GROUP *); +void ec_GF2m_simple_group_finish(EC_GROUP *); +void ec_GF2m_simple_group_clear_finish(EC_GROUP *); +int ec_GF2m_simple_group_copy(EC_GROUP *, const EC_GROUP *); +int ec_GF2m_simple_group_set_curve(EC_GROUP *, const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *); +int ec_GF2m_simple_group_get_curve(const EC_GROUP *, BIGNUM *p, BIGNUM *a, BIGNUM *b, BN_CTX *); +int ec_GF2m_simple_group_get_degree(const EC_GROUP *); +int ec_GF2m_simple_group_check_discriminant(const EC_GROUP *, BN_CTX *); +int ec_GF2m_simple_point_init(EC_POINT *); +void ec_GF2m_simple_point_finish(EC_POINT *); +void ec_GF2m_simple_point_clear_finish(EC_POINT *); +int ec_GF2m_simple_point_copy(EC_POINT *, const EC_POINT *); +int ec_GF2m_simple_point_set_to_infinity(const EC_GROUP *, EC_POINT *); +int ec_GF2m_simple_point_set_affine_coordinates(const EC_GROUP *, EC_POINT *, + const BIGNUM *x, const BIGNUM *y, BN_CTX *); +int ec_GF2m_simple_point_get_affine_coordinates(const EC_GROUP *, const EC_POINT *, + BIGNUM *x, BIGNUM *y, BN_CTX *); +int ec_GF2m_simple_set_compressed_coordinates(const EC_GROUP *, EC_POINT *, + const BIGNUM *x, int y_bit, BN_CTX *); +size_t ec_GF2m_simple_point2oct(const EC_GROUP *, const EC_POINT *, point_conversion_form_t form, + unsigned char *buf, size_t len, BN_CTX *); +int ec_GF2m_simple_oct2point(const EC_GROUP *, EC_POINT *, + const unsigned char *buf, size_t len, BN_CTX *); +int ec_GF2m_simple_add(const EC_GROUP *, EC_POINT *r, const EC_POINT *a, const EC_POINT *b, BN_CTX *); +int ec_GF2m_simple_dbl(const EC_GROUP *, EC_POINT *r, const EC_POINT *a, BN_CTX *); +int ec_GF2m_simple_invert(const EC_GROUP *, EC_POINT *, BN_CTX *); +int ec_GF2m_simple_is_at_infinity(const EC_GROUP *, const EC_POINT *); +int ec_GF2m_simple_is_on_curve(const EC_GROUP *, const EC_POINT *, BN_CTX *); +int ec_GF2m_simple_cmp(const EC_GROUP *, const EC_POINT *a, const EC_POINT *b, BN_CTX *); +int ec_GF2m_simple_make_affine(const EC_GROUP *, EC_POINT *, BN_CTX *); +int ec_GF2m_simple_points_make_affine(const EC_GROUP *, size_t num, EC_POINT *[], BN_CTX *); +int ec_GF2m_simple_field_mul(const EC_GROUP *, BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *); +int ec_GF2m_simple_field_sqr(const EC_GROUP *, BIGNUM *r, const BIGNUM *a, BN_CTX *); +int ec_GF2m_simple_field_div(const EC_GROUP *, BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *); + + +/* method functions in ec2_mult.c */ +int ec_GF2m_mont_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *scalar, + size_t num, const EC_POINT *points[], const BIGNUM *scalars[], BN_CTX *); +int ec_GF2m_mont_precompute_mult(EC_GROUP *group, BN_CTX *ctx); diff --git a/crypto/ec/ec_lib.c b/crypto/ec/ec_lib.c index 751f8c99e0..9669f42aab 100644 --- a/crypto/ec/ec_lib.c +++ b/crypto/ec/ec_lib.c @@ -1,4 +1,7 @@ /* crypto/ec/ec_lib.c */ +/* + * Originally written by Bodo Moeller for the OpenSSL project. + */ /* ==================================================================== * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved. * @@ -52,6 +55,11 @@ * Hudson (tjh@cryptsoft.com). * */ +/* ==================================================================== + * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. + * Binary polynomial ECC support in OpenSSL originally developed by + * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project. + */ #include <string.h> @@ -243,6 +251,28 @@ int EC_GROUP_copy(EC_GROUP *dest, const EC_GROUP *src) } +EC_GROUP *EC_GROUP_dup(const EC_GROUP *a) + { + EC_GROUP *t = NULL; + int ok = 0; + + if (a == NULL) return NULL; + + if ((t = EC_GROUP_new(a->meth)) == NULL) return(NULL); + if (!EC_GROUP_copy(t, a)) goto err; + + ok = 1; + + err: + if (!ok) + { + if (t) EC_GROUP_free(t); + return NULL; + } + else return t; + } + + const EC_METHOD *EC_GROUP_method_of(const EC_GROUP *group) { return group->meth; @@ -380,23 +410,56 @@ size_t EC_GROUP_get_seed_len(const EC_GROUP *group) int EC_GROUP_set_curve_GFp(EC_GROUP *group, const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx) { - if (group->meth->group_set_curve_GFp == 0) + if (group->meth->group_set_curve == 0) { ECerr(EC_F_EC_GROUP_SET_CURVE_GFP, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED); return 0; } - return group->meth->group_set_curve_GFp(group, p, a, b, ctx); + return group->meth->group_set_curve(group, p, a, b, ctx); } int EC_GROUP_get_curve_GFp(const EC_GROUP *group, BIGNUM *p, BIGNUM *a, BIGNUM *b, BN_CTX *ctx) { - if (group->meth->group_get_curve_GFp == 0) + if (group->meth->group_get_curve == 0) { ECerr(EC_F_EC_GROUP_GET_CURVE_GFP, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED); return 0; } - return group->meth->group_get_curve_GFp(group, p, a, b, ctx); + return group->meth->group_get_curve(group, p, a, b, ctx); + } + + +int EC_GROUP_set_curve_GF2m(EC_GROUP *group, const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx) + { + if (group->meth->group_set_curve == 0) + { + ECerr(EC_F_EC_GROUP_SET_CURVE_GF2M, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED); + return 0; + } + return group->meth->group_set_curve(group, p, a, b, ctx); + } + + +int EC_GROUP_get_curve_GF2m(const EC_GROUP *group, BIGNUM *p, BIGNUM *a, BIGNUM *b, BN_CTX *ctx) + { + if (group->meth->group_get_curve == 0) + { + ECerr(EC_F_EC_GROUP_GET_CURVE_GF2M, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED); + return 0; + } + return group->meth->group_get_curve(group, p, a, b, ctx); + } + + +int EC_GROUP_get_degree(const EC_GROUP *group) + { + if (group->meth->group_get_degree == 0) + { + ECerr(EC_F_EC_GROUP_GET_DEGREE, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED); + return 0; + } + return group->meth->group_get_degree(group); } @@ -551,6 +614,25 @@ int EC_POINT_copy(EC_POINT *dest, const EC_POINT *src) } +EC_POINT *EC_POINT_dup(const EC_POINT *a, const EC_GROUP *group) + { + EC_POINT *t; + int r; + + if (a == NULL) return NULL; + + t = EC_POINT_new(group); + if (t == NULL) return(NULL); + r = EC_POINT_copy(t, a); + if (!r) + { + EC_POINT_free(t); + return NULL; + } + else return t; + } + + const EC_METHOD *EC_POINT_method_of(const EC_POINT *point) { return point->meth; @@ -610,7 +692,7 @@ int EC_POINT_get_Jprojective_coordinates_GFp(const EC_GROUP *group, const EC_POI int EC_POINT_set_affine_coordinates_GFp(const EC_GROUP *group, EC_POINT *point, const BIGNUM *x, const BIGNUM *y, BN_CTX *ctx) { - if (group->meth->point_set_affine_coordinates_GFp == 0) + if (group->meth->point_set_affine_coordinates == 0) { ECerr(EC_F_EC_POINT_SET_AFFINE_COORDINATES_GFP, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED); return 0; @@ -620,14 +702,31 @@ int EC_POINT_set_affine_coordinates_GFp(const EC_GROUP *group, EC_POINT *point, ECerr(EC_F_EC_POINT_SET_AFFINE_COORDINATES_GFP, EC_R_INCOMPATIBLE_OBJECTS); return 0; } - return group->meth->point_set_affine_coordinates_GFp(group, point, x, y, ctx); + return group->meth->point_set_affine_coordinates(group, point, x, y, ctx); + } + + +int EC_POINT_set_affine_coordinates_GF2m(const EC_GROUP *group, EC_POINT *point, + const BIGNUM *x, const BIGNUM *y, BN_CTX *ctx) + { + if (group->meth->point_set_affine_coordinates == 0) + { + ECerr(EC_F_EC_POINT_SET_AFFINE_COORDINATES_GF2M, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED); + return 0; + } + if (group->meth != point->meth) + { + ECerr(EC_F_EC_POINT_SET_AFFINE_COORDINATES_GF2M, EC_R_INCOMPATIBLE_OBJECTS); + return 0; + } + return group->meth->point_set_affine_coordinates(group, point, x, y, ctx); } int EC_POINT_get_affine_coordinates_GFp(const EC_GROUP *group, const EC_POINT *point, BIGNUM *x, BIGNUM *y, BN_CTX *ctx) { - if (group->meth->point_get_affine_coordinates_GFp == 0) + if (group->meth->point_get_affine_coordinates == 0) { ECerr(EC_F_EC_POINT_GET_AFFINE_COORDINATES_GFP, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED); return 0; @@ -637,14 +736,31 @@ int EC_POINT_get_affine_coordinates_GFp(const EC_GROUP *group, const EC_POINT *p ECerr(EC_F_EC_POINT_GET_AFFINE_COORDINATES_GFP, EC_R_INCOMPATIBLE_OBJECTS); return 0; } - return group->meth->point_get_affine_coordinates_GFp(group, point, x, y, ctx); + return group->meth->point_get_affine_coordinates(group, point, x, y, ctx); + } + + +int EC_POINT_get_affine_coordinates_GF2m(const EC_GROUP *group, const EC_POINT *point, + BIGNUM *x, BIGNUM *y, BN_CTX *ctx) + { + if (group->meth->point_get_affine_coordinates == 0) + { + ECerr(EC_F_EC_POINT_GET_AFFINE_COORDINATES_GF2M, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED); + return 0; + } + if (group->meth != point->meth) + { + ECerr(EC_F_EC_POINT_GET_AFFINE_COORDINATES_GF2M, EC_R_INCOMPATIBLE_OBJECTS); + return 0; + } + return group->meth->point_get_affine_coordinates(group, point, x, y, ctx); } int EC_POINT_set_compressed_coordinates_GFp(const EC_GROUP *group, EC_POINT *point, const BIGNUM *x, int y_bit, BN_CTX *ctx) { - if (group->meth->point_set_compressed_coordinates_GFp == 0) + if (group->meth->point_set_compressed_coordinates == 0) { ECerr(EC_F_EC_POINT_SET_COMPRESSED_COORDINATES_GFP, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED); return 0; @@ -654,7 +770,24 @@ int EC_POINT_set_compressed_coordinates_GFp(const EC_GROUP *group, EC_POINT *poi ECerr(EC_F_EC_POINT_SET_COMPRESSED_COORDINATES_GFP, EC_R_INCOMPATIBLE_OBJECTS); return 0; } - return group->meth->point_set_compressed_coordinates_GFp(group, point, x, y_bit, ctx); + return group->meth->point_set_compressed_coordinates(group, point, x, y_bit, ctx); + } + + +int EC_POINT_set_compressed_coordinates_GF2m(const EC_GROUP *group, EC_POINT *point, + const BIGNUM *x, int y_bit, BN_CTX *ctx) + { + if (group->meth->point_set_compressed_coordinates == 0) + { + ECerr(EC_F_EC_POINT_SET_COMPRESSED_COORDINATES_GF2M, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED); + return 0; + } + if (group->meth != point->meth) + { + ECerr(EC_F_EC_POINT_SET_COMPRESSED_COORDINATES_GF2M, EC_R_INCOMPATIBLE_OBJECTS); + return 0; + } + return group->meth->point_set_compressed_coordinates(group, point, x, y_bit, ctx); } diff --git a/crypto/ec/ec_mult.c b/crypto/ec/ec_mult.c index 74e1a962df..4978a54352 100644 --- a/crypto/ec/ec_mult.c +++ b/crypto/ec/ec_mult.c @@ -1,4 +1,7 @@ /* crypto/ec/ec_mult.c */ +/* + * Originally written by Bodo Moeller for the OpenSSL project. + */ /* ==================================================================== * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved. * @@ -52,6 +55,11 @@ * Hudson (tjh@cryptsoft.com). * */ +/* ==================================================================== + * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. + * Portions of this software developed by SUN MICROSYSTEMS, INC., + * and contributed to the OpenSSL project. + */ #include <openssl/err.h> @@ -209,7 +217,7 @@ static signed char *compute_wNAF(const BIGNUM *scalar, int w, size_t *ret_len) * scalar*generator * in the addition if scalar != NULL */ -int EC_POINTs_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *scalar, +int ec_wNAF_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *scalar, size_t num, const EC_POINT *points[], const BIGNUM *scalars[], BN_CTX *ctx) { BN_CTX *new_ctx = NULL; @@ -235,7 +243,7 @@ int EC_POINTs_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *scalar, generator = EC_GROUP_get0_generator(group); if (generator == NULL) { - ECerr(EC_F_EC_POINTS_MUL, EC_R_UNDEFINED_GENERATOR); + ECerr(EC_F_EC_WNAF_MUL, EC_R_UNDEFINED_GENERATOR); return 0; } } @@ -244,7 +252,7 @@ int EC_POINTs_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *scalar, { if (group->meth != points[i]->meth) { - ECerr(EC_F_EC_POINTS_MUL, EC_R_INCOMPATIBLE_OBJECTS); + ECerr(EC_F_EC_WNAF_MUL, EC_R_INCOMPATIBLE_OBJECTS); return 0; } } @@ -294,7 +302,7 @@ int EC_POINTs_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *scalar, } if (!(v == val + num_val)) { - ECerr(EC_F_EC_POINTS_MUL, ERR_R_INTERNAL_ERROR); + ECerr(EC_F_EC_WNAF_MUL, ERR_R_INTERNAL_ERROR); goto err; } @@ -438,6 +446,20 @@ int EC_POINTs_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *scalar, } +/* Generic multiplication method. + * If group->meth does not provide a multiplication method, default to ec_wNAF_mul; + * otherwise use the group->meth's multiplication. + */ +int EC_POINTs_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *scalar, + size_t num, const EC_POINT *points[], const BIGNUM *scalars[], BN_CTX *ctx) + { + if (group->meth->mul == 0) + return ec_wNAF_mul(group, r, scalar, num, points, scalars, ctx); + else + return group->meth->mul(group, r, scalar, num, points, scalars, ctx); + } + + int EC_POINT_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *g_scalar, const EC_POINT *point, const BIGNUM *p_scalar, BN_CTX *ctx) { const EC_POINT *points[1]; @@ -450,7 +472,7 @@ int EC_POINT_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *g_scalar, con } -int EC_GROUP_precompute_mult(EC_GROUP *group, BN_CTX *ctx) +int ec_wNAF_precompute_mult(EC_GROUP *group, BN_CTX *ctx) { const EC_POINT *generator; BN_CTX *new_ctx = NULL; @@ -460,7 +482,7 @@ int EC_GROUP_precompute_mult(EC_GROUP *group, BN_CTX *ctx) generator = EC_GROUP_get0_generator(group); if (generator == NULL) { - ECerr(EC_F_EC_GROUP_PRECOMPUTE_MULT, EC_R_UNDEFINED_GENERATOR); + ECerr(EC_F_EC_WNAF_PRECOMPUTE_MULT, EC_R_UNDEFINED_GENERATOR); return 0; } @@ -478,7 +500,7 @@ int EC_GROUP_precompute_mult(EC_GROUP *group, BN_CTX *ctx) if (!EC_GROUP_get_order(group, order, ctx)) return 0; if (BN_is_zero(order)) { - ECerr(EC_F_EC_GROUP_PRECOMPUTE_MULT, EC_R_UNKNOWN_ORDER); + ECerr(EC_F_EC_WNAF_PRECOMPUTE_MULT, EC_R_UNKNOWN_ORDER); goto err; } @@ -492,3 +514,18 @@ int EC_GROUP_precompute_mult(EC_GROUP *group, BN_CTX *ctx) BN_CTX_free(new_ctx); return ret; } + + +/* Generic multiplicaiton precomputation method. + * If group->meth does not provide a multiplication method, default to ec_wNAF_mul and do its + * precomputation; otherwise use the group->meth's precomputation if it exists. + */ +int EC_GROUP_precompute_mult(EC_GROUP *group, BN_CTX *ctx) + { + if (group->meth->mul == 0) + return ec_wNAF_precompute_mult(group, ctx); + else if (group->meth->precompute_mult != 0) + return group->meth->precompute_mult(group, ctx); + else + return 1; + } diff --git a/crypto/ec/ecp_mont.c b/crypto/ec/ecp_mont.c index 75c9f6ed15..900228d8af 100644 --- a/crypto/ec/ecp_mont.c +++ b/crypto/ec/ecp_mont.c @@ -1,4 +1,7 @@ /* crypto/ec/ecp_mont.c */ +/* + * Originally written by Bodo Moeller for the OpenSSL project. + */ /* ==================================================================== * Copyright (c) 1998-2001 The OpenSSL Project. All rights reserved. * @@ -52,6 +55,11 @@ * Hudson (tjh@cryptsoft.com). * */ +/* ==================================================================== + * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. + * Portions of this software developed by SUN MICROSYSTEMS, INC., + * and contributed to the OpenSSL project. + */ #include <openssl/err.h> @@ -66,8 +74,9 @@ const EC_METHOD *EC_GFp_mont_method(void) ec_GFp_mont_group_finish, ec_GFp_mont_group_clear_finish, ec_GFp_mont_group_copy, - ec_GFp_mont_group_set_curve_GFp, - ec_GFp_simple_group_get_curve_GFp, + ec_GFp_mont_group_set_curve, + ec_GFp_simple_group_get_curve, + ec_GFp_simple_group_get_degree, ec_GFp_simple_group_check_discriminant, ec_GFp_simple_point_init, ec_GFp_simple_point_finish, @@ -76,14 +85,16 @@ const EC_METHOD *EC_GFp_mont_method(void) ec_GFp_simple_point_set_to_infinity, ec_GFp_simple_set_Jprojective_coordinates_GFp, ec_GFp_simple_get_Jprojective_coordinates_GFp, - ec_GFp_simple_point_set_affine_coordinates_GFp, - ec_GFp_simple_point_get_affine_coordinates_GFp, - ec_GFp_simple_set_compressed_coordinates_GFp, + ec_GFp_simple_point_set_affine_coordinates, + ec_GFp_simple_point_get_affine_coordinates, + ec_GFp_simple_set_compressed_coordinates, ec_GFp_simple_point2oct, ec_GFp_simple_oct2point, ec_GFp_simple_add, ec_GFp_simple_dbl, ec_GFp_simple_invert, + 0 /* mul */, + 0 /* precompute_mult */, ec_GFp_simple_is_at_infinity, ec_GFp_simple_is_on_curve, ec_GFp_simple_cmp, @@ -91,6 +102,7 @@ const EC_METHOD *EC_GFp_mont_method(void) ec_GFp_simple_points_make_affine, ec_GFp_mont_field_mul, ec_GFp_mont_field_sqr, + 0 /* field_div */, ec_GFp_mont_field_encode, ec_GFp_mont_field_decode, ec_GFp_mont_field_set_to_one }; @@ -110,7 +122,7 @@ int ec_GFp_mont_group_init(EC_GROUP *group) } -int ec_GFp_mont_group_set_curve_GFp(EC_GROUP *group, const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx) +int ec_GFp_mont_group_set_curve(EC_GROUP *group, const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx) { BN_CTX *new_ctx = NULL; BN_MONT_CTX *mont = NULL; @@ -139,7 +151,7 @@ int ec_GFp_mont_group_set_curve_GFp(EC_GROUP *group, const BIGNUM *p, const BIGN if (mont == NULL) goto err; if (!BN_MONT_CTX_set(mont, p, ctx)) { - ECerr(EC_F_GFP_MONT_GROUP_SET_CURVE_GFP, ERR_R_BN_LIB); + ECerr(EC_F_GFP_MONT_GROUP_SET_CURVE, ERR_R_BN_LIB); goto err; } one = BN_new(); @@ -151,7 +163,7 @@ int ec_GFp_mont_group_set_curve_GFp(EC_GROUP *group, const BIGNUM *p, const BIGN group->field_data2 = one; one = NULL; - ret = ec_GFp_simple_group_set_curve_GFp(group, p, a, b, ctx); + ret = ec_GFp_simple_group_set_curve(group, p, a, b, ctx); if (!ret) { diff --git a/crypto/ec/ecp_nist.c b/crypto/ec/ecp_nist.c index 4e37c33cf3..b1c4024c2a 100644 --- a/crypto/ec/ecp_nist.c +++ b/crypto/ec/ecp_nist.c @@ -52,6 +52,11 @@ * Hudson (tjh@cryptsoft.com). * */ +/* ==================================================================== + * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. + * Portions of this software developed by SUN MICROSYSTEMS, INC., + * and contributed to the OpenSSL project. + */ #include "ec_lcl.h" @@ -63,8 +68,9 @@ const EC_METHOD *EC_GFp_nist_method(void) ec_GFp_nist_group_finish, ec_GFp_nist_group_clear_finish, ec_GFp_nist_group_copy, - ec_GFp_nist_group_set_curve_GFp, - ec_GFp_simple_group_get_curve_GFp, + ec_GFp_nist_group_set_curve, + ec_GFp_simple_group_get_curve, + ec_GFp_simple_group_get_degree, ec_GFp_simple_group_set_generator, ec_GFp_simple_group_get0_generator, ec_GFp_simple_group_get_order, @@ -77,14 +83,16 @@ const EC_METHOD *EC_GFp_nist_method(void) ec_GFp_simple_point_set_to_infinity, ec_GFp_simple_set_Jprojective_coordinates_GFp, ec_GFp_simple_get_Jprojective_coordinates_GFp, - ec_GFp_simple_point_set_affine_coordinates_GFp, - ec_GFp_simple_point_get_affine_coordinates_GFp, - ec_GFp_simple_set_compressed_coordinates_GFp, + ec_GFp_simple_point_set_affine_coordinates, + ec_GFp_simple_point_get_affine_coordinates, + ec_GFp_simple_set_compressed_coordinates, ec_GFp_simple_point2oct, ec_GFp_simple_oct2point, ec_GFp_simple_add, ec_GFp_simple_dbl, ec_GFp_simple_invert, + 0 /* mul */, + 0 /* precompute_mult */, ec_GFp_simple_is_at_infinity, ec_GFp_simple_is_on_curve, ec_GFp_simple_cmp, @@ -92,6 +100,7 @@ const EC_METHOD *EC_GFp_nist_method(void) ec_GFp_simple_points_make_affine, ec_GFp_nist_field_mul, ec_GFp_nist_field_sqr, + 0 /* field_div */, 0 /* field_encode */, 0 /* field_decode */, 0 /* field_set_to_one */ }; @@ -111,7 +120,7 @@ int ec_GFp_nist_group_init(EC_GROUP *group) } -int ec_GFp_nist_group_set_curve_GFp(EC_GROUP *group, const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx); +int ec_GFp_nist_group_set_curve(EC_GROUP *group, const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx); /* TODO */ diff --git a/crypto/ec/ecp_recp.c b/crypto/ec/ecp_recp.c index 54d3b83ec4..bf456dbc47 100644 --- a/crypto/ec/ecp_recp.c +++ b/crypto/ec/ecp_recp.c @@ -52,6 +52,11 @@ * Hudson (tjh@cryptsoft.com). * */ +/* ==================================================================== + * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. + * Portions of this software developed by SUN MICROSYSTEMS, INC., + * and contributed to the OpenSSL project. + */ #include "ec_lcl.h" @@ -63,8 +68,9 @@ const EC_METHOD *EC_GFp_recp_method(void) ec_GFp_recp_group_finish, ec_GFp_recp_group_clear_finish, ec_GFp_recp_group_copy, - ec_GFp_recp_group_set_curve_GFp, - ec_GFp_simple_group_get_curve_GFp, + ec_GFp_recp_group_set_curve, + ec_GFp_simple_group_get_curve, + ec_GFp_simple_group_get_degree, ec_GFp_simple_group_set_generator, ec_GFp_simple_group_get0_generator, ec_GFp_simple_group_get_order, @@ -77,14 +83,16 @@ const EC_METHOD *EC_GFp_recp_method(void) ec_GFp_simple_point_set_to_infinity, ec_GFp_simple_set_Jprojective_coordinates_GFp, ec_GFp_simple_get_Jprojective_coordinates_GFp, - ec_GFp_simple_point_set_affine_coordinates_GFp, - ec_GFp_simple_point_get_affine_coordinates_GFp, - ec_GFp_simple_set_compressed_coordinates_GFp, + ec_GFp_simple_point_set_affine_coordinates, + ec_GFp_simple_point_get_affine_coordinates, + ec_GFp_simple_set_compressed_coordinates, ec_GFp_simple_point2oct, ec_GFp_simple_oct2point, ec_GFp_simple_add, ec_GFp_simple_dbl, ec_GFp_simple_invert, + 0 /* mul */, + 0 /* precompute_mult */, ec_GFp_simple_is_at_infinity, ec_GFp_simple_is_on_curve, ec_GFp_simple_cmp, @@ -92,6 +100,7 @@ const EC_METHOD *EC_GFp_recp_method(void) ec_GFp_simple_points_make_affine, ec_GFp_recp_field_mul, ec_GFp_recp_field_sqr, + 0 /* field_div */, 0 /* field_encode */, 0 /* field_decode */, 0 /* field_set_to_one */ }; @@ -110,7 +119,7 @@ int ec_GFp_recp_group_init(EC_GROUP *group) } -int ec_GFp_recp_group_set_curve_GFp(EC_GROUP *group, const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx); +int ec_GFp_recp_group_set_curve(EC_GROUP *group, const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx); /* TODO */ diff --git a/crypto/ec/ecp_smpl.c b/crypto/ec/ecp_smpl.c index a453f4f451..97ff8eb61a 100644 --- a/crypto/ec/ecp_smpl.c +++ b/crypto/ec/ecp_smpl.c @@ -1,6 +1,8 @@ /* crypto/ec/ecp_smpl.c */ /* Includes code written by Lenka Fibikova <fibikova@exp-math.uni-essen.de> - * for the OpenSSL project. */ + * for the OpenSSL project. + * Includes code written by Bodo Moeller for the OpenSSL project. +*/ /* ==================================================================== * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved. * @@ -54,6 +56,11 @@ * Hudson (tjh@cryptsoft.com). * */ +/* ==================================================================== + * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. + * Portions of this software developed by SUN MICROSYSTEMS, INC., + * and contributed to the OpenSSL project. + */ #include <openssl/err.h> #include <openssl/symhacks.h> @@ -68,8 +75,9 @@ const EC_METHOD *EC_GFp_simple_method(void) ec_GFp_simple_group_finish, ec_GFp_simple_group_clear_finish, ec_GFp_simple_group_copy, - ec_GFp_simple_group_set_curve_GFp, - ec_GFp_simple_group_get_curve_GFp, + ec_GFp_simple_group_set_curve, + ec_GFp_simple_group_get_curve, + ec_GFp_simple_group_get_degree, ec_GFp_simple_group_check_discriminant, ec_GFp_simple_point_init, ec_GFp_simple_point_finish, @@ -78,14 +86,16 @@ const EC_METHOD *EC_GFp_simple_method(void) ec_GFp_simple_point_set_to_infinity, ec_GFp_simple_set_Jprojective_coordinates_GFp, ec_GFp_simple_get_Jprojective_coordinates_GFp, - ec_GFp_simple_point_set_affine_coordinates_GFp, - ec_GFp_simple_point_get_affine_coordinates_GFp, - ec_GFp_simple_set_compressed_coordinates_GFp, + ec_GFp_simple_point_set_affine_coordinates, + ec_GFp_simple_point_get_affine_coordinates, + ec_GFp_simple_set_compressed_coordinates, ec_GFp_simple_point2oct, ec_GFp_simple_oct2point, ec_GFp_simple_add, ec_GFp_simple_dbl, ec_GFp_simple_invert, + 0 /* mul */, + 0 /* precompute_mult */, ec_GFp_simple_is_at_infinity, ec_GFp_simple_is_on_curve, ec_GFp_simple_cmp, @@ -93,6 +103,7 @@ const EC_METHOD *EC_GFp_simple_method(void) ec_GFp_simple_points_make_affine, ec_GFp_simple_field_mul, ec_GFp_simple_field_sqr, + 0 /* field_div */, 0 /* field_encode */, 0 /* field_decode */, 0 /* field_set_to_one */ }; @@ -139,7 +150,7 @@ int ec_GFp_simple_group_copy(EC_GROUP *dest, const EC_GROUP *src) } -int ec_GFp_simple_group_set_curve_GFp(EC_GROUP *group, +int ec_GFp_simple_group_set_curve(EC_GROUP *group, const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx) { int ret = 0; @@ -149,7 +160,7 @@ int ec_GFp_simple_group_set_curve_GFp(EC_GROUP *group, /* p must be a prime > 3 */ if (BN_num_bits(p) <= 2 || !BN_is_odd(p)) { - ECerr(EC_F_EC_GFP_SIMPLE_GROUP_SET_CURVE_GFP, EC_R_INVALID_FIELD); + ECerr(EC_F_EC_GFP_SIMPLE_GROUP_SET_CURVE, EC_R_INVALID_FIELD); return 0; } @@ -194,7 +205,7 @@ int ec_GFp_simple_group_set_curve_GFp(EC_GROUP *group, } -int ec_GFp_simple_group_get_curve_GFp(const EC_GROUP *group, BIGNUM *p, BIGNUM *a, BIGNUM *b, BN_CTX *ctx) +int ec_GFp_simple_group_get_curve(const EC_GROUP *group, BIGNUM *p, BIGNUM *a, BIGNUM *b, BN_CTX *ctx) { int ret = 0; BN_CTX *new_ctx = NULL; @@ -245,6 +256,12 @@ int ec_GFp_simple_group_get_curve_GFp(const EC_GROUP *group, BIGNUM *p, BIGNUM * } +int ec_GFp_simple_group_get_degree(const EC_GROUP *group) + { + return BN_num_bits(&group->field); + } + + int ec_GFp_simple_group_check_discriminant(const EC_GROUP *group, BN_CTX *ctx) { int ret = 0; @@ -470,13 +487,13 @@ int ec_GFp_simple_get_Jprojective_coordinates_GFp(const EC_GROUP *group, const E } -int ec_GFp_simple_point_set_affine_coordinates_GFp(const EC_GROUP *group, EC_POINT *point, +int ec_GFp_simple_point_set_affine_coordinates(const EC_GROUP *group, EC_POINT *point, const BIGNUM *x, const BIGNUM *y, BN_CTX *ctx) { if (x == NULL || y == NULL) { /* unlike for projective coordinates, we do not tolerate this */ - ECerr(EC_F_EC_GFP_SIMPLE_POINT_SET_AFFINE_COORDINATES_GFP, ERR_R_PASSED_NULL_PARAMETER); + ECerr(EC_F_EC_GFP_SIMPLE_POINT_SET_AFFINE_COORDINATES, ERR_R_PASSED_NULL_PARAMETER); return 0; } @@ -484,7 +501,7 @@ int ec_GFp_simple_point_set_affine_coordinates_GFp(const EC_GROUP *group, EC_POI } -int ec_GFp_simple_point_get_affine_coordinates_GFp(const EC_GROUP *group, const EC_POINT *point, +int ec_GFp_simple_point_get_affine_coordinates(const EC_GROUP *group, const EC_POINT *point, BIGNUM *x, BIGNUM *y, BN_CTX *ctx) { BN_CTX *new_ctx = NULL; @@ -494,7 +511,7 @@ int ec_GFp_simple_point_get_affine_coordinates_GFp(const EC_GROUP *group, const if (EC_POINT_is_at_infinity(group, point)) { - ECerr(EC_F_EC_GFP_SIMPLE_POINT_GET_AFFINE_COORDINATES_GFP, EC_R_POINT_AT_INFINITY); + ECerr(EC_F_EC_GFP_SIMPLE_POINT_GET_AFFINE_COORDINATES, EC_R_POINT_AT_INFINITY); return 0; } @@ -545,7 +562,7 @@ int ec_GFp_simple_point_get_affine_coordinates_GFp(const EC_GROUP *group, const { if (!BN_mod_inverse(Z_1, Z_, &group->field, ctx)) { - ECerr(EC_F_EC_GFP_SIMPLE_POINT_GET_AFFINE_COORDINATES_GFP, ERR_R_BN_LIB); + ECerr(EC_F_EC_GFP_SIMPLE_POINT_GET_AFFINE_COORDINATES, ERR_R_BN_LIB); goto err; } @@ -599,7 +616,7 @@ int ec_GFp_simple_point_get_affine_coordinates_GFp(const EC_GROUP *group, const } -int ec_GFp_simple_set_compressed_coordinates_GFp(const EC_GROUP *group, EC_POINT *point, +int ec_GFp_simple_set_compressed_coordinates(const EC_GROUP *group, EC_POINT *point, const BIGNUM *x_, int y_bit, BN_CTX *ctx) { BN_CTX *new_ctx = NULL; @@ -682,14 +699,12 @@ int ec_GFp_simple_set_compressed_coordinates_GFp(const EC_GROUP *group, EC_POINT if (ERR_GET_LIB(err) == ERR_LIB_BN && ERR_GET_REASON(err) == BN_R_NOT_A_SQUARE) { (void)ERR_get_error(); - ECerr(EC_F_EC_GFP_SIMPLE_SET_COMPRESSED_COORDINATES_GFP, EC_R_INVALID_COMPRESSED_POINT); + ECerr(EC_F_EC_GFP_SIMPLE_SET_COMPRESSED_COORDINATES, EC_R_INVALID_COMPRESSED_POINT); } else - ECerr(EC_F_EC_GFP_SIMPLE_SET_COMPRESSED_COORDINATES_GFP, ERR_R_BN_LIB); + ECerr(EC_F_EC_GFP_SIMPLE_SET_COMPRESSED_COORDINATES, ERR_R_BN_LIB); goto err; } - /* If tmp1 is not a square (i.e. there is no point on the curve with - * our x), then y now is a nonsense value too */ if (y_bit != BN_is_odd(y)) { @@ -701,16 +716,17 @@ int ec_GFp_simple_set_compressed_coordinates_GFp(const EC_GROUP *group, EC_POINT if (kron == -2) goto err; if (kron == 1) - ECerr(EC_F_EC_GFP_SIMPLE_SET_COMPRESSED_COORDINATES_GFP, EC_R_INVALID_COMPRESSION_BIT); + ECerr(EC_F_EC_GFP_SIMPLE_SET_COMPRESSED_COORDINATES, EC_R_INVALID_COMPRESSION_BIT); else - ECerr(EC_F_EC_GFP_SIMPLE_SET_COMPRESSED_COORDINATES_GFP, EC_R_INVALID_COMPRESSED_POINT); + /* BN_mod_sqrt() should have cought this error (not a square) */ + ECerr(EC_F_EC_GFP_SIMPLE_SET_COMPRESSED_COORDINATES, EC_R_INVALID_COMPRESSED_POINT); goto err; } if (!BN_usub(y, &group->field, y)) goto err; } if (y_bit != BN_is_odd(y)) { - ECerr(EC_F_EC_GFP_SIMPLE_SET_COMPRESSED_COORDINATES_GFP, ERR_R_INTERNAL_ERROR); + ECerr(EC_F_EC_GFP_SIMPLE_SET_COMPRESSED_COORDINATES, ERR_R_INTERNAL_ERROR); goto err; } diff --git a/crypto/ec/ectest.c b/crypto/ec/ectest.c index eab46cc080..adf7c94bdb 100644 --- a/crypto/ec/ectest.c +++ b/crypto/ec/ectest.c @@ -1,4 +1,7 @@ /* crypto/ec/ectest.c */ +/* + * Originally written by Bodo Moeller for the OpenSSL project. + */ /* ==================================================================== * Copyright (c) 1998-2001 The OpenSSL Project. All rights reserved. * @@ -52,6 +55,32 @@ * Hudson (tjh@cryptsoft.com). * */ +/* ==================================================================== + * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. + * + * Portions of the attached software ("Contribution") are developed by + * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project. + * + * The Contribution is licensed pursuant to the OpenSSL open source + * license provided above. + * + * In addition, Sun covenants to all licensees who provide a reciprocal + * covenant with respect to their own patents if any, not to sue under + * current and future patent claims necessarily infringed by the making, + * using, practicing, selling, offering for sale and/or otherwise + * disposing of the Contribution as delivered hereunder + * (or portions thereof), provided that such covenant shall not apply: + * 1) for code that a licensee deletes from the Contribution; + * 2) separates from the Contribution; or + * 3) for infringements caused by: + * i) the modification of the Contribution or + * ii) the combination of the Contribution with other software or + * devices where such combination causes the infringement. + * + * The elliptic curve binary polynomial software is originally written by + * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories. + * + */ #include <stdio.h> #include <stdlib.h> @@ -67,6 +96,7 @@ int main(int argc, char * argv[]) { puts("Elliptic curves are disabled."); retur #include <openssl/ec.h> #include <openssl/engine.h> #include <openssl/err.h> +#include <openssl/obj_mac.h> #define ABORT do { \ fflush(stdout); \ @@ -75,42 +105,48 @@ int main(int argc, char * argv[]) { puts("Elliptic curves are disabled."); retur exit(1); \ } while (0) +void prime_field_tests(void); +void char2_field_tests(void); + #if 0 static void timings(EC_GROUP *group, int multi, BN_CTX *ctx) { clock_t clck; int i, j; - BIGNUM *s, *s0; + BIGNUM *s; + BIGNUM *r[10], *r0[10]; EC_POINT *P; s = BN_new(); - s0 = BN_new(); - if (s == NULL || s0 == NULL) ABORT; + if (s == NULL) ABORT; - if (!EC_GROUP_get_curve_GFp(group, s, NULL, NULL, ctx)) ABORT; - fprintf(stdout, "Timings for %d bit prime, ", (int)BN_num_bits(s)); + fprintf(stdout, "Timings for %d-bit field, ", EC_GROUP_get_degree(group)); if (!EC_GROUP_get_order(group, s, ctx)) ABORT; - fprintf(stdout, "%d bit scalars ", (int)BN_num_bits(s)); + fprintf(stdout, "%d-bit scalars ", (int)BN_num_bits(s)); fflush(stdout); P = EC_POINT_new(group); if (P == NULL) ABORT; EC_POINT_copy(P, EC_GROUP_get0_generator(group)); - clck = clock(); for (i = 0; i < 10; i++) { - if (!BN_pseudo_rand(s, BN_num_bits(s), 0, 0)) ABORT; + if ((r[i] = BN_new()) == NULL) ABORT; + if (!BN_pseudo_rand(r[i], BN_num_bits(s), 0, 0)) ABORT; if (multi) { - if (!BN_pseudo_rand(s0, BN_num_bits(s), 0, 0)) ABORT; + if ((r0[i] = BN_new()) == NULL) ABORT; + if (!BN_pseudo_rand(r0[i], BN_num_bits(s), 0, 0)) ABORT; } + } + + clck = clock(); + for (i = 0; i < 10; i++) + { for (j = 0; j < 10; j++) { - if (!EC_POINT_mul(group, P, s, multi ? P : NULL, multi ? s0 : NULL, ctx)) ABORT; + if (!EC_POINT_mul(group, P, r[i], multi ? P : NULL, multi ? r0[i] : NULL, ctx)) ABORT; } - fprintf(stdout, "."); - fflush(stdout); } fprintf(stdout, "\n"); @@ -136,11 +172,15 @@ static void timings(EC_GROUP *group, int multi, BN_CTX *ctx) EC_POINT_free(P); BN_free(s); - BN_free(s0); + for (i = 0; i < 10; i++) + { + BN_free(r[i]); + if (multi) BN_free(r0[i]); + } } #endif -int main(int argc, char *argv[]) +void prime_field_tests() { BN_CTX *ctx = NULL; BIGNUM *p, *a, *b; @@ -152,20 +192,6 @@ int main(int argc, char *argv[]) size_t i, len; int k; - /* enable memory leak checking unless explicitly disabled */ - if (!((getenv("OPENSSL_DEBUG_MEMORY") != NULL) && (0 == strcmp(getenv("OPENSSL_DEBUG_MEMORY"), "off")))) - { - CRYPTO_malloc_debug_init(); - CRYPTO_set_mem_debug_options(V_CRYPTO_MDEBUG_ALL); - } - else - { - /* OPENSSL_DEBUG_MEMORY=off */ - CRYPTO_set_mem_debug_functions(0, 0, 0, 0, 0); - } - CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ON); - ERR_load_crypto_strings(); - #if 1 /* optional */ ctx = BN_CTX_new(); if (!ctx) ABORT; @@ -333,6 +359,10 @@ int main(int argc, char *argv[]) /* G_y value taken from the standard: */ if (!BN_hex2bn(&z, "07192B95FFC8DA78631011ED6B24CDD573F977A11E794811")) ABORT; if (0 != BN_cmp(y, z)) ABORT; + + fprintf(stdout, "verify degree ..."); + if (EC_GROUP_get_degree(group) != 192) ABORT; + fprintf(stdout, " ok\n"); fprintf(stdout, "verify group order ..."); fflush(stdout); @@ -374,6 +404,10 @@ int main(int argc, char *argv[]) if (!BN_hex2bn(&z, "BD376388B5F723FB4C22DFE6CD4375A05A07476444D5819985007E34")) ABORT; if (0 != BN_cmp(y, z)) ABORT; + fprintf(stdout, "verify degree ..."); + if (EC_GROUP_get_degree(group) != 224) ABORT; + fprintf(stdout, " ok\n"); + fprintf(stdout, "verify group order ..."); fflush(stdout); if (!EC_GROUP_get_order(group, z, ctx)) ABORT; @@ -415,6 +449,10 @@ int main(int argc, char *argv[]) if (!BN_hex2bn(&z, "4FE342E2FE1A7F9B8EE7EB4A7C0F9E162BCE33576B315ECECBB6406837BF51F5")) ABORT; if (0 != BN_cmp(y, z)) ABORT; + fprintf(stdout, "verify degree ..."); + if (EC_GROUP_get_degree(group) != 256) ABORT; + fprintf(stdout, " ok\n"); + fprintf(stdout, "verify group order ..."); fflush(stdout); if (!EC_GROUP_get_order(group, z, ctx)) ABORT; @@ -461,6 +499,10 @@ int main(int argc, char *argv[]) "7CE9DA3113B5F0B8C00A60B1CE1D7E819D7A431D7C90EA0E5F")) ABORT; if (0 != BN_cmp(y, z)) ABORT; + fprintf(stdout, "verify degree ..."); + if (EC_GROUP_get_degree(group) != 384) ABORT; + fprintf(stdout, " ok\n"); + fprintf(stdout, "verify group order ..."); fflush(stdout); if (!EC_GROUP_get_order(group, z, ctx)) ABORT; @@ -513,6 +555,10 @@ int main(int argc, char *argv[]) "7086A272C24088BE94769FD16650")) ABORT; if (0 != BN_cmp(y, z)) ABORT; + fprintf(stdout, "verify degree ..."); + if (EC_GROUP_get_degree(group) != 521) ABORT; + fprintf(stdout, " ok\n"); + fprintf(stdout, "verify group order ..."); fflush(stdout); if (!EC_GROUP_get_order(group, z, ctx)) ABORT; @@ -623,6 +669,514 @@ int main(int argc, char *argv[]) if (P_384) EC_GROUP_free(P_384); if (P_521) EC_GROUP_free(P_521); + } + +/* Change test based on whether binary point compression is enabled or not. */ +#ifdef OPENSSL_EC_BIN_PT_COMP +#define CHAR2_CURVE_TEST_INTERNAL(_name, _p, _a, _b, _x, _y, _y_bit, _order, _cof, _degree, _variable) \ + if (!BN_hex2bn(&x, _x)) ABORT; \ + if (!EC_POINT_set_compressed_coordinates_GF2m(group, P, x, _y_bit, ctx)) ABORT; \ + if (!EC_POINT_is_on_curve(group, P, ctx)) ABORT; \ + if (!BN_hex2bn(&z, _order)) ABORT; \ + if (!BN_hex2bn(&cof, _cof)) ABORT; \ + if (!EC_GROUP_set_generator(group, P, z, cof)) ABORT; \ + if (!EC_POINT_get_affine_coordinates_GF2m(group, P, x, y, ctx)) ABORT; \ + fprintf(stdout, "\n%s -- Generator:\n x = 0x", _name); \ + BN_print_fp(stdout, x); \ + fprintf(stdout, "\n y = 0x"); \ + BN_print_fp(stdout, y); \ + fprintf(stdout, "\n"); \ + /* G_y value taken from the standard: */ \ + if (!BN_hex2bn(&z, _y)) ABORT; \ + if (0 != BN_cmp(y, z)) ABORT; +#else +#define CHAR2_CURVE_TEST_INTERNAL(_name, _p, _a, _b, _x, _y, _y_bit, _order, _cof, _degree, _variable) \ + if (!BN_hex2bn(&x, _x)) ABORT; \ + if (!BN_hex2bn(&y, _y)) ABORT; \ + if (!EC_POINT_set_affine_coordinates_GF2m(group, P, x, y, ctx)) ABORT; \ + if (!EC_POINT_is_on_curve(group, P, ctx)) ABORT; \ + if (!BN_hex2bn(&z, _order)) ABORT; \ + if (!BN_hex2bn(&cof, _cof)) ABORT; \ + if (!EC_GROUP_set_generator(group, P, z, cof)) ABORT; \ + fprintf(stdout, "\n%s -- Generator:\n x = 0x", _name); \ + BN_print_fp(stdout, x); \ + fprintf(stdout, "\n y = 0x"); \ + BN_print_fp(stdout, y); \ + fprintf(stdout, "\n"); +#endif + +#define CHAR2_CURVE_TEST(_name, _p, _a, _b, _x, _y, _y_bit, _order, _cof, _degree, _variable) \ + if (!BN_hex2bn(&p, _p)) ABORT; \ + if (!BN_hex2bn(&a, _a)) ABORT; \ + if (!BN_hex2bn(&b, _b)) ABORT; \ + if (!EC_GROUP_set_curve_GF2m(group, p, a, b, ctx)) ABORT; \ + CHAR2_CURVE_TEST_INTERNAL(_name, _p, _a, _b, _x, _y, _y_bit, _order, _cof, _degree, _variable) \ + fprintf(stdout, "verify degree ..."); \ + if (EC_GROUP_get_degree(group) != _degree) ABORT; \ + fprintf(stdout, " ok\n"); \ + fprintf(stdout, "verify group order ..."); \ + fflush(stdout); \ + if (!EC_GROUP_get_order(group, z, ctx)) ABORT; \ + if (!EC_POINT_mul(group, Q, z, NULL, NULL, ctx)) ABORT; \ + if (!EC_POINT_is_at_infinity(group, Q)) ABORT; \ + fprintf(stdout, "."); \ + fflush(stdout); \ + if (!EC_GROUP_precompute_mult(group, ctx)) ABORT; \ + if (!EC_POINT_mul(group, Q, z, NULL, NULL, ctx)) ABORT; \ + if (!EC_POINT_is_at_infinity(group, Q)) ABORT; \ + fprintf(stdout, " ok\n"); \ + if (!(_variable = EC_GROUP_new(EC_GROUP_method_of(group)))) ABORT; \ + if (!EC_GROUP_copy(_variable, group)) ABORT; + +void char2_field_tests() + { + BN_CTX *ctx = NULL; + BIGNUM *p, *a, *b; + EC_GROUP *group; + EC_GROUP *C2_K163 = NULL, *C2_K233 = NULL, *C2_K283 = NULL, *C2_K409 = NULL, *C2_K571 = NULL; + EC_GROUP *C2_B163 = NULL, *C2_B233 = NULL, *C2_B283 = NULL, *C2_B409 = NULL, *C2_B571 = NULL; + EC_POINT *P, *Q, *R; + BIGNUM *x, *y, *z, *cof; + unsigned char buf[100]; + size_t i, len; + int k; + +#if 1 /* optional */ + ctx = BN_CTX_new(); + if (!ctx) ABORT; +#endif + + p = BN_new(); + a = BN_new(); + b = BN_new(); + if (!p || !a || !b) ABORT; + + if (!BN_hex2bn(&p, "13")) ABORT; + if (!BN_hex2bn(&a, "3")) ABORT; + if (!BN_hex2bn(&b, "1")) ABORT; + + group = EC_GROUP_new(EC_GF2m_simple_method()); /* applications should use EC_GROUP_new_curve_GF2m + * so that the library gets to choose the EC_METHOD */ + if (!group) ABORT; + if (!EC_GROUP_set_curve_GF2m(group, p, a, b, ctx)) ABORT; + + { + EC_GROUP *tmp; + tmp = EC_GROUP_new(EC_GROUP_method_of(group)); + if (!tmp) ABORT; + if (!EC_GROUP_copy(tmp, group)); + EC_GROUP_free(group); + group = tmp; + } + + if (!EC_GROUP_get_curve_GF2m(group, p, a, b, ctx)) ABORT; + + fprintf(stdout, "Curve defined by Weierstrass equation\n y^2 + x*y = x^3 + a*x^2 + b (mod 0x"); + BN_print_fp(stdout, p); + fprintf(stdout, ")\n a = 0x"); + BN_print_fp(stdout, a); + fprintf(stdout, "\n b = 0x"); + BN_print_fp(stdout, b); + fprintf(stdout, "\n(0x... means binary polynomial)\n"); + + P = EC_POINT_new(group); + Q = EC_POINT_new(group); + R = EC_POINT_new(group); + if (!P || !Q || !R) ABORT; + + if (!EC_POINT_set_to_infinity(group, P)) ABORT; + if (!EC_POINT_is_at_infinity(group, P)) ABORT; + + buf[0] = 0; + if (!EC_POINT_oct2point(group, Q, buf, 1, ctx)) ABORT; + + if (!EC_POINT_add(group, P, P, Q, ctx)) ABORT; + if (!EC_POINT_is_at_infinity(group, P)) ABORT; + + x = BN_new(); + y = BN_new(); + z = BN_new(); + cof = BN_new(); + if (!x || !y || !z || !cof) ABORT; + + if (!BN_hex2bn(&x, "6")) ABORT; +/* Change test based on whether binary point compression is enabled or not. */ +#ifdef OPENSSL_EC_BIN_PT_COMP + if (!EC_POINT_set_compressed_coordinates_GF2m(group, Q, x, 1, ctx)) ABORT; +#else + if (!BN_hex2bn(&y, "8")) ABORT; + if (!EC_POINT_set_affine_coordinates_GF2m(group, Q, x, y, ctx)) ABORT; +#endif + if (!EC_POINT_is_on_curve(group, Q, ctx)) + { +/* Change test based on whether binary point compression is enabled or not. */ +#ifdef OPENSSL_EC_BIN_PT_COMP + if (!EC_POINT_get_affine_coordinates_GF2m(group, Q, x, y, ctx)) ABORT; +#endif + fprintf(stderr, "Point is not on curve: x = 0x"); + BN_print_fp(stderr, x); + fprintf(stderr, ", y = 0x"); + BN_print_fp(stderr, y); + fprintf(stderr, "\n"); + ABORT; + } + + fprintf(stdout, "A cyclic subgroup:\n"); + k = 100; + do + { + if (k-- == 0) ABORT; + + if (EC_POINT_is_at_infinity(group, P)) + fprintf(stdout, " point at infinity\n"); + else + { + if (!EC_POINT_get_affine_coordinates_GF2m(group, P, x, y, ctx)) ABORT; + + fprintf(stdout, " x = 0x"); + BN_print_fp(stdout, x); + fprintf(stdout, ", y = 0x"); + BN_print_fp(stdout, y); + fprintf(stdout, "\n"); + } + + if (!EC_POINT_copy(R, P)) ABORT; + if (!EC_POINT_add(group, P, P, Q, ctx)) ABORT; + } + while (!EC_POINT_is_at_infinity(group, P)); + + if (!EC_POINT_add(group, P, Q, R, ctx)) ABORT; + if (!EC_POINT_is_at_infinity(group, P)) ABORT; + +/* Change test based on whether binary point compression is enabled or not. */ +#ifdef OPENSSL_EC_BIN_PT_COMP + len = EC_POINT_point2oct(group, Q, POINT_CONVERSION_COMPRESSED, buf, sizeof buf, ctx); + if (len == 0) ABORT; + if (!EC_POINT_oct2point(group, P, buf, len, ctx)) ABORT; + if (0 != EC_POINT_cmp(group, P, Q, ctx)) ABORT; + fprintf(stdout, "Generator as octet string, compressed form:\n "); + for (i = 0; i < len; i++) fprintf(stdout, "%02X", buf[i]); +#endif + + len = EC_POINT_point2oct(group, Q, POINT_CONVERSION_UNCOMPRESSED, buf, sizeof buf, ctx); + if (len == 0) ABORT; + if (!EC_POINT_oct2point(group, P, buf, len, ctx)) ABORT; + if (0 != EC_POINT_cmp(group, P, Q, ctx)) ABORT; + fprintf(stdout, "\nGenerator as octet string, uncompressed form:\n "); + for (i = 0; i < len; i++) fprintf(stdout, "%02X", buf[i]); + +/* Change test based on whether binary point compression is enabled or not. */ +#ifdef OPENSSL_EC_BIN_PT_COMP + len = EC_POINT_point2oct(group, Q, POINT_CONVERSION_HYBRID, buf, sizeof buf, ctx); + if (len == 0) ABORT; + if (!EC_POINT_oct2point(group, P, buf, len, ctx)) ABORT; + if (0 != EC_POINT_cmp(group, P, Q, ctx)) ABORT; + fprintf(stdout, "\nGenerator as octet string, hybrid form:\n "); + for (i = 0; i < len; i++) fprintf(stdout, "%02X", buf[i]); +#endif + + fprintf(stdout, "\n"); + + if (!EC_POINT_invert(group, P, ctx)) ABORT; + if (0 != EC_POINT_cmp(group, P, R, ctx)) ABORT; + + + /* Curve K-163 (FIPS PUB 186-2, App. 6) */ + CHAR2_CURVE_TEST + ( + "NIST curve K-163", + "0800000000000000000000000000000000000000C9", + "1", + "1", + "02FE13C0537BBC11ACAA07D793DE4E6D5E5C94EEE8", + "0289070FB05D38FF58321F2E800536D538CCDAA3D9", + 1, + "04000000000000000000020108A2E0CC0D99F8A5EF", + "2", + 163, + C2_K163 + ); + + /* Curve B-163 (FIPS PUB 186-2, App. 6) */ + CHAR2_CURVE_TEST + ( + "NIST curve B-163", + "0800000000000000000000000000000000000000C9", + "1", + "020A601907B8C953CA1481EB10512F78744A3205FD", + "03F0EBA16286A2D57EA0991168D4994637E8343E36", + "00D51FBC6C71A0094FA2CDD545B11C5C0C797324F1", + 1, + "040000000000000000000292FE77E70C12A4234C33", + "2", + 163, + C2_B163 + ); + + /* Curve K-233 (FIPS PUB 186-2, App. 6) */ + CHAR2_CURVE_TEST + ( + "NIST curve K-233", + "020000000000000000000000000000000000000004000000000000000001", + "0", + "1", + "017232BA853A7E731AF129F22FF4149563A419C26BF50A4C9D6EEFAD6126", + "01DB537DECE819B7F70F555A67C427A8CD9BF18AEB9B56E0C11056FAE6A3", + 0, + "008000000000000000000000000000069D5BB915BCD46EFB1AD5F173ABDF", + "4", + 233, + C2_K233 + ); + + /* Curve B-233 (FIPS PUB 186-2, App. 6) */ + CHAR2_CURVE_TEST + ( + "NIST curve B-233", + "020000000000000000000000000000000000000004000000000000000001", + "000000000000000000000000000000000000000000000000000000000001", + "0066647EDE6C332C7F8C0923BB58213B333B20E9CE4281FE115F7D8F90AD", + "00FAC9DFCBAC8313BB2139F1BB755FEF65BC391F8B36F8F8EB7371FD558B", + "01006A08A41903350678E58528BEBF8A0BEFF867A7CA36716F7E01F81052", + 1, + "01000000000000000000000000000013E974E72F8A6922031D2603CFE0D7", + "2", + 233, + C2_B233 + ); + + /* Curve K-283 (FIPS PUB 186-2, App. 6) */ + CHAR2_CURVE_TEST + ( + "NIST curve K-283", + "0800000000000000000000000000000000000000000000000000000000000000000010A1", + "0", + "1", + "0503213F78CA44883F1A3B8162F188E553CD265F23C1567A16876913B0C2AC2458492836", + "01CCDA380F1C9E318D90F95D07E5426FE87E45C0E8184698E45962364E34116177DD2259", + 0, + "01FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE9AE2ED07577265DFF7F94451E061E163C61", + "4", + 283, + C2_K283 + ); + + /* Curve B-283 (FIPS PUB 186-2, App. 6) */ + CHAR2_CURVE_TEST + ( + "NIST curve B-283", + "0800000000000000000000000000000000000000000000000000000000000000000010A1", + "000000000000000000000000000000000000000000000000000000000000000000000001", + "027B680AC8B8596DA5A4AF8A19A0303FCA97FD7645309FA2A581485AF6263E313B79A2F5", + "05F939258DB7DD90E1934F8C70B0DFEC2EED25B8557EAC9C80E2E198F8CDBECD86B12053", + "03676854FE24141CB98FE6D4B20D02B4516FF702350EDDB0826779C813F0DF45BE8112F4", + 1, + "03FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEF90399660FC938A90165B042A7CEFADB307", + "2", + 283, + C2_B283 + ); + + /* Curve K-409 (FIPS PUB 186-2, App. 6) */ + CHAR2_CURVE_TEST + ( + "NIST curve K-409", + "02000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000001", + "0", + "1", + "0060F05F658F49C1AD3AB1890F7184210EFD0987E307C84C27ACCFB8F9F67CC2C460189EB5AAAA62EE222EB1B35540CFE9023746", + "01E369050B7C4E42ACBA1DACBF04299C3460782F918EA427E6325165E9EA10E3DA5F6C42E9C55215AA9CA27A5863EC48D8E0286B", + 1, + "007FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE5F83B2D4EA20400EC4557D5ED3E3E7CA5B4B5C83B8E01E5FCF", + "4", + 409, + C2_K409 + ); + + /* Curve B-409 (FIPS PUB 186-2, App. 6) */ + CHAR2_CURVE_TEST + ( + "NIST curve B-409", + "02000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000001", + "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001", + "0021A5C2C8EE9FEB5C4B9A753B7B476B7FD6422EF1F3DD674761FA99D6AC27C8A9A197B272822F6CD57A55AA4F50AE317B13545F", + "015D4860D088DDB3496B0C6064756260441CDE4AF1771D4DB01FFE5B34E59703DC255A868A1180515603AEAB60794E54BB7996A7", + "0061B1CFAB6BE5F32BBFA78324ED106A7636B9C5A7BD198D0158AA4F5488D08F38514F1FDF4B4F40D2181B3681C364BA0273C706", + 1, + "010000000000000000000000000000000000000000000000000001E2AAD6A612F33307BE5FA47C3C9E052F838164CD37D9A21173", + "2", + 409, + C2_B409 + ); + + /* Curve K-571 (FIPS PUB 186-2, App. 6) */ + CHAR2_CURVE_TEST + ( + "NIST curve K-571", + "80000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000425", + "0", + "1", + "026EB7A859923FBC82189631F8103FE4AC9CA2970012D5D46024804801841CA44370958493B205E647DA304DB4CEB08CBBD1BA39494776FB988B47174DCA88C7E2945283A01C8972", + "0349DC807F4FBF374F4AEADE3BCA95314DD58CEC9F307A54FFC61EFC006D8A2C9D4979C0AC44AEA74FBEBBB9F772AEDCB620B01A7BA7AF1B320430C8591984F601CD4C143EF1C7A3", + 0, + "020000000000000000000000000000000000000000000000000000000000000000000000131850E1F19A63E4B391A8DB917F4138B630D84BE5D639381E91DEB45CFE778F637C1001", + "4", + 571, + C2_K571 + ); + + /* Curve B-571 (FIPS PUB 186-2, App. 6) */ + CHAR2_CURVE_TEST + ( + "NIST curve B-571", + "80000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000425", + "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001", + "02F40E7E2221F295DE297117B7F3D62F5C6A97FFCB8CEFF1CD6BA8CE4A9A18AD84FFABBD8EFA59332BE7AD6756A66E294AFD185A78FF12AA520E4DE739BACA0C7FFEFF7F2955727A", + "0303001D34B856296C16C0D40D3CD7750A93D1D2955FA80AA5F40FC8DB7B2ABDBDE53950F4C0D293CDD711A35B67FB1499AE60038614F1394ABFA3B4C850D927E1E7769C8EEC2D19", + "037BF27342DA639B6DCCFFFEB73D69D78C6C27A6009CBBCA1980F8533921E8A684423E43BAB08A576291AF8F461BB2A8B3531D2F0485C19B16E2F1516E23DD3C1A4827AF1B8AC15B", + 1, + "03FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE661CE18FF55987308059B186823851EC7DD9CA1161DE93D5174D66E8382E9BB2FE84E47", + "2", + 571, + C2_B571 + ); + + /* more tests using the last curve */ + + if (!EC_POINT_copy(Q, P)) ABORT; + if (EC_POINT_is_at_infinity(group, Q)) ABORT; + if (!EC_POINT_dbl(group, P, P, ctx)) ABORT; + if (!EC_POINT_is_on_curve(group, P, ctx)) ABORT; + if (!EC_POINT_invert(group, Q, ctx)) ABORT; /* P = -2Q */ + + if (!EC_POINT_add(group, R, P, Q, ctx)) ABORT; + if (!EC_POINT_add(group, R, R, Q, ctx)) ABORT; + if (!EC_POINT_is_at_infinity(group, R)) ABORT; /* R = P + 2Q */ + + { + const EC_POINT *points[3]; + const BIGNUM *scalars[3]; + + if (EC_POINT_is_at_infinity(group, Q)) ABORT; + points[0] = Q; + points[1] = Q; + points[2] = Q; + + if (!BN_add(y, z, BN_value_one())) ABORT; + if (BN_is_odd(y)) ABORT; + if (!BN_rshift1(y, y)) ABORT; + scalars[0] = y; /* (group order + 1)/2, so y*Q + y*Q = Q */ + scalars[1] = y; + + fprintf(stdout, "combined multiplication ..."); + fflush(stdout); + + /* z is still the group order */ + if (!EC_POINTs_mul(group, P, NULL, 2, points, scalars, ctx)) ABORT; + if (!EC_POINTs_mul(group, R, z, 2, points, scalars, ctx)) ABORT; + if (0 != EC_POINT_cmp(group, P, R, ctx)) ABORT; + if (0 != EC_POINT_cmp(group, R, Q, ctx)) ABORT; + + fprintf(stdout, "."); + fflush(stdout); + + if (!BN_pseudo_rand(y, BN_num_bits(y), 0, 0)) ABORT; + if (!BN_add(z, z, y)) ABORT; + z->neg = 1; + scalars[0] = y; + scalars[1] = z; /* z = -(order + y) */ + + if (!EC_POINTs_mul(group, P, NULL, 2, points, scalars, ctx)) ABORT; + if (!EC_POINT_is_at_infinity(group, P)) ABORT; + + fprintf(stdout, "."); + fflush(stdout); + + if (!BN_pseudo_rand(x, BN_num_bits(y) - 1, 0, 0)) ABORT; + if (!BN_add(z, x, y)) ABORT; + z->neg = 1; + scalars[0] = x; + scalars[1] = y; + scalars[2] = z; /* z = -(x+y) */ + + if (!EC_POINTs_mul(group, P, NULL, 3, points, scalars, ctx)) ABORT; + if (!EC_POINT_is_at_infinity(group, P)) ABORT; + + fprintf(stdout, " ok\n\n"); + } + + +#if 0 + timings(C2_K163, 0, ctx); + timings(C2_K163, 1, ctx); + timings(C2_B163, 0, ctx); + timings(C2_B163, 1, ctx); + timings(C2_K233, 0, ctx); + timings(C2_K233, 1, ctx); + timings(C2_B233, 0, ctx); + timings(C2_B233, 1, ctx); + timings(C2_K283, 0, ctx); + timings(C2_K283, 1, ctx); + timings(C2_B283, 0, ctx); + timings(C2_B283, 1, ctx); + timings(C2_K409, 0, ctx); + timings(C2_K409, 1, ctx); + timings(C2_B409, 0, ctx); + timings(C2_B409, 1, ctx); + timings(C2_K571, 0, ctx); + timings(C2_K571, 1, ctx); + timings(C2_B571, 0, ctx); + timings(C2_B571, 1, ctx); +#endif + + + if (ctx) + BN_CTX_free(ctx); + BN_free(p); BN_free(a); BN_free(b); + EC_GROUP_free(group); + EC_POINT_free(P); + EC_POINT_free(Q); + EC_POINT_free(R); + BN_free(x); BN_free(y); BN_free(z); BN_free(cof); + + if (C2_K163) EC_GROUP_free(C2_K163); + if (C2_B163) EC_GROUP_free(C2_B163); + if (C2_K233) EC_GROUP_free(C2_K233); + if (C2_B233) EC_GROUP_free(C2_B233); + if (C2_K283) EC_GROUP_free(C2_K283); + if (C2_B283) EC_GROUP_free(C2_B283); + if (C2_K409) EC_GROUP_free(C2_K409); + if (C2_B409) EC_GROUP_free(C2_B409); + if (C2_K571) EC_GROUP_free(C2_K571); + if (C2_B571) EC_GROUP_free(C2_B571); + + } + +static const char rnd_seed[] = "string to make the random number generator think it has entropy"; + +int main(int argc, char *argv[]) + { + + /* enable memory leak checking unless explicitly disabled */ + if (!((getenv("OPENSSL_DEBUG_MEMORY") != NULL) && (0 == strcmp(getenv("OPENSSL_DEBUG_MEMORY"), "off")))) + { + CRYPTO_malloc_debug_init(); + CRYPTO_set_mem_debug_options(V_CRYPTO_MDEBUG_ALL); + } + else + { + /* OPENSSL_DEBUG_MEMORY=off */ + CRYPTO_set_mem_debug_functions(0, 0, 0, 0, 0); + } + CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ON); + ERR_load_crypto_strings(); + + RAND_seed(rnd_seed, sizeof rnd_seed); /* or BN_generate_prime may fail */ + + prime_field_tests(); + puts(""); + char2_field_tests(); + ENGINE_cleanup(); CRYPTO_cleanup_all_ex_data(); ERR_free_strings(); diff --git a/crypto/ecdsa/Makefile.ssl b/crypto/ecdsa/Makefile.ssl index 85049bc39b..35e42803a9 100644 --- a/crypto/ecdsa/Makefile.ssl +++ b/crypto/ecdsa/Makefile.ssl @@ -23,11 +23,9 @@ TEST=ecdsatest.c APPS= LIB=$(TOP)/libcrypto.a -LIBSRC= ecs_lib.c ecs_gen.c ecs_asn1.c ecs_ossl.c ecs_sign.c ecs_vrf.c \ - ecs_key.c ecs_err.c +LIBSRC= ecs_lib.c ecs_asn1.c ecs_ossl.c ecs_sign.c ecs_vrf.c ecs_err.c -LIBOBJ= ecs_lib.o ecs_gen.o ecs_asn1.o ecs_ossl.o ecs_sign.o ecs_vrf.o \ - ecs_key.o ecs_err.o +LIBOBJ= ecs_lib.o ecs_asn1.o ecs_ossl.o ecs_sign.o ecs_vrf.o ecs_err.o SRC= $(LIBSRC) @@ -82,80 +80,63 @@ clean: # DO NOT DELETE THIS LINE -- make depend depends on it. -ecs_asn1.o: ../../e_os.h ../../include/openssl/asn1.h -ecs_asn1.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -ecs_asn1.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +ecs_asn1.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h +ecs_asn1.o: ../../include/openssl/bio.h ../../include/openssl/bn.h ecs_asn1.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h ecs_asn1.o: ../../include/openssl/ec.h ../../include/openssl/err.h ecs_asn1.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h ecs_asn1.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h ecs_asn1.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h -ecs_asn1.o: ../../include/openssl/symhacks.h ../cryptlib.h ecdsa.h ecs_asn1.c -ecs_err.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -ecs_err.o: ../../include/openssl/bio.h ../../include/openssl/bn.h -ecs_err.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h -ecs_err.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h -ecs_err.o: ../../include/openssl/err.h ../../include/openssl/lhash.h -ecs_err.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h -ecs_err.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h -ecs_err.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h -ecs_err.o: ecs_err.c -ecs_gen.o: ecs_gen.c -ecs_key.o: ../../e_os.h ../../include/openssl/asn1.h -ecs_key.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -ecs_key.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -ecs_key.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h -ecs_key.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h -ecs_key.o: ../../include/openssl/err.h ../../include/openssl/lhash.h -ecs_key.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h -ecs_key.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h -ecs_key.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h -ecs_key.o: ../cryptlib.h ecs_key.c -ecs_lib.o: ../../e_os.h ../../include/openssl/asn1.h -ecs_lib.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -ecs_lib.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -ecs_lib.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h -ecs_lib.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -ecs_lib.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +ecs_asn1.o: ../../include/openssl/symhacks.h ecdsa.h ecs_asn1.c +ecs_err.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +ecs_err.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h +ecs_err.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +ecs_err.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h +ecs_err.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +ecs_err.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +ecs_err.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +ecs_err.o: ../../include/openssl/symhacks.h ecs_err.c +ecs_lib.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +ecs_lib.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h +ecs_lib.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +ecs_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +ecs_lib.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h ecs_lib.o: ../../include/openssl/engine.h ../../include/openssl/err.h ecs_lib.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h ecs_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h ecs_lib.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h ecs_lib.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h -ecs_lib.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h -ecs_lib.o: ../cryptlib.h ecdsa.h ecs_lib.c -ecs_ossl.o: ../../e_os.h ../../include/openssl/asn1.h -ecs_ossl.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -ecs_ossl.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -ecs_ossl.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h -ecs_ossl.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +ecs_lib.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h ecdsa.h +ecs_lib.o: ecs_lib.c +ecs_ossl.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +ecs_ossl.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h +ecs_ossl.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h ecs_ossl.o: ../../include/openssl/err.h ../../include/openssl/lhash.h -ecs_ossl.o: ../../include/openssl/opensslconf.h +ecs_ossl.o: ../../include/openssl/obj_mac.h ../../include/openssl/opensslconf.h ecs_ossl.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h ecs_ossl.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h -ecs_ossl.o: ../../include/openssl/symhacks.h ../cryptlib.h ecs_ossl.c -ecs_sign.o: ../../e_os.h ../../include/openssl/asn1.h -ecs_sign.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -ecs_sign.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -ecs_sign.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h -ecs_sign.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -ecs_sign.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +ecs_ossl.o: ../../include/openssl/symhacks.h ecdsa.h ecs_ossl.c +ecs_sign.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +ecs_sign.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h +ecs_sign.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +ecs_sign.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +ecs_sign.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h ecs_sign.o: ../../include/openssl/engine.h ../../include/openssl/err.h ecs_sign.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h ecs_sign.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h ecs_sign.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h ecs_sign.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h -ecs_sign.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h -ecs_sign.o: ../cryptlib.h ecs_sign.c -ecs_vrf.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -ecs_vrf.o: ../../include/openssl/bio.h ../../include/openssl/bn.h -ecs_vrf.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h -ecs_vrf.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -ecs_vrf.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +ecs_sign.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h ecdsa.h +ecs_sign.o: ecs_sign.c +ecs_vrf.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +ecs_vrf.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h +ecs_vrf.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +ecs_vrf.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +ecs_vrf.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h ecs_vrf.o: ../../include/openssl/engine.h ../../include/openssl/err.h ecs_vrf.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h ecs_vrf.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h ecs_vrf.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h ecs_vrf.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h -ecs_vrf.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +ecs_vrf.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h ecdsa.h ecs_vrf.o: ecs_vrf.c diff --git a/crypto/ecdsa/ecdsa.h b/crypto/ecdsa/ecdsa.h index f9a34f14ae..d72d0b1363 100644 --- a/crypto/ecdsa/ecdsa.h +++ b/crypto/ecdsa/ecdsa.h @@ -59,22 +59,14 @@ #error ECDSA is disabled. #endif -#ifndef OPENSSL_NO_BIO -#include <openssl/bio.h> -#endif #include <openssl/bn.h> #include <openssl/ec.h> -#include <openssl/crypto.h> #include <openssl/ossl_typ.h> -#include <openssl/asn1.h> -#include <openssl/asn1t.h> #ifdef __cplusplus extern "C" { #endif -typedef struct ecdsa_st ECDSA; - typedef struct ECDSA_SIG_st { BIGNUM *r; @@ -84,111 +76,70 @@ typedef struct ECDSA_SIG_st typedef struct ecdsa_method { const char *name; - ECDSA_SIG *(*ecdsa_do_sign)(const unsigned char *dgst, int dgst_len, ECDSA *ecdsa); - int (*ecdsa_sign_setup)(ECDSA *ecdsa, BN_CTX *ctx, BIGNUM **kinv, BIGNUM **r); - int (*ecdsa_do_verify)(const unsigned char *dgst, int dgst_len, ECDSA_SIG *sig, ECDSA *ecdsa); - int (*init)(ECDSA *ecdsa); - int (*finish)(ECDSA *ecdsa); + ECDSA_SIG *(*ecdsa_do_sign)(const unsigned char *dgst, int dgst_len, + EC_KEY *eckey); + int (*ecdsa_sign_setup)(EC_KEY *eckey, BN_CTX *ctx, BIGNUM **kinv, + BIGNUM **r); + int (*ecdsa_do_verify)(const unsigned char *dgst, int dgst_len, + ECDSA_SIG *sig, EC_KEY *eckey); +#if 0 + int (*init)(EC_KEY *eckey); + int (*finish)(EC_KEY *eckey); +#endif int flags; char *app_data; } ECDSA_METHOD; -struct ecdsa_st -{ - int version; - point_conversion_form_t conversion_form; - - EC_GROUP *group; - - EC_POINT *pub_key; - BIGNUM *priv_key; - - BIGNUM *kinv; /* signing pre-calc */ - BIGNUM *r; /* signing pre-calc */ - - int references; +typedef struct ecdsa_data_st { + /* EC_KEY_METH_DATA part */ + int (*init)(EC_KEY *); + void (*finish)(EC_KEY *); + /* method specific part */ + BIGNUM *kinv; /* signing pre-calc */ + BIGNUM *r; /* signing pre-calc */ + ENGINE *engine; int flags; - CRYPTO_EX_DATA ex_data; const ECDSA_METHOD *meth; - struct engine_st *engine; -}; + CRYPTO_EX_DATA ex_data; +} ECDSA_DATA; +/* signature functions */ ECDSA_SIG *ECDSA_SIG_new(void); void ECDSA_SIG_free(ECDSA_SIG *a); int i2d_ECDSA_SIG(const ECDSA_SIG *a, unsigned char **pp); ECDSA_SIG *d2i_ECDSA_SIG(ECDSA_SIG **v, const unsigned char **pp, long length); -ECDSA_SIG *ECDSA_do_sign(const unsigned char *dgst, int dgst_len, ECDSA *ecdsa); -int ECDSA_do_verify(const unsigned char *dgst, int dgst_len, ECDSA_SIG *sig, ECDSA* ecdsa); -int ECDSA_generate_key(ECDSA *ecdsa); -int ECDSA_check_key(ECDSA *ecdsa); +/* ECDSA_DATA functions */ +ECDSA_DATA *ECDSA_DATA_new(void); +ECDSA_DATA *ECDSA_DATA_new_method(ENGINE *); +void ECDSA_DATA_free(ECDSA_DATA *); + +ECDSA_DATA *ecdsa_check(EC_KEY *); + +ECDSA_SIG *ECDSA_do_sign(const unsigned char *dgst, int dgst_len, EC_KEY *); +int ECDSA_do_verify(const unsigned char *dgst, int dgst_len, ECDSA_SIG + *sig, EC_KEY* eckey); const ECDSA_METHOD *ECDSA_OpenSSL(void); void ECDSA_set_default_method(const ECDSA_METHOD *); const ECDSA_METHOD *ECDSA_get_default_method(void); -int ECDSA_set_method(ECDSA *, const ECDSA_METHOD *); - -ECDSA *ECDSA_new(void); -ECDSA *ECDSA_new_method(ENGINE *engine); -int ECDSA_size(const ECDSA *); -int ECDSA_sign_setup(ECDSA *ecdsa, BN_CTX *ctx, BIGNUM **kinv, BIGNUM **rp); -int ECDSA_sign(int type, const unsigned char *dgst, int dgst_len, unsigned char *sig, - unsigned int *siglen, ECDSA *ecdsa); -int ECDSA_verify(int type, const unsigned char *dgst, int dgst_len, const unsigned char *sig, - int sig_len, ECDSA *ecdsa); -int ECDSA_up_ref(ECDSA *ecdsa); -void ECDSA_free(ECDSA *a); -int ECDSA_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func, - CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func); -int ECDSA_set_ex_data(ECDSA *d, int idx, void *arg); -void *ECDSA_get_ex_data(ECDSA *d, int idx); - -#ifndef OPENSSL_NO_BIO -int ECDSAParameters_print(BIO *bp, const ECDSA *x); -int ECDSA_print(BIO *bp, const ECDSA *x, int off); -#endif -#ifndef OPENSSL_NO_FP_API -int ECDSAParameters_print_fp(FILE *fp, const ECDSA *x); -int ECDSA_print_fp(FILE *fp, const ECDSA *x, int off); -#endif - -/* The ECDSA_{set|get}_conversion_type() functions set/get the - * conversion form for ec-points (see ec.h) in a ECDSA-structure */ -void ECDSA_set_conversion_form(ECDSA *, const point_conversion_form_t); -point_conversion_form_t ECDSA_get_conversion_form(const ECDSA *); -/* The ECDSA_{set|get}_default_conversion_form() functions set/get the - * default conversion form */ -void ECDSA_set_default_conversion_form(const point_conversion_form_t); -point_conversion_form_t ECDSA_get_default_conversion_form(void); - -/* the basic de- and encode functions ( see ecs_asn1.c ) */ -ECDSA *d2i_ECDSAParameters(ECDSA **a, const unsigned char **in, long len); -int i2d_ECDSAParameters(ECDSA *a, unsigned char **out); +int ECDSA_set_method(EC_KEY *, const ECDSA_METHOD *); -ECDSA *d2i_ECDSAPrivateKey(ECDSA **a, const unsigned char **in, long len); -int i2d_ECDSAPrivateKey(ECDSA *a, unsigned char **out); +int ECDSA_size(const EC_KEY *); +int ECDSA_sign_setup(EC_KEY *eckey, BN_CTX *ctx, BIGNUM **kinv, + BIGNUM **rp); +int ECDSA_sign(int type, const unsigned char *dgst, int dgst_len, + unsigned char *sig, unsigned int *siglen, EC_KEY *eckey); +int ECDSA_verify(int type, const unsigned char *dgst, int dgst_len, + const unsigned char *sig, int sig_len, EC_KEY *eckey); -/* ECDSAPublicKey_set_octet_string() sets the public key in the ECDSA-structure. - * (*a) must be a pointer to a ECDSA-structure with (*a)->group not zero - * (e.g. a ECDSA-structure with a valid EC_GROUP-structure) */ -ECDSA *ECDSAPublicKey_set_octet_string(ECDSA **a, const unsigned char **in, long len); -/* ECDSAPublicKey_get_octet_string() returns the length of the octet string encoding - * of the public key. If out != NULL then the function returns in *out - * a pointer to the octet string */ -int ECDSAPublicKey_get_octet_string(ECDSA *a, unsigned char **out); +int ECDSA_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new + *new_func, CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func); +int ECDSA_set_ex_data(EC_KEY *d, int idx, void *arg); +void *ECDSA_get_ex_data(EC_KEY *d, int idx); -#define ECDSAParameters_dup(x) (ECDSA *)ASN1_dup((int (*)())i2d_ECDSAParameters, \ - (char *(*)())d2i_ECDSAParameters,(char *)(x)) -#define d2i_ECDSAParameters_fp(fp,x) (ECDSA *)ASN1_d2i_fp((char *(*)())ECDSA_new, \ - (char *(*)())d2i_ECDSAParameters,(fp),(unsigned char **)(x)) -#define i2d_ECDSAParameters_fp(fp,x) ASN1_i2d_fp(i2d_ECDSAParameters,(fp), \ - (unsigned char *)(x)) -#define d2i_ECDSAParameters_bio(bp,x) (ECDSA *)ASN1_d2i_bio((char *(*)())ECDSA_new, \ - (char *(*)())d2i_ECDSAParameters,(bp),(unsigned char **)(x)) -#define i2d_ECDSAParameters_bio(bp,x) ASN1_i2d_bio(i2d_ECDSAParameters,(bp), \ - (unsigned char *)(x)) /* BEGIN ERROR CODES */ /* The following lines are auto generated by the script mkerr.pl. Any changes @@ -199,72 +150,18 @@ void ERR_load_ECDSA_strings(void); /* Error codes for the ECDSA functions. */ /* Function codes. */ -#define ECDSA_F_D2I_ECDSAPARAMETERS 100 -#define ECDSA_F_D2I_ECDSAPRIVATEKEY 101 -#define ECDSA_F_ECDSAPARAMETERS_PRINT 102 -#define ECDSA_F_ECDSAPARAMETERS_PRINT_FP 103 -#define ECDSA_F_ECDSA_DO_SIGN 104 -#define ECDSA_F_ECDSA_DO_VERIFY 105 -#define ECDSA_F_ECDSA_GENERATE_KEY 106 -#define ECDSA_F_ECDSA_GET 107 -#define ECDSA_F_ECDSA_GET_CURVE_NID 120 -#define ECDSA_F_ECDSA_GET_ECDSA 121 -#define ECDSA_F_ECDSA_GET_EC_PARAMETERS 122 -#define ECDSA_F_ECDSA_GET_X9_62_CURVE 108 -#define ECDSA_F_ECDSA_GET_X9_62_EC_PARAMETERS 109 -#define ECDSA_F_ECDSA_GET_X9_62_FIELDID 110 -#define ECDSA_F_ECDSA_NEW 111 -#define ECDSA_F_ECDSA_PRINT 112 -#define ECDSA_F_ECDSA_PRINT_FP 113 -#define ECDSA_F_ECDSA_SET_GROUP_P 114 -#define ECDSA_F_ECDSA_SET_PRIME_GROUP 123 -#define ECDSA_F_ECDSA_SIGN_SETUP 115 -#define ECDSA_F_I2D_ECDSAPARAMETERS 116 -#define ECDSA_F_I2D_ECDSAPRIVATEKEY 117 -#define ECDSA_F_I2D_ECDSAPUBLICKEY 118 -#define ECDSA_F_SIG_CB 119 +#define ECDSA_F_ECDSA_DATA_NEW 100 +#define ECDSA_F_ECDSA_DO_SIGN 101 +#define ECDSA_F_ECDSA_DO_VERIFY 102 +#define ECDSA_F_ECDSA_SIGN_SETUP 103 /* Reason codes. */ #define ECDSA_R_BAD_SIGNATURE 100 -#define ECDSA_R_CAN_NOT_GET_GENERATOR 101 -#define ECDSA_R_D2I_ECDSAPRIVATEKEY_MISSING_PRIVATE_KEY 102 -#define ECDSA_R_D2I_ECDSA_PRIVATEKEY_FAILURE 103 -#define ECDSA_R_D2I_EC_PARAMETERS_FAILURE 133 -#define ECDSA_R_D2I_X9_62_EC_PARAMETERS_FAILURE 104 -#define ECDSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE 105 -#define ECDSA_R_ECDSAPRIVATEKEY_NEW_FAILURE 106 -#define ECDSA_R_ECDSA_F_ECDSA_NEW 107 -#define ECDSA_R_ECDSA_GET_EC_PARAMETERS_FAILURE 134 -#define ECDSA_R_ECDSA_GET_FAILURE 108 -#define ECDSA_R_ECDSA_GET_X9_62_CURVE_FAILURE 109 -#define ECDSA_R_ECDSA_GET_X9_62_EC_PARAMETERS_FAILURE 110 -#define ECDSA_R_ECDSA_GET_X9_62_FIELDID_FAILURE 111 -#define ECDSA_R_ECDSA_NEW_FAILURE 112 -#define ECDSA_R_ECDSA_R_D2I_EC_PARAMETERS_FAILURE 135 -#define ECDSA_R_ECDSA_R_D2I_X9_62_EC_PARAMETERS_FAILURE 113 -#define ECDSA_R_ECPARAMETERS2ECDSA_FAILURE 138 -#define ECDSA_R_EC_GROUP_NID2CURVE_FAILURE 136 -#define ECDSA_R_ERR_EC_LIB 114 -#define ECDSA_R_I2D_ECDSA_PRIVATEKEY 115 -#define ECDSA_R_I2D_ECDSA_PUBLICKEY 116 -#define ECDSA_R_MISSING_PARAMETERS 117 -#define ECDSA_R_MISSING_PRIVATE_KEY 139 -#define ECDSA_R_NOT_SUPPORTED 118 -#define ECDSA_R_NO_CURVE_PARAMETER_A_SPECIFIED 119 -#define ECDSA_R_NO_CURVE_PARAMETER_B_SPECIFIED 120 -#define ECDSA_R_NO_CURVE_SPECIFIED 121 -#define ECDSA_R_NO_FIELD_SPECIFIED 122 -#define ECDSA_R_PRIME_MISSING 123 -#define ECDSA_R_RANDOM_NUMBER_GENERATION_FAILED 124 -#define ECDSA_R_SIGNATURE_MALLOC_FAILED 125 -#define ECDSA_R_UNEXPECTED_ASN1_TYPE 126 -#define ECDSA_R_UNEXPECTED_PARAMETER 127 -#define ECDSA_R_UNEXPECTED_PARAMETER_LENGTH 128 -#define ECDSA_R_UNEXPECTED_VERSION_NUMER 129 -#define ECDSA_R_UNKNOWN_PARAMETERS_TYPE 137 -#define ECDSA_R_WRONG_FIELD_IDENTIFIER 130 -#define ECDSA_R_X9_62_CURVE_NEW_FAILURE 131 -#define ECDSA_R_X9_62_EC_PARAMETERS_NEW_FAILURE 132 +#define ECDSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE 101 +#define ECDSA_R_ERR_EC_LIB 102 +#define ECDSA_R_MISSING_PARAMETERS 103 +#define ECDSA_R_RANDOM_NUMBER_GENERATION_FAILED 104 +#define ECDSA_R_SIGNATURE_MALLOC_FAILED 105 #ifdef __cplusplus } diff --git a/crypto/ecdsa/ecdsatest.c b/crypto/ecdsa/ecdsatest.c index cffc194928..b410fd68af 100644 --- a/crypto/ecdsa/ecdsatest.c +++ b/crypto/ecdsa/ecdsatest.c @@ -52,6 +52,33 @@ * Hudson (tjh@cryptsoft.com). * */ +/* ==================================================================== + * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. + * + * Portions of the attached software ("Contribution") are developed by + * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project. + * + * The Contribution is licensed pursuant to the OpenSSL open source + * license provided above. + * + * In addition, Sun covenants to all licensees who provide a reciprocal + * covenant with respect to their own patents if any, not to sue under + * current and future patent claims necessarily infringed by the making, + * using, practicing, selling, offering for sale and/or otherwise + * disposing of the Contribution as delivered hereunder + * (or portions thereof), provided that such covenant shall not apply: + * 1) for code that a licensee deletes from the Contribution; + * 2) separates from the Contribution; or + * 3) for infringements caused by: + * i) the modification of the Contribution or + * ii) the combination of the Contribution with other software or + * devices where such combination causes the infringement. + * + * The elliptic curve binary polynomial software is originally written by + * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems Laboratories. + * + */ + #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -89,7 +116,16 @@ static const char rnd_seed[] = "string to make the random number generator think ECDSA_SIG* signatures[ECDSA_NIST_TESTS]; unsigned char digest[ECDSA_NIST_TESTS][20]; -void clear_ecdsa(ECDSA *ecdsa) +/* some declarations */ +void clear_ecdsa(EC_KEY *); +int set_p192_param(EC_KEY *); +int set_p239_param(EC_KEY *); +int test_sig_vrf(EC_KEY *, const unsigned char *); +int test_x962_sig_vrf(EC_KEY *, const unsigned char *, + const char *, const char *, const char *); +int ecdsa_cmp(const EC_KEY *, const EC_KEY *); + +void clear_ecdsa(EC_KEY *ecdsa) { if (!ecdsa) return; @@ -110,7 +146,7 @@ void clear_ecdsa(ECDSA *ecdsa) } } -int set_p192_param(ECDSA *ecdsa) +int set_p192_param(EC_KEY *ecdsa) { BN_CTX *ctx=NULL; int ret=0; @@ -143,7 +179,7 @@ err : if (ctx) BN_CTX_free(ctx); return ret; } -int set_p239_param(ECDSA *ecdsa) +int set_p239_param(EC_KEY *ecdsa) { BN_CTX *ctx=NULL; int ret=0; @@ -176,7 +212,7 @@ err : if (ctx) BN_CTX_free(ctx); return ret; } -int test_sig_vrf(ECDSA *ecdsa, const unsigned char* dgst) +int test_sig_vrf(EC_KEY *ecdsa, const unsigned char* dgst) { int ret=0,type=0; unsigned char *buffer=NULL; @@ -216,7 +252,7 @@ err: OPENSSL_free(buffer); return(ret == 1); } -int test_x962_sig_vrf(ECDSA *ecdsa, const unsigned char *dgst, +int test_x962_sig_vrf(EC_KEY *eckey, const unsigned char *dgst, const char *k_in, const char *r_in, const char *s_in) { int ret=0; @@ -225,23 +261,28 @@ int test_x962_sig_vrf(ECDSA *ecdsa, const unsigned char *dgst, BIGNUM *r=NULL,*s=NULL,*k=NULL,*x=NULL,*y=NULL,*m=NULL,*ord=NULL; BN_CTX *ctx=NULL; char *tmp_char=NULL; - - if (!ecdsa || !ecdsa->group || !ecdsa->pub_key || !ecdsa->priv_key) + ECDSA_DATA *ecdsa = ecdsa_check(eckey);; + + if (!eckey || !eckey->group || !eckey->pub_key || !eckey->priv_key + || !ecdsa) return 0; - if ((point = EC_POINT_new(ecdsa->group)) == NULL) goto err; - if ((r = BN_new()) == NULL || (s = BN_new()) == NULL || (k = BN_new()) == NULL || - (x = BN_new()) == NULL || (y = BN_new()) == NULL || (m = BN_new()) == NULL || - (ord = BN_new()) == NULL) goto err; + if ((point = EC_POINT_new(eckey->group)) == NULL) goto err; + if ((r = BN_new()) == NULL || (s = BN_new()) == NULL + || (k = BN_new()) == NULL || (x = BN_new()) == NULL || + (y = BN_new()) == NULL || (m = BN_new()) == NULL || + (ord = BN_new()) == NULL) goto err; if ((ctx = BN_CTX_new()) == NULL) goto err; if (!BN_bin2bn(dgst, 20, m)) goto err; if (!BN_dec2bn(&k, k_in)) goto err; - if (!EC_POINT_mul(ecdsa->group, point, k, NULL, NULL, ctx)) goto err; - if (!EC_POINT_get_affine_coordinates_GFp(ecdsa->group, point, x, y, ctx)) goto err; - if (!EC_GROUP_get_order(ecdsa->group, ord, ctx)) goto err; + if (!EC_POINT_mul(eckey->group, point, k, NULL, NULL, ctx)) goto err; + if (!EC_POINT_get_affine_coordinates_GFp(eckey->group, point, x, y, + ctx)) goto err; + if (!EC_GROUP_get_order(eckey->group, ord, ctx)) goto err; if ((ecdsa->r = BN_dup(x)) == NULL) goto err; - if ((ecdsa->kinv = BN_mod_inverse(NULL, k, ord, ctx)) == NULL) goto err; + if ((ecdsa->kinv = BN_mod_inverse(NULL, k, ord, ctx)) == NULL) + goto err; - if ((sig = ECDSA_do_sign(dgst, 20, ecdsa)) == NULL) + if ((sig = ECDSA_do_sign(dgst, 20, eckey)) == NULL) { BIO_printf(bio_err,"ECDSA_do_sign() failed \n"); goto err; @@ -260,7 +301,7 @@ int test_x962_sig_vrf(ECDSA *ecdsa, const unsigned char *dgst, BIO_printf(bio_err,"sig->s = %s\n",tmp_char); goto err; } - ret = ECDSA_do_verify(dgst, 20, sig, ecdsa); + ret = ECDSA_do_verify(dgst, 20, sig, eckey); if (ret != 1) { BIO_printf(bio_err,"ECDSA_do_verify : signature verification failed \n"); @@ -282,7 +323,7 @@ err : if (r) BN_free(r); return(ret == 1); } -int ecdsa_cmp(const ECDSA *a, const ECDSA *b) +int ecdsa_cmp(const EC_KEY *a, const EC_KEY *b) { int ret=1; BN_CTX *ctx=NULL; @@ -316,7 +357,7 @@ err: if (tmp_a1) BN_free(tmp_a1); int main(void) { - ECDSA *ecdsa=NULL, *ret_ecdsa=NULL; + EC_KEY *ecdsa=NULL, *ret_ecdsa=NULL; BIGNUM *d=NULL; X509_PUBKEY *x509_pubkey=NULL; PKCS8_PRIV_KEY_INFO *pkcs8=NULL; @@ -351,41 +392,41 @@ int main(void) RAND_seed(rnd_seed, sizeof(rnd_seed)); - if ((ecdsa = ECDSA_new()) == NULL) goto err; + if ((ecdsa = EC_KEY_new()) == NULL) goto err; set_p192_param(ecdsa); - ECDSA_print(bio_err, ecdsa, 0); + EC_KEY_print(bio_err, ecdsa, 0); /* en- decode tests */ - /* i2d_ - d2i_ECDSAParameters() */ + /* i2d_ - d2i_ECParameters() */ BIO_printf(bio_err, "\nTesting i2d_ - d2i_ECDSAParameters \n"); - buf_len = i2d_ECDSAParameters(ecdsa, NULL); + buf_len = i2d_ECParameters(ecdsa, NULL); if (!buf_len || (buffer = OPENSSL_malloc(buf_len)) == NULL) goto err; pp = buffer; - if (!i2d_ECDSAParameters(ecdsa, &pp)) goto err; + if (!i2d_ECParameters(ecdsa, &pp)) goto err; pp = buffer; - if ((ret_ecdsa = d2i_ECDSAParameters(&ret_ecdsa, (const unsigned char **)&pp, + if ((ret_ecdsa = d2i_ECParameters(&ret_ecdsa, (const unsigned char **)&pp, buf_len)) == NULL) goto err; - ECDSAParameters_print(bio_err, ret_ecdsa); + ECParameters_print(bio_err, ret_ecdsa); if (ecdsa_cmp(ecdsa, ret_ecdsa)) goto err; OPENSSL_free(buffer); buffer = NULL; - ECDSA_free(ret_ecdsa); + EC_KEY_free(ret_ecdsa); ret_ecdsa = NULL; - /* i2d_ - d2i_ECDSAPrivateKey() */ + /* i2d_ - d2i_ECPrivateKey() */ BIO_printf(bio_err, "\nTesting i2d_ - d2i_ECDSAPrivateKey \n"); - buf_len = i2d_ECDSAPrivateKey(ecdsa, NULL); + buf_len = i2d_ECPrivateKey(ecdsa, NULL); if (!buf_len || (buffer = OPENSSL_malloc(buf_len)) == NULL) goto err; pp = buffer; - if (!i2d_ECDSAPrivateKey(ecdsa, &pp)) goto err; + if (!i2d_ECPrivateKey(ecdsa, &pp)) goto err; pp = buffer; - if ((ret_ecdsa = d2i_ECDSAPrivateKey(&ret_ecdsa, (const unsigned char**)&pp, + if ((ret_ecdsa = d2i_ECPrivateKey(&ret_ecdsa, (const unsigned char**)&pp, buf_len)) == NULL) goto err; - ECDSA_print(bio_err, ret_ecdsa, 0); + EC_KEY_print(bio_err, ret_ecdsa, 0); if (ecdsa_cmp(ecdsa, ret_ecdsa)) goto err; - ECDSA_free(ret_ecdsa); + EC_KEY_free(ret_ecdsa); ret_ecdsa = NULL; OPENSSL_free(buffer); buffer = NULL; @@ -394,12 +435,12 @@ int main(void) BIO_printf(bio_err, "\nTesting X509_PUBKEY_{get,set} : "); if ((pkey = EVP_PKEY_new()) == NULL) goto err; - EVP_PKEY_assign_ECDSA(pkey, ecdsa); + EVP_PKEY_assign_EC_KEY(pkey, ecdsa); if ((x509_pubkey = X509_PUBKEY_new()) == NULL) goto err; if (!X509_PUBKEY_set(&x509_pubkey, pkey)) goto err; if ((ret_pkey = X509_PUBKEY_get(x509_pubkey)) == NULL) goto err; - ret_ecdsa = EVP_PKEY_get1_ECDSA(ret_pkey); + ret_ecdsa = EVP_PKEY_get1_EC_KEY(ret_pkey); EVP_PKEY_free(ret_pkey); ret_pkey = NULL; @@ -411,7 +452,7 @@ int main(void) else BIO_printf(bio_err, "TEST OK \n"); X509_PUBKEY_free(x509_pubkey); x509_pubkey = NULL; - ECDSA_free(ret_ecdsa); + EC_KEY_free(ret_ecdsa); ret_ecdsa = NULL; /* Testing PKCS8_PRIV_KEY_INFO <-> EVP_PKEY */ @@ -419,7 +460,7 @@ int main(void) BIO_printf(bio_err, "PKCS8_OK : "); if ((pkcs8 = EVP_PKEY2PKCS8_broken(pkey, PKCS8_OK)) == NULL) goto err; if ((ret_pkey = EVP_PKCS82PKEY(pkcs8)) == NULL) goto err; - ret_ecdsa = EVP_PKEY_get1_ECDSA(ret_pkey); + ret_ecdsa = EVP_PKEY_get1_EC_KEY(ret_pkey); if (ecdsa_cmp(ecdsa, ret_ecdsa)) { BIO_printf(bio_err, "TEST FAILED \n"); @@ -428,13 +469,13 @@ int main(void) else BIO_printf(bio_err, "TEST OK \n"); EVP_PKEY_free(ret_pkey); ret_pkey = NULL; - ECDSA_free(ret_ecdsa); + EC_KEY_free(ret_ecdsa); ret_ecdsa = NULL; PKCS8_PRIV_KEY_INFO_free(pkcs8); BIO_printf(bio_err, "PKCS8_NO_OCTET : "); if ((pkcs8 = EVP_PKEY2PKCS8_broken(pkey, PKCS8_NO_OCTET)) == NULL) goto err; if ((ret_pkey = EVP_PKCS82PKEY(pkcs8)) == NULL) goto err; - ret_ecdsa = EVP_PKEY_get1_ECDSA(ret_pkey); + ret_ecdsa = EVP_PKEY_get1_EC_KEY(ret_pkey); if (ecdsa_cmp(ecdsa, ret_ecdsa)) { BIO_printf(bio_err, "TEST FAILED \n"); @@ -443,13 +484,13 @@ int main(void) else BIO_printf(bio_err, "TEST OK \n"); EVP_PKEY_free(ret_pkey); ret_pkey = NULL; - ECDSA_free(ret_ecdsa); + EC_KEY_free(ret_ecdsa); ret_ecdsa = NULL; PKCS8_PRIV_KEY_INFO_free(pkcs8); BIO_printf(bio_err, "PKCS8_EMBEDDED_PARAM : "); if ((pkcs8 = EVP_PKEY2PKCS8_broken(pkey, PKCS8_EMBEDDED_PARAM)) == NULL) goto err; if ((ret_pkey = EVP_PKCS82PKEY(pkcs8)) == NULL) goto err; - ret_ecdsa = EVP_PKEY_get1_ECDSA(ret_pkey); + ret_ecdsa = EVP_PKEY_get1_EC_KEY(ret_pkey); if (ecdsa_cmp(ecdsa, ret_ecdsa)) { BIO_printf(bio_err, "TEST FAILED \n"); @@ -458,13 +499,13 @@ int main(void) else BIO_printf(bio_err, "TEST OK \n"); EVP_PKEY_free(ret_pkey); ret_pkey = NULL; - ECDSA_free(ret_ecdsa); + EC_KEY_free(ret_ecdsa); ret_ecdsa = NULL; PKCS8_PRIV_KEY_INFO_free(pkcs8); BIO_printf(bio_err, "PKCS8_NS_DB : "); if ((pkcs8 = EVP_PKEY2PKCS8_broken(pkey, PKCS8_NS_DB)) == NULL) goto err; if ((ret_pkey = EVP_PKCS82PKEY(pkcs8)) == NULL) goto err; - ret_ecdsa = EVP_PKEY_get1_ECDSA(ret_pkey); + ret_ecdsa = EVP_PKEY_get1_EC_KEY(ret_pkey); if (ecdsa_cmp(ecdsa, ret_ecdsa)) { BIO_printf(bio_err, "TEST FAILED \n"); @@ -473,7 +514,7 @@ int main(void) else BIO_printf(bio_err, "TEST OK \n"); EVP_PKEY_free(ret_pkey); ret_pkey = NULL; - ECDSA_free(ret_ecdsa); + EC_KEY_free(ret_ecdsa); ret_ecdsa = NULL; EVP_PKEY_free(pkey); pkey = NULL; @@ -492,7 +533,7 @@ int main(void) BIO_printf(bio_err, "Performing tests based on examples H.3.1 and H.3.2 of X9.62 \n"); BIO_printf(bio_err, "PRIME_192_V1 : "); - if ((ecdsa = ECDSA_new()) == NULL) goto err; + if ((ecdsa = EC_KEY_new()) == NULL) goto err; if (!set_p192_param(ecdsa)) goto err; if (!test_x962_sig_vrf(ecdsa, dgst, "6140507067065001063065065565667405560006161556565665656654", "3342403536405981729393488334694600415596881826869351677613", @@ -510,153 +551,68 @@ int main(void) else BIO_printf(bio_err, "OK\n"); - ECDSA_free(ecdsa); + EC_KEY_free(ecdsa); ecdsa = NULL; OPENSSL_free(dgst); dgst = NULL; - - /* NIST PRIME CURVES TESTS */ - /* EC_GROUP_NIST_PRIME_192 */ for (i=0; i<ECDSA_NIST_TESTS; i++) - if (!RAND_bytes(digest[i], 20)) goto err; - - BIO_printf(bio_err, "\nTesting sign & verify with NIST Prime-Curve P-192 : \n"); - ECDSA_free(ecdsa); - if ((ecdsa = ECDSA_new()) == NULL) goto err; - if ((ecdsa->group = EC_GROUP_new_by_name(EC_GROUP_NIST_PRIME_192)) == NULL) goto err; - if (!ECDSA_generate_key(ecdsa)) goto err; - tim = clock(); - for (i=0; i<ECDSA_NIST_TESTS; i++) - if ((signatures[i] = ECDSA_do_sign(digest[i], 20, ecdsa)) == NULL) goto err; - tim = clock() - tim; - tim_d = (double)tim / CLOCKS_PER_SEC; - BIO_printf(bio_err, "%d x ECDSA_do_sign() in %.2f"UNIT" => average time for ECDSA_do_sign() %.4f"UNIT"\n" - , ECDSA_NIST_TESTS, tim_d, tim_d / ECDSA_NIST_TESTS); - tim = clock(); - for (i=0; i<ECDSA_NIST_TESTS; i++) - if (!ECDSA_do_verify(digest[i], 20, signatures[i], ecdsa)) goto err; - tim = clock() - tim; - tim_d = (double)tim / CLOCKS_PER_SEC; - BIO_printf(bio_err, "%d x ECDSA_do_verify() in %.2f"UNIT" => average time for ECDSA_do_verify() %.4f"UNIT"\n" - , ECDSA_NIST_TESTS, tim_d, tim_d/ECDSA_NIST_TESTS); - for (i=0; i<ECDSA_NIST_TESTS; i++) - { - ECDSA_SIG_free(signatures[i]); - signatures[i] = NULL; - } - - /* EC_GROUP_NIST_PRIME_224 */ - BIO_printf(bio_err, "Testing sign & verify with NIST Prime-Curve P-224 : \n"); - ECDSA_free(ecdsa); - if ((ecdsa = ECDSA_new()) == NULL) goto err; - if ((ecdsa->group = EC_GROUP_new_by_name(EC_GROUP_NIST_PRIME_224)) == NULL) goto err; - if (!ECDSA_generate_key(ecdsa)) goto err; - tim = clock(); - for (i=0; i<ECDSA_NIST_TESTS; i++) - if ((signatures[i] = ECDSA_do_sign(digest[i], 20, ecdsa)) == NULL) goto err; - tim = clock() - tim; - tim_d = (double)tim / CLOCKS_PER_SEC; - BIO_printf(bio_err, "%d x ECDSA_do_sign() in %.2f"UNIT" => average time for ECDSA_do_sign() %.4f"UNIT"\n" - , ECDSA_NIST_TESTS, tim_d, tim_d / ECDSA_NIST_TESTS); - tim = clock(); - for (i=0; i<ECDSA_NIST_TESTS; i++) - if (!ECDSA_do_verify(digest[i], 20, signatures[i], ecdsa)) goto err; - tim = clock() - tim; - tim_d = (double)tim / CLOCKS_PER_SEC; - BIO_printf(bio_err, "%d x ECDSA_do_verify() in %.2f"UNIT" => average time for ECDSA_do_verify() %.4f"UNIT"\n" - , ECDSA_NIST_TESTS, tim_d, tim_d/ECDSA_NIST_TESTS); - for (i=0; i<ECDSA_NIST_TESTS; i++) - { - ECDSA_SIG_free(signatures[i]); - signatures[i] = NULL; + if (!RAND_bytes(digest[i], 20)) goto err; + + BIO_printf(bio_err, "\n"); + +/* Macro for each test */ +#define ECDSA_GROUP_TEST(text, curve) \ + BIO_printf(bio_err, "Testing sign & verify with %s : \n", text); \ + EC_KEY_free(ecdsa); \ + if ((ecdsa = EC_KEY_new()) == NULL) goto err; \ + if ((ecdsa->group = EC_GROUP_new_by_name(curve)) == NULL) goto err; \ + if (!EC_KEY_generate_key(ecdsa)) goto err; \ + tim = clock(); \ + for (i=0; i<ECDSA_NIST_TESTS; i++) \ + if ((signatures[i] = ECDSA_do_sign(digest[i], 20, ecdsa)) == NULL) goto err; \ + tim = clock() - tim; \ + tim_d = (double)tim / CLOCKS_PER_SEC; \ + BIO_printf(bio_err, "%d x ECDSA_do_sign() in %.2f"UNIT" => average time for ECDSA_do_sign() %.4f"UNIT"\n" \ + , ECDSA_NIST_TESTS, tim_d, tim_d / ECDSA_NIST_TESTS); \ + tim = clock(); \ + for (i=0; i<ECDSA_NIST_TESTS; i++) \ + if (!ECDSA_do_verify(digest[i], 20, signatures[i], ecdsa)) goto err; \ + tim = clock() - tim; \ + tim_d = (double)tim / CLOCKS_PER_SEC; \ + BIO_printf(bio_err, "%d x ECDSA_do_verify() in %.2f"UNIT" => average time for ECDSA_do_verify() %.4f"UNIT"\n" \ + , ECDSA_NIST_TESTS, tim_d, tim_d/ECDSA_NIST_TESTS); \ + for (i=0; i<ECDSA_NIST_TESTS; i++) \ + { \ + ECDSA_SIG_free(signatures[i]); \ + signatures[i] = NULL; \ } - - /* EC_GROUP_NIST_PRIME_256 */ - BIO_printf(bio_err, "Testing sign & verify with NIST Prime-Curve P-256 : \n"); - ECDSA_free(ecdsa); - if ((ecdsa = ECDSA_new()) == NULL) goto err; - if ((ecdsa->group = EC_GROUP_new_by_name(EC_GROUP_NIST_PRIME_256)) == NULL) goto err; - if (!ECDSA_generate_key(ecdsa)) goto err; - tim = clock(); - for (i=0; i<ECDSA_NIST_TESTS; i++) - if ((signatures[i] = ECDSA_do_sign(digest[i], 20, ecdsa)) == NULL) goto err; - tim = clock() - tim; - tim_d = (double)tim / CLOCKS_PER_SEC; - BIO_printf(bio_err, "%d x ECDSA_do_sign() in %.2f"UNIT" => average time for ECDSA_do_sign() %.4f"UNIT"\n" - , ECDSA_NIST_TESTS, tim_d, tim_d / ECDSA_NIST_TESTS); - tim = clock(); - for (i=0; i<ECDSA_NIST_TESTS; i++) - if (!ECDSA_do_verify(digest[i], 20, signatures[i], ecdsa)) goto err; - tim = clock() - tim; - tim_d = (double)tim / CLOCKS_PER_SEC; - BIO_printf(bio_err, "%d x ECDSA_do_verify() in %.2f"UNIT" => average time for ECDSA_do_verify() %.4f"UNIT"\n" - , ECDSA_NIST_TESTS, tim_d, tim_d/ECDSA_NIST_TESTS); - for (i=0; i<ECDSA_NIST_TESTS; i++) - { - ECDSA_SIG_free(signatures[i]); - signatures[i] = NULL; - } - - /* EC_GROUP_NIST_PRIME_384 */ - BIO_printf(bio_err, "Testing sign & verify with NIST Prime-Curve P-384 : \n"); - ECDSA_free(ecdsa); - if ((ecdsa = ECDSA_new()) == NULL) goto err; - if ((ecdsa->group = EC_GROUP_new_by_name(EC_GROUP_NIST_PRIME_384)) == NULL) goto err; - if (!ECDSA_generate_key(ecdsa)) goto err; - tim = clock(); - for (i=0; i<ECDSA_NIST_TESTS; i++) - if ((signatures[i] = ECDSA_do_sign(digest[i], 20, ecdsa)) == NULL) goto err; - tim = clock() - tim; - tim_d = (double)tim / CLOCKS_PER_SEC; - BIO_printf(bio_err, "%d x ECDSA_do_sign() in %.2f"UNIT" => average time for ECDSA_do_sign() %.4f"UNIT"\n" - , ECDSA_NIST_TESTS, tim_d, tim_d / ECDSA_NIST_TESTS); - tim = clock(); - for (i=0; i<ECDSA_NIST_TESTS; i++) - if (!ECDSA_do_verify(digest[i], 20, signatures[i], ecdsa)) goto err; - tim = clock() - tim; - tim_d = (double)tim / CLOCKS_PER_SEC; - BIO_printf(bio_err, "%d x ECDSA_do_verify() in %.2f"UNIT" => average time for ECDSA_do_verify() %.4f"UNIT"\n" - , ECDSA_NIST_TESTS, tim_d, tim_d/ECDSA_NIST_TESTS); - for (i=0; i<ECDSA_NIST_TESTS; i++) - { - ECDSA_SIG_free(signatures[i]); - signatures[i] = NULL; - } - - /* EC_GROUP_NIST_PRIME_521 */ - BIO_printf(bio_err, "Testing sign & verify with NIST Prime-Curve P-521 : \n"); - ECDSA_free(ecdsa); - if ((ecdsa = ECDSA_new()) == NULL) goto err; - if ((ecdsa->group = EC_GROUP_new_by_name(EC_GROUP_NIST_PRIME_521)) == NULL) goto err; - if (!ECDSA_generate_key(ecdsa)) goto err; - tim = clock(); - for (i=0; i<ECDSA_NIST_TESTS; i++) - if ((signatures[i] = ECDSA_do_sign(digest[i], 20, ecdsa)) == NULL) goto err; - tim = clock() - tim; - tim_d = (double)tim / CLOCKS_PER_SEC; - BIO_printf(bio_err, "%d x ECDSA_do_sign() in %.2f"UNIT" => average time for ECDSA_do_sign() %.4f"UNIT"\n" - , ECDSA_NIST_TESTS, tim_d, tim_d / ECDSA_NIST_TESTS); - tim = clock(); - for (i=0; i<ECDSA_NIST_TESTS; i++) - if (!ECDSA_do_verify(digest[i], 20, signatures[i], ecdsa)) goto err; - tim = clock() - tim; - tim_d = (double)tim / CLOCKS_PER_SEC; - BIO_printf(bio_err, "%d x ECDSA_do_verify() in %.2f"UNIT" => average time for ECDSA_do_verify() %.4f"UNIT"\n" - , ECDSA_NIST_TESTS, tim_d, tim_d/ECDSA_NIST_TESTS); - ECDSA_free(ecdsa); + + /* NIST PRIME CURVES TESTS */ + ECDSA_GROUP_TEST("NIST Prime-Curve P-192", EC_GROUP_NIST_PRIME_192); + ECDSA_GROUP_TEST("NIST Prime-Curve P-224", EC_GROUP_NIST_PRIME_224); + ECDSA_GROUP_TEST("NIST Prime-Curve P-256", EC_GROUP_NIST_PRIME_256); + ECDSA_GROUP_TEST("NIST Prime-Curve P-384", EC_GROUP_NIST_PRIME_384); + ECDSA_GROUP_TEST("NIST Prime-Curve P-521", EC_GROUP_NIST_PRIME_521); + /* NIST BINARY CURVES TESTS */ + ECDSA_GROUP_TEST("NIST Binary-Curve K-163", EC_GROUP_NIST_CHAR2_K163); + ECDSA_GROUP_TEST("NIST Binary-Curve B-163", EC_GROUP_NIST_CHAR2_B163); + ECDSA_GROUP_TEST("NIST Binary-Curve K-233", EC_GROUP_NIST_CHAR2_K233); + ECDSA_GROUP_TEST("NIST Binary-Curve B-233", EC_GROUP_NIST_CHAR2_B233); + ECDSA_GROUP_TEST("NIST Binary-Curve K-283", EC_GROUP_NIST_CHAR2_K283); + ECDSA_GROUP_TEST("NIST Binary-Curve B-283", EC_GROUP_NIST_CHAR2_B283); + ECDSA_GROUP_TEST("NIST Binary-Curve K-409", EC_GROUP_NIST_CHAR2_K409); + ECDSA_GROUP_TEST("NIST Binary-Curve B-409", EC_GROUP_NIST_CHAR2_B409); + ECDSA_GROUP_TEST("NIST Binary-Curve K-571", EC_GROUP_NIST_CHAR2_K571); + ECDSA_GROUP_TEST("NIST Binary-Curve B-571", EC_GROUP_NIST_CHAR2_B571); +#undef ECDSA_GROUP_TEST + + EC_KEY_free(ecdsa); ecdsa = NULL; - for (i=0; i<ECDSA_NIST_TESTS; i++) - { - ECDSA_SIG_free(signatures[i]); - signatures[i] = NULL; - } - OPENSSL_free(buffer); buffer = NULL; EVP_PKEY_free(pkey); pkey = NULL; - ecdsa = NULL; ret = 1; err: if (!ret) @@ -665,10 +621,11 @@ err: if (!ret) BIO_printf(bio_err, "TEST PASSED \n"); if (!ret) ERR_print_errors(bio_err); - if (ecdsa) ECDSA_free(ecdsa); + if (ecdsa) EC_KEY_free(ecdsa); if (d) BN_free(d); if (dgst) OPENSSL_free(dgst); if (md_ctx) EVP_MD_CTX_destroy(md_ctx); + if (pkey) EVP_PKEY_free(pkey); CRYPTO_cleanup_all_ex_data(); ERR_remove_state(0); ERR_free_strings(); diff --git a/crypto/ecdsa/ecs_asn1.c b/crypto/ecdsa/ecs_asn1.c index 38b27592bd..e9e1c2b51e 100644 --- a/crypto/ecdsa/ecs_asn1.c +++ b/crypto/ecdsa/ecs_asn1.c @@ -54,18 +54,9 @@ */ #include "ecdsa.h" -#include "cryptlib.h" -#include <openssl/asn1.h> +#include <openssl/err.h> #include <openssl/asn1t.h> -typedef struct ecdsa_priv_key_st { - int version; - ECPKPARAMETERS *parameters; - ASN1_OBJECT *named_curve; - ASN1_OCTET_STRING *pub_key; - BIGNUM *priv_key; - } ECDSAPrivateKey; - ASN1_SEQUENCE(ECDSA_SIG) = { ASN1_SIMPLE(ECDSA_SIG, r, CBIGNUM), ASN1_SIMPLE(ECDSA_SIG, s, CBIGNUM) @@ -74,283 +65,3 @@ ASN1_SEQUENCE(ECDSA_SIG) = { DECLARE_ASN1_FUNCTIONS_const(ECDSA_SIG) DECLARE_ASN1_ENCODE_FUNCTIONS_const(ECDSA_SIG, ECDSA_SIG) IMPLEMENT_ASN1_FUNCTIONS_const(ECDSA_SIG) - -ASN1_SEQUENCE(ECDSAPrivateKey) = { - ASN1_SIMPLE(ECDSAPrivateKey, version, LONG), - ASN1_SIMPLE(ECDSAPrivateKey, parameters, ECPKPARAMETERS), - ASN1_SIMPLE(ECDSAPrivateKey, pub_key, ASN1_OCTET_STRING), - ASN1_SIMPLE(ECDSAPrivateKey, priv_key, BIGNUM) -} ASN1_SEQUENCE_END(ECDSAPrivateKey) - -DECLARE_ASN1_FUNCTIONS_const(ECDSAPrivateKey) -DECLARE_ASN1_ENCODE_FUNCTIONS_const(ECDSAPrivateKey, ecdsaPrivateKey) -IMPLEMENT_ASN1_ALLOC_FUNCTIONS_fname(ECDSAPrivateKey, ECDSAPrivateKey, ECDSAPrivateKey) -IMPLEMENT_ASN1_ENCODE_FUNCTIONS_const_fname(ECDSAPrivateKey, ECDSAPrivateKey, ecdsaPrivateKey) - -int i2d_ECDSAParameters(ECDSA *a, unsigned char **out) - { - if (a == NULL) - { - ECDSAerr(ECDSA_F_I2D_ECDSAPARAMETERS, - ERR_R_PASSED_NULL_PARAMETER); - return 0; - } - return i2d_ECPKParameters(a->group, out); - } - -ECDSA *d2i_ECDSAParameters(ECDSA **a, const unsigned char **in, long len) - { - EC_GROUP *group; - ECDSA *ret; - - if (in == NULL || *in == NULL) - { - ECDSAerr(ECDSA_F_D2I_ECDSAPARAMETERS, - ERR_R_PASSED_NULL_PARAMETER); - return NULL; - } - - group = d2i_ECPKParameters(NULL, in, len); - - if (group == NULL) - { - ECDSAerr(ECDSA_F_D2I_ECDSAPARAMETERS, - ERR_R_EC_LIB); - return NULL; - } - - if (a == NULL || *a == NULL) - { - if ((ret = ECDSA_new()) == NULL) - { - ECDSAerr(ECDSA_F_D2I_ECDSAPARAMETERS, - ERR_R_MALLOC_FAILURE); - return NULL; - } - if (a) - *a = ret; - } - else - ret = *a; - - if (ret->group) - EC_GROUP_clear_free(ret->group); - - ret->group = group; - - return ret; - } - -ECDSA *d2i_ECDSAPrivateKey(ECDSA **a, const unsigned char **in, long len) - { - int ok=0; - ECDSA *ret=NULL; - ECDSAPrivateKey *priv_key=NULL; - - if ((priv_key = ECDSAPrivateKey_new()) == NULL) - { - ECDSAerr(ECDSA_F_D2I_ECDSAPRIVATEKEY, ERR_R_MALLOC_FAILURE); - return NULL; - } - - if ((priv_key = d2i_ecdsaPrivateKey(&priv_key, in, len)) == NULL) - { - ECDSAerr(ECDSA_F_D2I_ECDSAPRIVATEKEY, - ECDSA_R_D2I_ECDSA_PRIVATEKEY_FAILURE); - ECDSAPrivateKey_free(priv_key); - return NULL; - } - - if (a == NULL || *a == NULL) - { - if ((ret = ECDSA_new()) == NULL) - { - ECDSAerr(ECDSA_F_D2I_ECDSAPRIVATEKEY, - ERR_R_MALLOC_FAILURE); - goto err; - } - if (a) - *a = ret; - } - else - ret = *a; - - if (ret->group) - EC_GROUP_clear_free(ret->group); - - ret->group = EC_ASN1_pkparameters2group(priv_key->parameters); - if (ret->group == NULL) - { - ECDSAerr(ECDSA_F_D2I_ECDSAPRIVATEKEY, ERR_R_EC_LIB); - goto err; - } - - ret->version = priv_key->version; - if (priv_key->priv_key) - { - if ((ret->priv_key = BN_dup(priv_key->priv_key)) == NULL) - { - ECDSAerr(ECDSA_F_D2I_ECDSAPRIVATEKEY, - ERR_R_BN_LIB); - goto err; - } - } - else - { - ECDSAerr(ECDSA_F_D2I_ECDSAPRIVATEKEY, - ECDSA_R_MISSING_PRIVATE_KEY); - goto err; - } - - if ((ret->pub_key = EC_POINT_new(ret->group)) == NULL) - { - ECDSAerr(ECDSA_F_D2I_ECDSAPRIVATEKEY, ERR_R_EC_LIB); - goto err; - } - - if (!EC_POINT_oct2point(ret->group, ret->pub_key, - priv_key->pub_key->data, priv_key->pub_key->length, NULL)) - { - ECDSAerr(ECDSA_F_D2I_ECDSAPRIVATEKEY, ERR_R_EC_LIB); - goto err; - } - - ok = 1; - -err : if (!ok) - { - if (ret) ECDSA_free(ret); - ret = NULL; - } - if (priv_key) - ECDSAPrivateKey_free(priv_key); - return(ret); -} - -int i2d_ECDSAPrivateKey(ECDSA *a, unsigned char **out) -{ - int ret=0, ok=0; - unsigned char *buffer=NULL; - size_t buf_len=0; - ECDSAPrivateKey *priv_key=NULL; - - if (a == NULL || a->group == NULL) - { - ECDSAerr(ECDSA_F_I2D_ECDSAPRIVATEKEY, - ERR_R_PASSED_NULL_PARAMETER); - goto err; - } - - if ((priv_key = ECDSAPrivateKey_new()) == NULL) - { - ECDSAerr(ECDSA_F_I2D_ECDSAPRIVATEKEY, - ERR_R_MALLOC_FAILURE); - goto err; - } - - if ((priv_key->parameters = EC_ASN1_group2pkparameters(a->group, - priv_key->parameters)) == NULL) - { - ECDSAerr(ECDSA_F_I2D_ECDSAPRIVATEKEY, ERR_R_EC_LIB); - goto err; - } - - priv_key->version = a->version; - - if (BN_copy(priv_key->priv_key, a->priv_key) == NULL) - { - ECDSAerr(ECDSA_F_I2D_ECDSAPRIVATEKEY, ERR_R_BN_LIB); - goto err; - } - - buf_len = EC_POINT_point2oct(a->group, a->pub_key, - ECDSA_get_conversion_form(a), NULL, 0, NULL); - if ((buffer = OPENSSL_malloc(buf_len)) == NULL) - { - ECDSAerr(ECDSA_F_I2D_ECDSAPRIVATEKEY, ERR_R_MALLOC_FAILURE); - goto err; - } - if (!EC_POINT_point2oct(a->group, a->pub_key, - ECDSA_get_conversion_form(a), buffer, buf_len, NULL)) - { - ECDSAerr(ECDSA_F_I2D_ECDSAPRIVATEKEY, ERR_R_EC_LIB); - goto err; - } - if (!M_ASN1_OCTET_STRING_set(priv_key->pub_key, buffer, buf_len)) - { - ECDSAerr(ECDSA_F_I2D_ECDSAPRIVATEKEY, ERR_R_ASN1_LIB); - goto err; - } - if ((ret = i2d_ecdsaPrivateKey(priv_key, out)) == 0) - { - ECDSAerr(ECDSA_F_I2D_ECDSAPRIVATEKEY, - ECDSA_R_I2D_ECDSA_PRIVATEKEY); - goto err; - } - ok=1; - -err: - if (buffer) - OPENSSL_free(buffer); - if (priv_key) - ECDSAPrivateKey_free(priv_key); - return(ok?ret:0); -} - - -ECDSA *ECDSAPublicKey_set_octet_string(ECDSA **a, const unsigned char **in, long len) -{ - ECDSA *ret=NULL; - - if (a == NULL || (*a) == NULL || (*a)->group == NULL) - { - /* sorry, but a EC_GROUP-structur is necessary - * to set the public key */ - ECDSAerr(ECDSA_F_D2I_ECDSAPRIVATEKEY, ECDSA_R_MISSING_PARAMETERS); - return 0; - } - ret = *a; - if (ret->pub_key == NULL && (ret->pub_key = EC_POINT_new(ret->group)) == NULL) - { - ECDSAerr(ECDSA_F_D2I_ECDSAPRIVATEKEY, ERR_R_MALLOC_FAILURE); - return 0; - } - if (!EC_POINT_oct2point(ret->group, ret->pub_key, *in, len, NULL)) - { - ECDSAerr(ECDSA_F_D2I_ECDSAPRIVATEKEY, ERR_R_EC_LIB); - return 0; - } - ECDSA_set_conversion_form(ret, (point_conversion_form_t)(*in[0] & ~0x01)); - return ret; -} - -int ECDSAPublicKey_get_octet_string(ECDSA *a, unsigned char **out) -{ - size_t buf_len=0; - - if (a == NULL) - { - ECDSAerr(ECDSA_F_I2D_ECDSAPUBLICKEY, ECDSA_R_MISSING_PARAMETERS); - return 0; - } - buf_len = EC_POINT_point2oct(a->group, a->pub_key, - ECDSA_get_conversion_form(a), NULL, 0, NULL); - if (out == NULL || buf_len == 0) - /* out == NULL => just return the length of the octet string */ - return buf_len; - if (*out == NULL) - if ((*out = OPENSSL_malloc(buf_len)) == NULL) - { - ECDSAerr(ECDSA_F_I2D_ECDSAPUBLICKEY, ERR_R_MALLOC_FAILURE); - return 0; - } - if (!EC_POINT_point2oct(a->group, a->pub_key, ECDSA_get_conversion_form(a), - *out, buf_len, NULL)) - { - ECDSAerr(ECDSA_F_I2D_ECDSAPUBLICKEY, ERR_R_EC_LIB); - OPENSSL_free(*out); - *out = NULL; - return 0; - } - return buf_len; -} diff --git a/crypto/ecdsa/ecs_err.c b/crypto/ecdsa/ecs_err.c index b8a9edd759..75c789448c 100644 --- a/crypto/ecdsa/ecs_err.c +++ b/crypto/ecdsa/ecs_err.c @@ -66,75 +66,21 @@ #ifndef OPENSSL_NO_ERR static ERR_STRING_DATA ECDSA_str_functs[]= { -{ERR_PACK(0,ECDSA_F_D2I_ECDSAPARAMETERS,0), "d2i_ECDSAParameters"}, -{ERR_PACK(0,ECDSA_F_D2I_ECDSAPRIVATEKEY,0), "d2i_ECDSAPrivateKey"}, -{ERR_PACK(0,ECDSA_F_ECDSAPARAMETERS_PRINT,0), "ECDSAParameters_print"}, -{ERR_PACK(0,ECDSA_F_ECDSAPARAMETERS_PRINT_FP,0), "ECDSAParameters_print_fp"}, +{ERR_PACK(0,ECDSA_F_ECDSA_DATA_NEW,0), "ECDSA_DATA_new"}, {ERR_PACK(0,ECDSA_F_ECDSA_DO_SIGN,0), "ECDSA_do_sign"}, {ERR_PACK(0,ECDSA_F_ECDSA_DO_VERIFY,0), "ECDSA_do_verify"}, -{ERR_PACK(0,ECDSA_F_ECDSA_GENERATE_KEY,0), "ECDSA_generate_key"}, -{ERR_PACK(0,ECDSA_F_ECDSA_GET,0), "ECDSA_GET"}, -{ERR_PACK(0,ECDSA_F_ECDSA_GET_CURVE_NID,0), "ECDSA_GET_CURVE_NID"}, -{ERR_PACK(0,ECDSA_F_ECDSA_GET_ECDSA,0), "ECDSA_GET_ECDSA"}, -{ERR_PACK(0,ECDSA_F_ECDSA_GET_EC_PARAMETERS,0), "ECDSA_GET_EC_PARAMETERS"}, -{ERR_PACK(0,ECDSA_F_ECDSA_GET_X9_62_CURVE,0), "ECDSA_GET_X9_62_CURVE"}, -{ERR_PACK(0,ECDSA_F_ECDSA_GET_X9_62_EC_PARAMETERS,0), "ECDSA_GET_X9_62_EC_PARAMETERS"}, -{ERR_PACK(0,ECDSA_F_ECDSA_GET_X9_62_FIELDID,0), "ECDSA_GET_X9_62_FIELDID"}, -{ERR_PACK(0,ECDSA_F_ECDSA_NEW,0), "ECDSA_new"}, -{ERR_PACK(0,ECDSA_F_ECDSA_PRINT,0), "ECDSA_print"}, -{ERR_PACK(0,ECDSA_F_ECDSA_PRINT_FP,0), "ECDSA_print_fp"}, -{ERR_PACK(0,ECDSA_F_ECDSA_SET_GROUP_P,0), "ECDSA_SET_GROUP_P"}, -{ERR_PACK(0,ECDSA_F_ECDSA_SET_PRIME_GROUP,0), "ECDSA_SET_PRIME_GROUP"}, {ERR_PACK(0,ECDSA_F_ECDSA_SIGN_SETUP,0), "ECDSA_sign_setup"}, -{ERR_PACK(0,ECDSA_F_I2D_ECDSAPARAMETERS,0), "i2d_ECDSAParameters"}, -{ERR_PACK(0,ECDSA_F_I2D_ECDSAPRIVATEKEY,0), "i2d_ECDSAPrivateKey"}, -{ERR_PACK(0,ECDSA_F_I2D_ECDSAPUBLICKEY,0), "I2D_ECDSAPUBLICKEY"}, -{ERR_PACK(0,ECDSA_F_SIG_CB,0), "SIG_CB"}, {0,NULL} }; static ERR_STRING_DATA ECDSA_str_reasons[]= { {ECDSA_R_BAD_SIGNATURE ,"bad signature"}, -{ECDSA_R_CAN_NOT_GET_GENERATOR ,"can not get generator"}, -{ECDSA_R_D2I_ECDSAPRIVATEKEY_MISSING_PRIVATE_KEY,"d2i ecdsaprivatekey missing private key"}, -{ECDSA_R_D2I_ECDSA_PRIVATEKEY_FAILURE ,"d2i ecdsa privatekey failure"}, -{ECDSA_R_D2I_EC_PARAMETERS_FAILURE ,"d2i ec parameters failure"}, -{ECDSA_R_D2I_X9_62_EC_PARAMETERS_FAILURE ,"d2i x9 62 ec parameters failure"}, {ECDSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE ,"data too large for key size"}, -{ECDSA_R_ECDSAPRIVATEKEY_NEW_FAILURE ,"ecdsaprivatekey new failure"}, -{ECDSA_R_ECDSA_F_ECDSA_NEW ,"ecdsa f ecdsa new"}, -{ECDSA_R_ECDSA_GET_EC_PARAMETERS_FAILURE ,"ecdsa get ec parameters failure"}, -{ECDSA_R_ECDSA_GET_FAILURE ,"ecdsa get failure"}, -{ECDSA_R_ECDSA_GET_X9_62_CURVE_FAILURE ,"ecdsa get x9 62 curve failure"}, -{ECDSA_R_ECDSA_GET_X9_62_EC_PARAMETERS_FAILURE,"ecdsa get x9 62 ec parameters failure"}, -{ECDSA_R_ECDSA_GET_X9_62_FIELDID_FAILURE ,"ecdsa get x9 62 fieldid failure"}, -{ECDSA_R_ECDSA_NEW_FAILURE ,"ecdsa new failure"}, -{ECDSA_R_ECDSA_R_D2I_EC_PARAMETERS_FAILURE,"ecdsa r d2i ec parameters failure"}, -{ECDSA_R_ECDSA_R_D2I_X9_62_EC_PARAMETERS_FAILURE,"ecdsa r d2i x9 62 ec parameters failure"}, -{ECDSA_R_ECPARAMETERS2ECDSA_FAILURE ,"ecparameters2ecdsa failure"}, -{ECDSA_R_EC_GROUP_NID2CURVE_FAILURE ,"ec group nid2curve failure"}, {ECDSA_R_ERR_EC_LIB ,"err ec lib"}, -{ECDSA_R_I2D_ECDSA_PRIVATEKEY ,"i2d ecdsa privatekey"}, -{ECDSA_R_I2D_ECDSA_PUBLICKEY ,"i2d ecdsa publickey"}, {ECDSA_R_MISSING_PARAMETERS ,"missing parameters"}, -{ECDSA_R_MISSING_PRIVATE_KEY ,"missing private key"}, -{ECDSA_R_NOT_SUPPORTED ,"not supported"}, -{ECDSA_R_NO_CURVE_PARAMETER_A_SPECIFIED ,"no curve parameter a specified"}, -{ECDSA_R_NO_CURVE_PARAMETER_B_SPECIFIED ,"no curve parameter b specified"}, -{ECDSA_R_NO_CURVE_SPECIFIED ,"no curve specified"}, -{ECDSA_R_NO_FIELD_SPECIFIED ,"no field specified"}, -{ECDSA_R_PRIME_MISSING ,"prime missing"}, {ECDSA_R_RANDOM_NUMBER_GENERATION_FAILED ,"random number generation failed"}, {ECDSA_R_SIGNATURE_MALLOC_FAILED ,"signature malloc failed"}, -{ECDSA_R_UNEXPECTED_ASN1_TYPE ,"unexpected asn1 type"}, -{ECDSA_R_UNEXPECTED_PARAMETER ,"unexpected parameter"}, -{ECDSA_R_UNEXPECTED_PARAMETER_LENGTH ,"unexpected parameter length"}, -{ECDSA_R_UNEXPECTED_VERSION_NUMER ,"unexpected version numer"}, -{ECDSA_R_UNKNOWN_PARAMETERS_TYPE ,"unknown parameters type"}, -{ECDSA_R_WRONG_FIELD_IDENTIFIER ,"wrong field identifier"}, -{ECDSA_R_X9_62_CURVE_NEW_FAILURE ,"x9 62 curve new failure"}, -{ECDSA_R_X9_62_EC_PARAMETERS_NEW_FAILURE ,"x9 62 ec parameters new failure"}, {0,NULL} }; diff --git a/crypto/ecdsa/ecs_gen.c b/crypto/ecdsa/ecs_gen.c deleted file mode 100644 index e82b9b6e2f..0000000000 --- a/crypto/ecdsa/ecs_gen.c +++ /dev/null @@ -1,83 +0,0 @@ -/* crypto/ecdsa/ecs_gen.c */ -/* ==================================================================== - * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. All advertising materials mentioning features or use of this - * software must display the following acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" - * - * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For written permission, please contact - * openssl-core@OpenSSL.org. - * - * 5. Products derived from this software may not be called "OpenSSL" - * nor may "OpenSSL" appear in their names without prior written - * permission of the OpenSSL Project. - * - * 6. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" - * - * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY - * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * ==================================================================== - * - * This product includes cryptographic software written by Eric Young - * (eay@cryptsoft.com). This product includes software written by Tim - * Hudson (tjh@cryptsoft.com). - * - */ -/* TODO: implementation of ecdsa parameter generation - */ -#if 0 -#include <stdio.h> -#include <time.h> -#include "cryptlib.h" -#include <openssl/evp.h> -#include <openssl/bn.h> -#include <openssl/ecdsa.h> -#include <openssl/rand.h> -#include <openssl/sha.h> - -#ifdef __cplusplus -extern "C" { -#endif -ECDSA *ECDSA_generate_parameters(int bits, - unsigned char *seed_in, int seed_len, - int *counter_ret, unsigned long *h_ret, - void (*callback)(int, int, void *), - void *cb_arg) - { - return NULL; - } -#ifdef __cplusplus -} -#endif -#else -static void *dummy=&dummy; -#endif diff --git a/crypto/ecdsa/ecs_key.c b/crypto/ecdsa/ecs_key.c deleted file mode 100644 index 03916eac61..0000000000 --- a/crypto/ecdsa/ecs_key.c +++ /dev/null @@ -1,141 +0,0 @@ -/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ -#include "cryptlib.h" -#include <openssl/ecdsa.h> - -int ECDSA_generate_key(ECDSA *ecdsa) -{ - int ok=0; - BN_CTX *ctx=NULL; - BIGNUM *priv_key=NULL,*order=NULL; - EC_POINT *pub_key=NULL; - - if (!ecdsa || !ecdsa->group) - { - ECDSAerr(ECDSA_F_ECDSA_GENERATE_KEY,ECDSA_R_MISSING_PARAMETERS); - return 0; - } - - if ((order = BN_new()) == NULL) goto err; - if ((ctx = BN_CTX_new()) == NULL) goto err; - - if (ecdsa->priv_key == NULL) - { - if ((priv_key = BN_new()) == NULL) goto err; - } - else - priv_key = ecdsa->priv_key; - - if (!EC_GROUP_get_order(ecdsa->group, order, ctx)) goto err; - do - if (!BN_rand_range(priv_key, order)) goto err; - while (BN_is_zero(priv_key)); - - if (ecdsa->pub_key == NULL) - { - if ((pub_key = EC_POINT_new(ecdsa->group)) == NULL) goto err; - } - else - pub_key = ecdsa->pub_key; - - if (!EC_POINT_mul(ecdsa->group, pub_key, priv_key, NULL, NULL, ctx)) goto err; - - ecdsa->priv_key = priv_key; - ecdsa->pub_key = pub_key; - ok=1; -err: if (order) BN_free(order); - if ((pub_key != NULL) && (ecdsa->pub_key == NULL)) EC_POINT_free(pub_key); - if ((priv_key != NULL) && (ecdsa->priv_key == NULL)) BN_free(priv_key); - if (ctx != NULL) BN_CTX_free(ctx); - return(ok); -} - -int ECDSA_check_key(ECDSA *ecdsa) -{ - int ok=0; - BN_CTX *ctx=NULL; - BIGNUM *order=NULL; - EC_POINT *point=NULL; - - if (!ecdsa || !ecdsa->group || !ecdsa->pub_key) - return 0; - - if ((ctx = BN_CTX_new()) == NULL) goto err; - if ((order = BN_new()) == NULL) goto err; - if ((point = EC_POINT_new(ecdsa->group)) == NULL) goto err; - - /* testing whether pub_key is a valid point on the elliptic curve */ - if (!EC_POINT_is_on_curve(ecdsa->group,ecdsa->pub_key,ctx)) goto err; - /* testing whether pub_key * order is the point at infinity */ - if (!EC_GROUP_get_order(ecdsa->group,order,ctx)) goto err; - if (!EC_POINT_copy(point,ecdsa->pub_key)) goto err; - if (!EC_POINT_mul(ecdsa->group,point,order,NULL,NULL,ctx)) goto err; - if (!EC_POINT_is_at_infinity(ecdsa->group,point)) goto err; - /* in case the priv_key is present : check if generator * priv_key == pub_key */ - if (ecdsa->priv_key) - { - if (BN_cmp(ecdsa->priv_key,order) >= 0) goto err; - if (!EC_POINT_mul(ecdsa->group,point,ecdsa->priv_key,NULL,NULL,ctx)) goto err; - if (EC_POINT_cmp(ecdsa->group,point,ecdsa->pub_key,ctx) != 0) goto err; - } - ok = 1; -err: - if (ctx != NULL) BN_CTX_free(ctx); - if (order != NULL) BN_free(order); - if (point != NULL) EC_POINT_free(point); - return(ok); -} diff --git a/crypto/ecdsa/ecs_lib.c b/crypto/ecdsa/ecs_lib.c index 5f10c2ede7..fbec1bd343 100644 --- a/crypto/ecdsa/ecs_lib.c +++ b/crypto/ecdsa/ecs_lib.c @@ -52,69 +52,15 @@ * Hudson (tjh@cryptsoft.com). * */ -/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ -#include "cryptlib.h" +#include <string.h> #include "ecdsa.h" #include <openssl/engine.h> const char *ECDSA_version="ECDSA" OPENSSL_VERSION_PTEXT; +static void ecdsa_finish(EC_KEY *); + static const ECDSA_METHOD *default_ECDSA_method = NULL; void ECDSA_set_default_method(const ECDSA_METHOD *meth) @@ -137,29 +83,53 @@ ECDSA *ECDSA_new(void) int ECDSA_set_method(ECDSA *ecdsa, const ECDSA_METHOD *meth) { const ECDSA_METHOD *mtmp; + ECDSA_DATA *ecdsa; + + ecdsa = ecdsa_check(eckey); + + if (ecdsa == NULL) + return 0; + mtmp = ecdsa->meth; - if (mtmp->finish) mtmp->finish(ecdsa); +#if 0 + if (mtmp->finish) + mtmp->finish(eckey); +#endif if (ecdsa->engine) { ENGINE_finish(ecdsa->engine); ecdsa->engine = NULL; } ecdsa->meth = meth; - if (meth->init) meth->init(ecdsa); +#if 0 + if (meth->init) + meth->init(eckey); +#endif return 1; } -ECDSA *ECDSA_new_method(ENGINE *engine) +ECDSA_DATA *ECDSA_DATA_new(void) +{ + return ECDSA_DATA_new_method(NULL); +} + +ECDSA_DATA *ECDSA_DATA_new_method(ENGINE *engine) { - ECDSA *ret; + ECDSA_DATA *ret; - ret=(ECDSA *)OPENSSL_malloc(sizeof(ECDSA)); + ret=(ECDSA_DATA *)OPENSSL_malloc(sizeof(ECDSA_DATA)); if (ret == NULL) { - ECDSAerr(ECDSA_F_ECDSA_NEW,ERR_R_MALLOC_FAILURE); + ECDSAerr(ECDSA_F_ECDSA_DATA_NEW, ERR_R_MALLOC_FAILURE); return(NULL); } + ret->init = NULL; + ret->finish = ecdsa_finish; + + ret->kinv = NULL; + ret->r = NULL; + ret->meth = ECDSA_get_default_method(); ret->engine = engine; if (!ret->engine) @@ -169,71 +139,69 @@ ECDSA *ECDSA_new_method(ENGINE *engine) ret->meth = ENGINE_get_ECDSA(ret->engine); if (!ret->meth) { - ECDSAerr(ECDSA_R_ECDSA_F_ECDSA_NEW, ERR_R_ENGINE_LIB); + ECDSAerr(ECDSA_F_ECDSA_DATA_NEW, ERR_R_ENGINE_LIB); ENGINE_finish(ret->engine); OPENSSL_free(ret); return NULL; } } - ret->version = 1; - ret->conversion_form = ECDSA_get_default_conversion_form(); - ret->group = NULL; - - ret->pub_key = NULL; - ret->priv_key = NULL; - - ret->kinv = NULL; - ret->r = NULL; - - ret->references = 1; ret->flags = ret->meth->flags; CRYPTO_new_ex_data(CRYPTO_EX_INDEX_ECDSA, ret, &ret->ex_data); +#if 0 if ((ret->meth->init != NULL) && !ret->meth->init(ret)) { CRYPTO_free_ex_data(CRYPTO_EX_INDEX_ECDSA, ret, &ret->ex_data); OPENSSL_free(ret); ret=NULL; } - +#endif return(ret); } -void ECDSA_free(ECDSA *r) +void ECDSA_DATA_free(ECDSA_DATA *r) { - int i; - - if (r == NULL) return; - - i=CRYPTO_add(&r->references,-1,CRYPTO_LOCK_ECDSA); -#ifdef REF_PRINT - REF_PRINT("ECDSA",r); -#endif - if (i > 0) return; -#ifdef REF_CHECK - if (i < 0) - { - fprintf(stderr,"ECDSA_free, bad reference count\n"); - abort(); - } -#endif + if (r->kinv) + BN_clear_free(r->kinv); + if (r->r) + BN_clear_free(r->r); +#if 0 if (r->meth->finish) r->meth->finish(r); +#endif if (r->engine) ENGINE_finish(r->engine); CRYPTO_free_ex_data(CRYPTO_EX_INDEX_ECDSA, r, &r->ex_data); - if (r->group != NULL) EC_GROUP_free(r->group); - if (r->pub_key != NULL) EC_POINT_free(r->pub_key); - if (r->priv_key != NULL) BN_clear_free(r->priv_key); - if (r->kinv != NULL) BN_clear_free(r->kinv); - if (r->r != NULL) BN_clear_free(r->r); + memset((void *)r, 0x0, sizeof(ECDSA_DATA)); + OPENSSL_free(r); } -int ECDSA_size(const ECDSA *r) +ECDSA_DATA *ecdsa_check(EC_KEY *key) +{ + if (key->meth_data) + { + if (key->meth_data->finish != ecdsa_finish) + { + key->meth_data->finish(key); + key->meth_data = (EC_KEY_METH_DATA *)ECDSA_DATA_new(); + } + } + else + key->meth_data = (EC_KEY_METH_DATA *)ECDSA_DATA_new(); + return (ECDSA_DATA *)key->meth_data; +} + +static void ecdsa_finish(EC_KEY *key) +{ + if (key->meth_data && key->meth_data->finish == ecdsa_finish) + ECDSA_DATA_free((ECDSA_DATA *)key->meth_data); +} + +int ECDSA_size(const EC_KEY *r) { int ret,i; ASN1_INTEGER bs; @@ -262,6 +230,7 @@ int ECDSA_size(const ECDSA *r) return(ret); } + int ECDSA_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func, CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func) { @@ -269,50 +238,20 @@ int ECDSA_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func, new_func, dup_func, free_func); } -int ECDSA_set_ex_data(ECDSA *d, int idx, void *arg) +int ECDSA_set_ex_data(EC_KEY *d, int idx, void *arg) { - return(CRYPTO_set_ex_data(&d->ex_data,idx,arg)); -} - -void *ECDSA_get_ex_data(ECDSA *d, int idx) -{ - return(CRYPTO_get_ex_data(&d->ex_data,idx)); -} - -int ECDSA_up_ref(ECDSA *ecdsa) -{ - int i = CRYPTO_add(&ecdsa->references, 1, CRYPTO_LOCK_ECDSA); -#ifdef REF_PRINT - REF_PRINT("ECDSA",r); -#endif -#ifdef REF_CHECK - if (i < 2) - { - fprintf(stderr, "ECDSA_up_ref, bad reference count\n"); - abort(); - } -#endif - return ((i > 1) ? 1 : 0); -} - -void ECDSA_set_conversion_form(ECDSA *ecdsa, const point_conversion_form_t form) -{ - if (ecdsa) ecdsa->conversion_form = form; -} - -point_conversion_form_t ECDSA_get_conversion_form(const ECDSA *ecdsa) -{ - return ecdsa ? ecdsa->conversion_form : 0; -} - -static point_conversion_form_t default_conversion_form = POINT_CONVERSION_UNCOMPRESSED; - -void ECDSA_set_default_conversion_form(const point_conversion_form_t form) -{ - default_conversion_form = form; + ECDSA_DATA *ecdsa; + ecdsa = ecdsa_check(d); + if (ecdsa == NULL) + return 0; + return(CRYPTO_set_ex_data(&ecdsa->ex_data,idx,arg)); } -point_conversion_form_t ECDSA_get_default_conversion_form(void) +void *ECDSA_get_ex_data(EC_KEY *d, int idx) { - return default_conversion_form; + ECDSA_DATA *ecdsa; + ecdsa = ecdsa_check(d); + if (ecdsa == NULL) + return NULL; + return(CRYPTO_get_ex_data(&ecdsa->ex_data,idx)); } diff --git a/crypto/ecdsa/ecs_ossl.c b/crypto/ecdsa/ecs_ossl.c index 96797f332b..f36df31ad7 100644 --- a/crypto/ecdsa/ecs_ossl.c +++ b/crypto/ecdsa/ecs_ossl.c @@ -52,67 +52,17 @@ * Hudson (tjh@cryptsoft.com). * */ -/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ -#include "cryptlib.h" -#include <openssl/ecdsa.h> -/* TODO : general case */ -#define EC_POINT_get_affine_coordinates EC_POINT_get_affine_coordinates_GFp +#include "ecdsa.h" +#include <openssl/err.h> +#include <openssl/obj_mac.h> + +static ECDSA_SIG *ecdsa_do_sign(const unsigned char *dgst, int dlen, + EC_KEY *eckey); +static int ecdsa_sign_setup(EC_KEY *eckey, BN_CTX *ctx_in, BIGNUM **kinvp, + BIGNUM **rp); +static int ecdsa_do_verify(const unsigned char *dgst, int dgst_len, + ECDSA_SIG *sig, EC_KEY *eckey); static ECDSA_SIG *ecdsa_do_sign(const unsigned char *dgst, int dlen, ECDSA *ecdsa); static int ecdsa_sign_setup(ECDSA *ecdsa, BN_CTX *ctx_in, BIGNUM **kinvp, BIGNUM **rp); @@ -120,12 +70,16 @@ static int ecdsa_do_verify(const unsigned char *dgst, int dgst_len, ECDSA_SIG *s ECDSA *ecdsa); static ECDSA_METHOD openssl_ecdsa_meth = { -"OpenSSL ECDSA method", -ecdsa_do_sign, -ecdsa_sign_setup, -ecdsa_do_verify, -0, -NULL + "OpenSSL ECDSA method", + ecdsa_do_sign, + ecdsa_sign_setup, + ecdsa_do_verify, +#if 0 + NULL, /* init */ + NULL, /* finish */ +#endif + 0, /* flags */ + NULL /* app_data */ }; const ECDSA_METHOD *ECDSA_OpenSSL(void) @@ -133,35 +87,52 @@ const ECDSA_METHOD *ECDSA_OpenSSL(void) return &openssl_ecdsa_meth; } -static int ecdsa_sign_setup(ECDSA *ecdsa, BN_CTX *ctx_in, BIGNUM **kinvp, BIGNUM **rp) +static int ecdsa_sign_setup(EC_KEY *eckey, BN_CTX *ctx_in, BIGNUM **kinvp, + BIGNUM **rp) { BN_CTX *ctx = NULL; BIGNUM k,*kinv=NULL,*r=NULL,*order=NULL,*X=NULL; EC_POINT *tmp_point=NULL; - int ret = 0,reason = ERR_R_BN_LIB; - if (!ecdsa || !ecdsa->group || !ecdsa->pub_key || !ecdsa->priv_key) + int ret = 0; + if (!eckey || !eckey->group || !eckey->pub_key || !eckey->priv_key) { - reason = ECDSA_R_MISSING_PARAMETERS; + ECDSAerr(ECDSA_F_ECDSA_SIGN_SETUP, ERR_R_PASSED_NULL_PARAMETER); return 0; } if (ctx_in == NULL) { - if ((ctx=BN_CTX_new()) == NULL) goto err; + if ((ctx=BN_CTX_new()) == NULL) + { + ECDSAerr(ECDSA_F_ECDSA_SIGN_SETUP, ERR_R_MALLOC_FAILURE); + goto err; + } } else ctx=ctx_in; - if ((r = BN_new()) == NULL) goto err; - if ((order = BN_new()) == NULL) goto err; - if ((X = BN_new()) == NULL) goto err; - if ((tmp_point = EC_POINT_new(ecdsa->group)) == NULL) + if ((r = BN_new()) == NULL) + { + ECDSAerr(ECDSA_F_ECDSA_SIGN_SETUP, ERR_R_BN_LIB); + goto err; + } + if ((order = BN_new()) == NULL) { - reason = ERR_R_EC_LIB; + ECDSAerr(ECDSA_F_ECDSA_SIGN_SETUP, ERR_R_BN_LIB); + goto err; + } + if ((X = BN_new()) == NULL) + { + ECDSAerr(ECDSA_F_ECDSA_SIGN_SETUP, ERR_R_BN_LIB); + goto err; + } + if ((tmp_point = EC_POINT_new(eckey->group)) == NULL) + { + ECDSAerr(ECDSA_F_ECDSA_SIGN_SETUP, ERR_R_EC_LIB); goto err; } - if (!EC_GROUP_get_order(ecdsa->group,order,ctx)) + if (!EC_GROUP_get_order(eckey->group,order,ctx)) { - reason = ERR_R_EC_LIB; + ECDSAerr(ECDSA_F_ECDSA_SIGN_SETUP, ERR_R_EC_LIB); goto err; } @@ -172,24 +143,53 @@ static int ecdsa_sign_setup(ECDSA *ecdsa, BN_CTX *ctx_in, BIGNUM **kinvp, BIGNUM do if (!BN_rand_range(&k,order)) { - reason = ECDSA_R_RANDOM_NUMBER_GENERATION_FAILED; + ECDSAerr(ECDSA_F_ECDSA_SIGN_SETUP, + ECDSA_R_RANDOM_NUMBER_GENERATION_FAILED); goto err; } while (BN_is_zero(&k)); /* compute r the x-coordinate of generator * k */ - if (!EC_POINT_mul(ecdsa->group,tmp_point,&k,NULL,NULL,ctx) - || !EC_POINT_get_affine_coordinates(ecdsa->group,tmp_point,X,NULL,ctx)) + if (!EC_POINT_mul(eckey->group, tmp_point, &k, NULL, NULL, ctx)) + { + ECDSAerr(ECDSA_F_ECDSA_SIGN_SETUP, ERR_R_EC_LIB); + goto err; + } + if (EC_METHOD_get_field_type(EC_GROUP_method_of(eckey->group)) + == NID_X9_62_prime_field) + { + if (!EC_POINT_get_affine_coordinates_GFp(eckey->group, + tmp_point, X, NULL, ctx)) + { + ECDSAerr(ECDSA_F_ECDSA_SIGN_SETUP, + ERR_R_EC_LIB); + goto err; + } + } + else /* NID_X9_62_characteristic_two_field */ + { + if (!EC_POINT_get_affine_coordinates_GF2m(eckey->group, + tmp_point, X, NULL, ctx)) + { + ECDSAerr(ECDSA_F_ECDSA_SIGN_SETUP, + ERR_R_EC_LIB); + goto err; + } + } + if (!BN_nnmod(r,X,order,ctx)) { - reason = ERR_R_EC_LIB; + ECDSAerr(ECDSA_F_ECDSA_SIGN_SETUP, ERR_R_BN_LIB); goto err; } - if (!BN_nnmod(r,X,order,ctx)) goto err; } while (BN_is_zero(r)); /* compute the inverse of k */ - if ((kinv = BN_mod_inverse(NULL,&k,order,ctx)) == NULL) goto err; + if ((kinv = BN_mod_inverse(NULL,&k,order,ctx)) == NULL) + { + ECDSAerr(ECDSA_F_ECDSA_SIGN_SETUP, ERR_R_BN_LIB); + goto err; + } if (*rp == NULL) BN_clear_free(*rp); @@ -202,7 +202,6 @@ static int ecdsa_sign_setup(ECDSA *ecdsa, BN_CTX *ctx_in, BIGNUM **kinvp, BIGNUM err: if (!ret) { - ECDSAerr(ECDSA_F_ECDSA_SIGN_SETUP,reason); if (kinv != NULL) BN_clear_free(kinv); if (r != NULL) BN_clear_free(r); } @@ -220,44 +219,60 @@ err: } -static ECDSA_SIG *ecdsa_do_sign(const unsigned char *dgst, int dgst_len, ECDSA *ecdsa) +static ECDSA_SIG *ecdsa_do_sign(const unsigned char *dgst, int dgst_len, + EC_KEY *eckey) { BIGNUM *kinv=NULL,*r=NULL,*s=NULL,*m=NULL,*tmp=NULL,*order=NULL; BIGNUM xr; BN_CTX *ctx=NULL; - int reason=ERR_R_BN_LIB; ECDSA_SIG *ret=NULL; + ECDSA_DATA *ecdsa; + + ecdsa = ecdsa_check(eckey); - if (!ecdsa || !ecdsa->group || !ecdsa->pub_key || !ecdsa->priv_key) + if (!eckey || !eckey->group || !eckey->pub_key || !eckey->priv_key + || !ecdsa) { - reason = ECDSA_R_MISSING_PARAMETERS; + ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_PASSED_NULL_PARAMETER); goto err; } BN_init(&xr); - if ((ctx = BN_CTX_new()) == NULL) goto err; - if ((order = BN_new()) == NULL) goto err; - if ((tmp = BN_new()) == NULL) goto err; - if ((m = BN_new()) == NULL) goto err; - if ((s = BN_new()) == NULL) goto err; + if ((ctx = BN_CTX_new()) == NULL || (order = BN_new()) == NULL || + (tmp = BN_new()) == NULL || (m = BN_new()) == NULL || + (s = BN_new()) == NULL ) + { + ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); + goto err; + } - if (!EC_GROUP_get_order(ecdsa->group,order,ctx)) + if (!EC_GROUP_get_order(eckey->group,order,ctx)) { - reason = ECDSA_R_ERR_EC_LIB; + ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_EC_LIB); goto err; } if (dgst_len > BN_num_bytes(order)) { - reason = ECDSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE; + ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, + ECDSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE); goto err; } - if (BN_bin2bn(dgst,dgst_len,m) == NULL) goto err; + if (BN_bin2bn(dgst,dgst_len,m) == NULL) + { + ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_BN_LIB); + goto err; + } do { - if ((ecdsa->kinv == NULL) || (ecdsa->r == NULL)) + if (ecdsa->kinv == NULL || ecdsa->r == NULL) { - if (!ECDSA_sign_setup(ecdsa,ctx,&kinv,&r)) goto err; + if (!ECDSA_sign_setup(eckey,ctx,&kinv,&r)) + { + ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, + ERR_R_ECDSA_LIB); + goto err; + } } else { @@ -267,109 +282,174 @@ static ECDSA_SIG *ecdsa_do_sign(const unsigned char *dgst, int dgst_len, ECDSA * ecdsa->r = NULL; } - if (!BN_mod_mul(tmp,ecdsa->priv_key,r,order,ctx)) goto err; - if (!BN_add(s,tmp,m)) goto err; + if (!BN_mod_mul(tmp,eckey->priv_key,r,order,ctx)) + { + ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_BN_LIB); + goto err; + } + if (!BN_add(s,tmp,m)) + { + ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_BN_LIB); + goto err; + } if (BN_cmp(s,order) > 0) BN_sub(s,s,order); - if (!BN_mod_mul(s,s,kinv,order,ctx)) goto err; + if (!BN_mod_mul(s,s,kinv,order,ctx)) + { + ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_BN_LIB); + goto err; + } } while (BN_is_zero(s)); if ((ret = ECDSA_SIG_new()) == NULL) { - reason = ECDSA_R_SIGNATURE_MALLOC_FAILED; + ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_MALLOC_FAILURE); goto err; } if (BN_copy(ret->r, r) == NULL || BN_copy(ret->s, s) == NULL) { ECDSA_SIG_free(ret); ret = NULL; - reason = ERR_R_BN_LIB; + ECDSAerr(ECDSA_F_ECDSA_DO_SIGN, ERR_R_BN_LIB); } err: - if (!ret) - { - ECDSAerr(ECDSA_F_ECDSA_DO_SIGN,reason); - } - if (r != NULL) BN_clear_free(r); - if (s != NULL) BN_clear_free(s); - if (ctx != NULL) BN_CTX_free(ctx); - if (m != NULL) BN_clear_free(m); - if (tmp != NULL) BN_clear_free(tmp); - if (order != NULL) BN_clear_free(order); - if (kinv != NULL) BN_clear_free(kinv); + if (r) + BN_clear_free(r); + if (s) + BN_clear_free(s); + if (ctx) + BN_CTX_free(ctx); + if (m) + BN_clear_free(m); + if (tmp) + BN_clear_free(tmp); + if (order) + BN_clear_free(order); + if (kinv) + BN_clear_free(kinv); return(ret); } -static int ecdsa_do_verify(const unsigned char *dgst, int dgst_len, ECDSA_SIG *sig, - ECDSA *ecdsa) +static int ecdsa_do_verify(const unsigned char *dgst, int dgst_len, + ECDSA_SIG *sig, EC_KEY *eckey) { BN_CTX *ctx; BIGNUM *order=NULL,*u1=NULL,*u2=NULL,*m=NULL,*X=NULL; EC_POINT *point=NULL; - int ret = -1,reason = ERR_R_BN_LIB; - if (!ecdsa || !ecdsa->group || !ecdsa->pub_key || !sig) + int ret = -1; + if (!eckey || !eckey->group || !eckey->pub_key || !sig) { - reason = ECDSA_R_MISSING_PARAMETERS; + ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ECDSA_R_MISSING_PARAMETERS); return -1; } - if ((ctx = BN_CTX_new()) == NULL) goto err; - if ((order = BN_new()) == NULL) goto err; - if ((u1 = BN_new()) == NULL) goto err; - if ((u2 = BN_new()) == NULL) goto err; - if ((m = BN_new()) == NULL) goto err; - if ((X = BN_new()) == NULL) goto err; - if (!EC_GROUP_get_order(ecdsa->group,order,ctx)) goto err; + if ((ctx = BN_CTX_new()) == NULL || (order = BN_new()) == NULL || + (u1 = BN_new()) == NULL || (u2 = BN_new()) == NULL || + (m = BN_new()) == NULL || (X = BN_new()) == NULL) + { + ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); + goto err; + } + if (!EC_GROUP_get_order(eckey->group, order, ctx)) + { + ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_BN_LIB); + goto err; + } if (BN_is_zero(sig->r) || sig->r->neg || BN_ucmp(sig->r, order) >= 0) { - reason = ECDSA_R_BAD_SIGNATURE; + ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ECDSA_R_BAD_SIGNATURE); ret = 0; goto err; } if (BN_is_zero(sig->s) || sig->s->neg || BN_ucmp(sig->s, order) >= 0) { - reason = ECDSA_R_BAD_SIGNATURE; + ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ECDSA_R_BAD_SIGNATURE); ret = 0; goto err; } /* calculate tmp1 = inv(S) mod order */ - if ((BN_mod_inverse(u2,sig->s,order,ctx)) == NULL) goto err; + if ((BN_mod_inverse(u2,sig->s,order,ctx)) == NULL) + { + ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_BN_LIB); + goto err; + } /* digest -> m */ - if (BN_bin2bn(dgst,dgst_len,m) == NULL) goto err; + if (BN_bin2bn(dgst,dgst_len,m) == NULL) + { + ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_BN_LIB); + goto err; + } /* u1 = m * tmp mod order */ - if (!BN_mod_mul(u1,m,u2,order,ctx)) goto err; + if (!BN_mod_mul(u1,m,u2,order,ctx)) + { + ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_BN_LIB); + goto err; + } /* u2 = r * w mod q */ - if (!BN_mod_mul(u2,sig->r,u2,order,ctx)) goto err; + if (!BN_mod_mul(u2,sig->r,u2,order,ctx)) + { + ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_BN_LIB); + goto err; + } - if ((point = EC_POINT_new(ecdsa->group)) == NULL) + if ((point = EC_POINT_new(eckey->group)) == NULL) { - reason = ERR_R_EC_LIB; + ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_MALLOC_FAILURE); goto err; } - if (!EC_POINT_mul(ecdsa->group,point,u1,ecdsa->pub_key,u2,ctx) - || !EC_POINT_get_affine_coordinates(ecdsa->group,point,X,NULL,ctx)) + if (!EC_POINT_mul(eckey->group, point, u1, eckey->pub_key, u2, ctx)) + { + ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_EC_LIB); + goto err; + } + if (EC_METHOD_get_field_type(EC_GROUP_method_of(eckey->group)) + == NID_X9_62_prime_field) + { + if (!EC_POINT_get_affine_coordinates_GFp(eckey->group, + point, X, NULL, ctx)) + { + ECDSAerr(ECDSA_F_ECDSA_SIGN_SETUP, ERR_R_EC_LIB); + goto err; + } + } + else /* NID_X9_62_characteristic_two_field */ { - reason = ERR_R_EC_LIB; + if (!EC_POINT_get_affine_coordinates_GF2m(eckey->group, + point, X, NULL, ctx)) + { + ECDSAerr(ECDSA_F_ECDSA_SIGN_SETUP, ERR_R_EC_LIB); + goto err; + } + } + + if (!BN_nnmod(u1,X,order,ctx)) + { + ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY, ERR_R_BN_LIB); goto err; } - if (!BN_nnmod(u1,X,order,ctx)) goto err; /* is now in u1. If the signature is correct, it will be * equal to R. */ ret = (BN_ucmp(u1,sig->r) == 0); err: - if (ret != 1) ECDSAerr(ECDSA_F_ECDSA_DO_VERIFY,reason); - if (ctx != NULL) BN_CTX_free(ctx); - if (u1 != NULL) BN_clear_free(u1); - if (u2 != NULL) BN_clear_free(u2); - if (m != NULL) BN_clear_free(m); - if (X != NULL) BN_clear_free(X); - if (order != NULL) BN_clear_free(order); - if (point != NULL) EC_POINT_free(point); + if (ctx) + BN_CTX_free(ctx); + if (u1) + BN_clear_free(u1); + if (u2) + BN_clear_free(u2); + if (m) + BN_clear_free(m); + if (X) + BN_clear_free(X); + if (order) + BN_clear_free(order); + if (point) + EC_POINT_free(point); return(ret); } diff --git a/crypto/ecdsa/ecs_sign.c b/crypto/ecdsa/ecs_sign.c index eb18685e37..215da1211a 100644 --- a/crypto/ecdsa/ecs_sign.c +++ b/crypto/ecdsa/ecs_sign.c @@ -52,76 +52,23 @@ * Hudson (tjh@cryptsoft.com). * */ -/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ -#include "cryptlib.h" -#include <openssl/ecdsa.h> + +#include "ecdsa.h" #include <openssl/engine.h> -ECDSA_SIG * ECDSA_do_sign(const unsigned char *dgst, int dlen, ECDSA *ecdsa) +ECDSA_SIG * ECDSA_do_sign(const unsigned char *dgst, int dlen, EC_KEY *eckey) { - return ecdsa->meth->ecdsa_do_sign(dgst, dlen, ecdsa); + ECDSA_DATA *ecdsa = ecdsa_check(eckey); + if (ecdsa == NULL) + return NULL; + return ecdsa->meth->ecdsa_do_sign(dgst, dlen, eckey); } -int ECDSA_sign(int type, const unsigned char *dgst, int dlen, unsigned char *sig, - unsigned int *siglen, ECDSA *ecdsa) +int ECDSA_sign(int type, const unsigned char *dgst, int dlen, unsigned char + *sig, unsigned int *siglen, EC_KEY *eckey) { ECDSA_SIG *s; - s=ECDSA_do_sign(dgst,dlen,ecdsa); + s=ECDSA_do_sign(dgst,dlen,eckey); if (s == NULL) { *siglen=0; @@ -132,7 +79,11 @@ int ECDSA_sign(int type, const unsigned char *dgst, int dlen, unsigned char *sig return(1); } -int ECDSA_sign_setup(ECDSA *ecdsa, BN_CTX *ctx_in, BIGNUM **kinvp, BIGNUM **rp) +int ECDSA_sign_setup(EC_KEY *eckey, BN_CTX *ctx_in, BIGNUM **kinvp, + BIGNUM **rp) { - return ecdsa->meth->ecdsa_sign_setup(ecdsa, ctx_in, kinvp, rp); + ECDSA_DATA *ecdsa = ecdsa_check(eckey); + if (ecdsa == NULL) + return 0; + return ecdsa->meth->ecdsa_sign_setup(eckey, ctx_in, kinvp, rp); } diff --git a/crypto/ecdsa/ecs_vrf.c b/crypto/ecdsa/ecs_vrf.c index dddbcfc60c..269671bec8 100644 --- a/crypto/ecdsa/ecs_vrf.c +++ b/crypto/ecdsa/ecs_vrf.c @@ -52,63 +52,8 @@ * Hudson (tjh@cryptsoft.com). * */ -/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ -#include <openssl/ecdsa.h> + +#include "ecdsa.h" #include <openssl/engine.h> /* returns @@ -116,9 +61,13 @@ * 0: incorrect signature * -1: error */ -int ECDSA_do_verify(const unsigned char *dgst, int dgst_len, ECDSA_SIG *sig, ECDSA *ecdsa) +int ECDSA_do_verify(const unsigned char *dgst, int dgst_len, + ECDSA_SIG *sig, EC_KEY *eckey) { - return ecdsa->meth->ecdsa_do_verify(dgst, dgst_len, sig, ecdsa); + ECDSA_DATA *ecdsa = ecdsa_check(eckey); + if (ecdsa == NULL) + return 0; + return ecdsa->meth->ecdsa_do_verify(dgst, dgst_len, sig, eckey); } /* returns @@ -126,15 +75,16 @@ int ECDSA_do_verify(const unsigned char *dgst, int dgst_len, ECDSA_SIG *sig, ECD * 0: incorrect signature * -1: error */ -int ECDSA_verify(int type, const unsigned char *dgst, int dgst_len, const unsigned char *sigbuf, int sig_len, ECDSA *ecdsa) +int ECDSA_verify(int type, const unsigned char *dgst, int dgst_len, + const unsigned char *sigbuf, int sig_len, EC_KEY *eckey) { ECDSA_SIG *s; int ret=-1; s = ECDSA_SIG_new(); if (s == NULL) return(ret); - if (d2i_ECDSA_SIG(&s,&sigbuf,sig_len) == NULL) goto err; - ret=ECDSA_do_verify(dgst,dgst_len,s,ecdsa); + if (d2i_ECDSA_SIG(&s, &sigbuf, sig_len) == NULL) goto err; + ret=ECDSA_do_verify(dgst, dgst_len, s, eckey); err: ECDSA_SIG_free(s); return(ret); diff --git a/crypto/engine/Makefile.ssl b/crypto/engine/Makefile.ssl index 018c9f2a95..a34ce9da13 100644 --- a/crypto/engine/Makefile.ssl +++ b/crypto/engine/Makefile.ssl @@ -25,13 +25,13 @@ APPS= LIB=$(TOP)/libcrypto.a LIBSRC= eng_err.c eng_lib.c eng_list.c eng_init.c eng_ctrl.c \ eng_table.c eng_pkey.c eng_fat.c eng_all.c \ - tb_rsa.c tb_dsa.c tb_ecdsa.c tb_dh.c tb_rand.c tb_cipher.c tb_digest.c \ + tb_rsa.c tb_dsa.c tb_ecdsa.c tb_dh.c tb_rand.c tb_cipher.c tb_digest.c tb_ecdh.c \ eng_openssl.c eng_dyn.c eng_cnf.c \ hw_atalla.c hw_cswift.c hw_ncipher.c hw_nuron.c hw_ubsec.c \ hw_openbsd_dev_crypto.c hw_aep.c hw_sureware.c hw_4758_cca.c LIBOBJ= eng_err.o eng_lib.o eng_list.o eng_init.o eng_ctrl.o \ eng_table.o eng_pkey.o eng_fat.o eng_all.o \ - tb_rsa.o tb_dsa.o tb_ecdsa.o tb_dh.o tb_rand.o tb_cipher.o tb_digest.o \ + tb_rsa.o tb_dsa.o tb_ecdsa.o tb_dh.o tb_rand.o tb_cipher.o tb_digest.o tb_ecdh.o \ eng_openssl.o eng_dyn.o eng_cnf.o \ hw_atalla.o hw_cswift.o hw_ncipher.o hw_nuron.o hw_ubsec.o \ hw_openbsd_dev_crypto.o hw_aep.o hw_sureware.o hw_4758_cca.o @@ -93,11 +93,11 @@ clean: # DO NOT DELETE THIS LINE -- make depend depends on it. -eng_all.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -eng_all.o: ../../include/openssl/bio.h ../../include/openssl/bn.h -eng_all.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h -eng_all.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -eng_all.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +eng_all.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +eng_all.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h +eng_all.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +eng_all.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +eng_all.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h eng_all.o: ../../include/openssl/engine.h ../../include/openssl/err.h eng_all.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h eng_all.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h @@ -106,11 +106,11 @@ eng_all.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h eng_all.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h eng_all.o: eng_all.c eng_int.h eng_cnf.o: ../../e_os.h ../../include/openssl/asn1.h -eng_cnf.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -eng_cnf.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -eng_cnf.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h -eng_cnf.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -eng_cnf.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +eng_cnf.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +eng_cnf.o: ../../include/openssl/buffer.h ../../include/openssl/conf.h +eng_cnf.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h +eng_cnf.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +eng_cnf.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h eng_cnf.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h eng_cnf.o: ../../include/openssl/err.h ../../include/openssl/lhash.h eng_cnf.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h @@ -119,11 +119,11 @@ eng_cnf.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h eng_cnf.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h eng_cnf.o: ../../include/openssl/ui.h ../cryptlib.h eng_cnf.c eng_ctrl.o: ../../e_os.h ../../include/openssl/asn1.h -eng_ctrl.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -eng_ctrl.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -eng_ctrl.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h -eng_ctrl.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -eng_ctrl.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +eng_ctrl.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +eng_ctrl.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +eng_ctrl.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +eng_ctrl.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +eng_ctrl.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h eng_ctrl.o: ../../include/openssl/engine.h ../../include/openssl/err.h eng_ctrl.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h eng_ctrl.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h @@ -132,11 +132,11 @@ eng_ctrl.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h eng_ctrl.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h eng_ctrl.o: ../cryptlib.h eng_ctrl.c eng_int.h eng_dyn.o: ../../e_os.h ../../include/openssl/asn1.h -eng_dyn.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -eng_dyn.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -eng_dyn.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h -eng_dyn.o: ../../include/openssl/dsa.h ../../include/openssl/dso.h -eng_dyn.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +eng_dyn.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +eng_dyn.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +eng_dyn.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +eng_dyn.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h +eng_dyn.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h eng_dyn.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h eng_dyn.o: ../../include/openssl/err.h ../../include/openssl/lhash.h eng_dyn.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h @@ -144,11 +144,11 @@ eng_dyn.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h eng_dyn.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h eng_dyn.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h eng_dyn.o: ../../include/openssl/ui.h ../cryptlib.h eng_dyn.c eng_int.h -eng_err.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -eng_err.o: ../../include/openssl/bio.h ../../include/openssl/bn.h -eng_err.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h -eng_err.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -eng_err.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +eng_err.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +eng_err.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h +eng_err.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +eng_err.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +eng_err.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h eng_err.o: ../../include/openssl/engine.h ../../include/openssl/err.h eng_err.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h eng_err.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h @@ -157,11 +157,11 @@ eng_err.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h eng_err.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h eng_err.o: eng_err.c eng_fat.o: ../../e_os.h ../../include/openssl/asn1.h -eng_fat.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -eng_fat.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -eng_fat.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h -eng_fat.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -eng_fat.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +eng_fat.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +eng_fat.o: ../../include/openssl/buffer.h ../../include/openssl/conf.h +eng_fat.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h +eng_fat.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +eng_fat.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h eng_fat.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h eng_fat.o: ../../include/openssl/err.h ../../include/openssl/lhash.h eng_fat.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h @@ -170,11 +170,11 @@ eng_fat.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h eng_fat.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h eng_fat.o: ../../include/openssl/ui.h ../cryptlib.h eng_fat.c eng_int.h eng_init.o: ../../e_os.h ../../include/openssl/asn1.h -eng_init.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -eng_init.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -eng_init.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h -eng_init.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -eng_init.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +eng_init.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +eng_init.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +eng_init.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +eng_init.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +eng_init.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h eng_init.o: ../../include/openssl/engine.h ../../include/openssl/err.h eng_init.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h eng_init.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h @@ -183,11 +183,11 @@ eng_init.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h eng_init.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h eng_init.o: ../cryptlib.h eng_init.c eng_int.h eng_lib.o: ../../e_os.h ../../include/openssl/asn1.h -eng_lib.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -eng_lib.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -eng_lib.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h -eng_lib.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -eng_lib.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +eng_lib.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +eng_lib.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +eng_lib.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +eng_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +eng_lib.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h eng_lib.o: ../../include/openssl/engine.h ../../include/openssl/err.h eng_lib.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h eng_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h @@ -196,11 +196,11 @@ eng_lib.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h eng_lib.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h eng_lib.o: ../cryptlib.h eng_int.h eng_lib.c eng_list.o: ../../e_os.h ../../include/openssl/asn1.h -eng_list.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -eng_list.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -eng_list.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h -eng_list.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -eng_list.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +eng_list.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +eng_list.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +eng_list.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +eng_list.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +eng_list.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h eng_list.o: ../../include/openssl/engine.h ../../include/openssl/err.h eng_list.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h eng_list.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h @@ -209,14 +209,14 @@ eng_list.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h eng_list.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h eng_list.o: ../cryptlib.h eng_int.h eng_list.c eng_openssl.o: ../../e_os.h ../../include/openssl/aes.h -eng_openssl.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -eng_openssl.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -eng_openssl.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -eng_openssl.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -eng_openssl.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -eng_openssl.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -eng_openssl.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h -eng_openssl.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +eng_openssl.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +eng_openssl.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +eng_openssl.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +eng_openssl.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +eng_openssl.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +eng_openssl.o: ../../include/openssl/dsa.h ../../include/openssl/dso.h +eng_openssl.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +eng_openssl.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h eng_openssl.o: ../../include/openssl/engine.h ../../include/openssl/err.h eng_openssl.o: ../../include/openssl/evp.h ../../include/openssl/idea.h eng_openssl.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -236,11 +236,11 @@ eng_openssl.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h eng_openssl.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h eng_openssl.o: ../cryptlib.h eng_openssl.c eng_pkey.o: ../../e_os.h ../../include/openssl/asn1.h -eng_pkey.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -eng_pkey.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -eng_pkey.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h -eng_pkey.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -eng_pkey.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +eng_pkey.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +eng_pkey.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +eng_pkey.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +eng_pkey.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +eng_pkey.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h eng_pkey.o: ../../include/openssl/engine.h ../../include/openssl/err.h eng_pkey.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h eng_pkey.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h @@ -249,12 +249,12 @@ eng_pkey.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h eng_pkey.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h eng_pkey.o: ../cryptlib.h eng_int.h eng_pkey.c eng_table.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h -eng_table.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -eng_table.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -eng_table.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -eng_table.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -eng_table.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -eng_table.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +eng_table.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +eng_table.o: ../../include/openssl/bn.h ../../include/openssl/cast.h +eng_table.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +eng_table.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +eng_table.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +eng_table.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h eng_table.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h eng_table.o: ../../include/openssl/err.h ../../include/openssl/evp.h eng_table.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h @@ -271,14 +271,14 @@ eng_table.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h eng_table.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h eng_table.o: eng_int.h eng_table.c hw_4758_cca.o: ../../e_os.h ../../include/openssl/aes.h -hw_4758_cca.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -hw_4758_cca.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -hw_4758_cca.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -hw_4758_cca.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -hw_4758_cca.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -hw_4758_cca.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -hw_4758_cca.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h -hw_4758_cca.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +hw_4758_cca.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +hw_4758_cca.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +hw_4758_cca.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +hw_4758_cca.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +hw_4758_cca.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +hw_4758_cca.o: ../../include/openssl/dsa.h ../../include/openssl/dso.h +hw_4758_cca.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +hw_4758_cca.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h hw_4758_cca.o: ../../include/openssl/engine.h ../../include/openssl/err.h hw_4758_cca.o: ../../include/openssl/evp.h ../../include/openssl/idea.h hw_4758_cca.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -297,12 +297,12 @@ hw_4758_cca.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h hw_4758_cca.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h hw_4758_cca.o: ../cryptlib.h hw_4758_cca.c hw_4758_cca_err.c hw_4758_cca_err.h hw_4758_cca.o: vendor_defns/hw_4758_cca.h -hw_aep.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -hw_aep.o: ../../include/openssl/bio.h ../../include/openssl/bn.h -hw_aep.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h -hw_aep.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -hw_aep.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h -hw_aep.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +hw_aep.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +hw_aep.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +hw_aep.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h +hw_aep.o: ../../include/openssl/dsa.h ../../include/openssl/dso.h +hw_aep.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +hw_aep.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h hw_aep.o: ../../include/openssl/engine.h ../../include/openssl/err.h hw_aep.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h hw_aep.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h @@ -311,11 +311,11 @@ hw_aep.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h hw_aep.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h hw_aep.c hw_aep.o: hw_aep_err.c hw_aep_err.h vendor_defns/aep.h hw_atalla.o: ../../e_os.h ../../include/openssl/asn1.h -hw_atalla.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -hw_atalla.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -hw_atalla.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h -hw_atalla.o: ../../include/openssl/dsa.h ../../include/openssl/dso.h -hw_atalla.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +hw_atalla.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +hw_atalla.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +hw_atalla.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +hw_atalla.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h +hw_atalla.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h hw_atalla.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h hw_atalla.o: ../../include/openssl/err.h ../../include/openssl/lhash.h hw_atalla.o: ../../include/openssl/opensslconf.h @@ -326,11 +326,11 @@ hw_atalla.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h hw_atalla.o: ../cryptlib.h hw_atalla.c hw_atalla_err.c hw_atalla_err.h hw_atalla.o: vendor_defns/atalla.h hw_cswift.o: ../../e_os.h ../../include/openssl/asn1.h -hw_cswift.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -hw_cswift.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -hw_cswift.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h -hw_cswift.o: ../../include/openssl/dsa.h ../../include/openssl/dso.h -hw_cswift.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +hw_cswift.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +hw_cswift.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +hw_cswift.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +hw_cswift.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h +hw_cswift.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h hw_cswift.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h hw_cswift.o: ../../include/openssl/err.h ../../include/openssl/lhash.h hw_cswift.o: ../../include/openssl/opensslconf.h @@ -341,14 +341,14 @@ hw_cswift.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h hw_cswift.o: ../cryptlib.h hw_cswift.c hw_cswift_err.c hw_cswift_err.h hw_cswift.o: vendor_defns/cswift.h hw_ncipher.o: ../../e_os.h ../../include/openssl/aes.h -hw_ncipher.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -hw_ncipher.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -hw_ncipher.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -hw_ncipher.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -hw_ncipher.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -hw_ncipher.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -hw_ncipher.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h -hw_ncipher.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +hw_ncipher.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +hw_ncipher.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +hw_ncipher.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +hw_ncipher.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +hw_ncipher.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +hw_ncipher.o: ../../include/openssl/dsa.h ../../include/openssl/dso.h +hw_ncipher.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +hw_ncipher.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h hw_ncipher.o: ../../include/openssl/engine.h ../../include/openssl/err.h hw_ncipher.o: ../../include/openssl/evp.h ../../include/openssl/idea.h hw_ncipher.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -368,11 +368,11 @@ hw_ncipher.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h hw_ncipher.o: ../../include/openssl/x509_vfy.h ../cryptlib.h hw_ncipher.c hw_ncipher.o: hw_ncipher_err.c hw_ncipher_err.h vendor_defns/hwcryptohook.h hw_nuron.o: ../../e_os.h ../../include/openssl/asn1.h -hw_nuron.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -hw_nuron.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -hw_nuron.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h -hw_nuron.o: ../../include/openssl/dsa.h ../../include/openssl/dso.h -hw_nuron.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +hw_nuron.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +hw_nuron.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +hw_nuron.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +hw_nuron.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h +hw_nuron.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h hw_nuron.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h hw_nuron.o: ../../include/openssl/err.h ../../include/openssl/lhash.h hw_nuron.o: ../../include/openssl/opensslconf.h @@ -383,7 +383,6 @@ hw_nuron.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h hw_nuron.o: ../cryptlib.h hw_nuron.c hw_nuron_err.c hw_nuron_err.h hw_openbsd_dev_crypto.o: ../../include/openssl/aes.h hw_openbsd_dev_crypto.o: ../../include/openssl/asn1.h -hw_openbsd_dev_crypto.o: ../../include/openssl/asn1t.h hw_openbsd_dev_crypto.o: ../../include/openssl/bio.h hw_openbsd_dev_crypto.o: ../../include/openssl/blowfish.h hw_openbsd_dev_crypto.o: ../../include/openssl/bn.h @@ -395,6 +394,7 @@ hw_openbsd_dev_crypto.o: ../../include/openssl/des_old.h hw_openbsd_dev_crypto.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h hw_openbsd_dev_crypto.o: ../../include/openssl/e_os2.h hw_openbsd_dev_crypto.o: ../../include/openssl/ec.h +hw_openbsd_dev_crypto.o: ../../include/openssl/ecdh.h hw_openbsd_dev_crypto.o: ../../include/openssl/ecdsa.h hw_openbsd_dev_crypto.o: ../../include/openssl/engine.h hw_openbsd_dev_crypto.o: ../../include/openssl/err.h @@ -424,14 +424,14 @@ hw_openbsd_dev_crypto.o: ../../include/openssl/ui.h hw_openbsd_dev_crypto.o: ../../include/openssl/ui_compat.h ../evp/evp_locl.h hw_openbsd_dev_crypto.o: eng_int.h hw_openbsd_dev_crypto.c hw_sureware.o: ../../e_os.h ../../include/openssl/aes.h -hw_sureware.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -hw_sureware.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -hw_sureware.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -hw_sureware.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -hw_sureware.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -hw_sureware.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -hw_sureware.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h -hw_sureware.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +hw_sureware.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +hw_sureware.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +hw_sureware.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +hw_sureware.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +hw_sureware.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +hw_sureware.o: ../../include/openssl/dsa.h ../../include/openssl/dso.h +hw_sureware.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +hw_sureware.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h hw_sureware.o: ../../include/openssl/engine.h ../../include/openssl/err.h hw_sureware.o: ../../include/openssl/evp.h ../../include/openssl/idea.h hw_sureware.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -452,11 +452,11 @@ hw_sureware.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h hw_sureware.o: ../cryptlib.h eng_int.h engine.h hw_sureware.c hw_sureware_err.c hw_sureware.o: hw_sureware_err.h vendor_defns/sureware.h hw_ubsec.o: ../../e_os.h ../../include/openssl/asn1.h -hw_ubsec.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -hw_ubsec.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -hw_ubsec.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h -hw_ubsec.o: ../../include/openssl/dsa.h ../../include/openssl/dso.h -hw_ubsec.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +hw_ubsec.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +hw_ubsec.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +hw_ubsec.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +hw_ubsec.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h +hw_ubsec.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h hw_ubsec.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h hw_ubsec.o: ../../include/openssl/err.h ../../include/openssl/lhash.h hw_ubsec.o: ../../include/openssl/opensslconf.h @@ -467,12 +467,12 @@ hw_ubsec.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h hw_ubsec.o: ../cryptlib.h hw_ubsec.c hw_ubsec_err.c hw_ubsec_err.h hw_ubsec.o: vendor_defns/hw_ubsec.h tb_cipher.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h -tb_cipher.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -tb_cipher.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -tb_cipher.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -tb_cipher.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -tb_cipher.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -tb_cipher.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +tb_cipher.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +tb_cipher.o: ../../include/openssl/bn.h ../../include/openssl/cast.h +tb_cipher.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +tb_cipher.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +tb_cipher.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +tb_cipher.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h tb_cipher.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h tb_cipher.o: ../../include/openssl/err.h ../../include/openssl/evp.h tb_cipher.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h @@ -489,12 +489,12 @@ tb_cipher.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h tb_cipher.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h tb_cipher.o: eng_int.h tb_cipher.c tb_dh.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h -tb_dh.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -tb_dh.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -tb_dh.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -tb_dh.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -tb_dh.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -tb_dh.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +tb_dh.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +tb_dh.o: ../../include/openssl/bn.h ../../include/openssl/cast.h +tb_dh.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +tb_dh.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +tb_dh.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +tb_dh.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h tb_dh.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h tb_dh.o: ../../include/openssl/err.h ../../include/openssl/evp.h tb_dh.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h @@ -510,12 +510,12 @@ tb_dh.o: ../../include/openssl/sha.h ../../include/openssl/stack.h tb_dh.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h tb_dh.o: ../../include/openssl/ui_compat.h eng_int.h tb_dh.c tb_digest.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h -tb_digest.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -tb_digest.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -tb_digest.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -tb_digest.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -tb_digest.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -tb_digest.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +tb_digest.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +tb_digest.o: ../../include/openssl/bn.h ../../include/openssl/cast.h +tb_digest.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +tb_digest.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +tb_digest.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +tb_digest.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h tb_digest.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h tb_digest.o: ../../include/openssl/err.h ../../include/openssl/evp.h tb_digest.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h @@ -532,12 +532,12 @@ tb_digest.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h tb_digest.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h tb_digest.o: eng_int.h tb_digest.c tb_dsa.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h -tb_dsa.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -tb_dsa.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -tb_dsa.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -tb_dsa.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -tb_dsa.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -tb_dsa.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +tb_dsa.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +tb_dsa.o: ../../include/openssl/bn.h ../../include/openssl/cast.h +tb_dsa.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +tb_dsa.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +tb_dsa.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +tb_dsa.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h tb_dsa.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h tb_dsa.o: ../../include/openssl/err.h ../../include/openssl/evp.h tb_dsa.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h @@ -552,13 +552,34 @@ tb_dsa.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h tb_dsa.o: ../../include/openssl/sha.h ../../include/openssl/stack.h tb_dsa.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h tb_dsa.o: ../../include/openssl/ui_compat.h eng_int.h tb_dsa.c +tb_ecdh.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h +tb_ecdh.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +tb_ecdh.o: ../../include/openssl/bn.h ../../include/openssl/cast.h +tb_ecdh.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +tb_ecdh.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +tb_ecdh.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +tb_ecdh.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h +tb_ecdh.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h +tb_ecdh.o: ../../include/openssl/err.h ../../include/openssl/evp.h +tb_ecdh.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +tb_ecdh.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +tb_ecdh.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +tb_ecdh.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +tb_ecdh.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +tb_ecdh.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h +tb_ecdh.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +tb_ecdh.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +tb_ecdh.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +tb_ecdh.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +tb_ecdh.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +tb_ecdh.o: ../../include/openssl/ui_compat.h eng_int.h tb_ecdh.c tb_ecdsa.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h -tb_ecdsa.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -tb_ecdsa.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -tb_ecdsa.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -tb_ecdsa.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -tb_ecdsa.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -tb_ecdsa.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +tb_ecdsa.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +tb_ecdsa.o: ../../include/openssl/bn.h ../../include/openssl/cast.h +tb_ecdsa.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +tb_ecdsa.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +tb_ecdsa.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +tb_ecdsa.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h tb_ecdsa.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h tb_ecdsa.o: ../../include/openssl/err.h ../../include/openssl/evp.h tb_ecdsa.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h @@ -575,12 +596,12 @@ tb_ecdsa.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h tb_ecdsa.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h tb_ecdsa.o: eng_int.h tb_ecdsa.c tb_rand.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h -tb_rand.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -tb_rand.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -tb_rand.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -tb_rand.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -tb_rand.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -tb_rand.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +tb_rand.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +tb_rand.o: ../../include/openssl/bn.h ../../include/openssl/cast.h +tb_rand.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +tb_rand.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +tb_rand.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +tb_rand.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h tb_rand.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h tb_rand.o: ../../include/openssl/err.h ../../include/openssl/evp.h tb_rand.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h @@ -596,12 +617,12 @@ tb_rand.o: ../../include/openssl/sha.h ../../include/openssl/stack.h tb_rand.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h tb_rand.o: ../../include/openssl/ui_compat.h eng_int.h tb_rand.c tb_rsa.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h -tb_rsa.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -tb_rsa.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -tb_rsa.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -tb_rsa.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -tb_rsa.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -tb_rsa.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +tb_rsa.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +tb_rsa.o: ../../include/openssl/bn.h ../../include/openssl/cast.h +tb_rsa.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +tb_rsa.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +tb_rsa.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +tb_rsa.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h tb_rsa.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h tb_rsa.o: ../../include/openssl/err.h ../../include/openssl/evp.h tb_rsa.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h diff --git a/crypto/engine/eng_fat.c b/crypto/engine/eng_fat.c index f7edb5ad32..c0d03ccbfe 100644 --- a/crypto/engine/eng_fat.c +++ b/crypto/engine/eng_fat.c @@ -52,6 +52,11 @@ * Hudson (tjh@cryptsoft.com). * */ +/* ==================================================================== + * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. + * ECDH support in OpenSSL originally developed by + * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project. + */ #include <openssl/crypto.h> #include "cryptlib.h" @@ -77,6 +82,14 @@ int ENGINE_set_default(ENGINE *e, unsigned int flags) if((flags & ENGINE_METHOD_DH) & !ENGINE_set_default_DH(e)) return 0; #endif +#ifndef OPENSSL_NO_ECDH + if((flags & ENGINE_METHOD_ECDH) & !ENGINE_set_default_ECDH(e)) + return 0; +#endif +#ifndef OPENSSL_NO_ECDSA + if((flags & ENGINE_METHOD_ECDSA) & !ENGINE_set_default_ECDSA(e)) + return 0; +#endif if((flags & ENGINE_METHOD_RAND) & !ENGINE_set_default_RAND(e)) return 0; return 1; @@ -93,6 +106,10 @@ static int int_def_cb(const char *alg, int len, void *arg) *pflags |= ENGINE_METHOD_RSA; else if (!strncmp(alg, "DSA", len)) *pflags |= ENGINE_METHOD_DSA; + else if (!strncmp(alg, "ECDH", len)) + *pflags |= ENGINE_METHOD_ECDH; + else if (!strncmp(alg, "ECDSA", len)) + *pflags |= ENGINE_METHOD_ECDSA; else if (!strncmp(alg, "DH", len)) *pflags |= ENGINE_METHOD_DH; else if (!strncmp(alg, "RAND", len)) @@ -133,6 +150,12 @@ int ENGINE_register_complete(ENGINE *e) #ifndef OPENSSL_NO_DH ENGINE_register_DH(e); #endif +#ifndef OPENSSL_NO_ECDH + ENGINE_register_ECDH(e); +#endif +#ifndef OPENSSL_NO_ECDSA + ENGINE_register_ECDSA(e); +#endif ENGINE_register_RAND(e); return 1; } diff --git a/crypto/engine/eng_int.h b/crypto/engine/eng_int.h index 0407de9e1a..2c82861ebb 100644 --- a/crypto/engine/eng_int.h +++ b/crypto/engine/eng_int.h @@ -55,6 +55,11 @@ * Hudson (tjh@cryptsoft.com). * */ +/* ==================================================================== + * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. + * ECDH support in OpenSSL originally developed by + * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project. + */ #ifndef HEADER_ENGINE_INT_H #define HEADER_ENGINE_INT_H @@ -146,6 +151,7 @@ struct engine_st const RSA_METHOD *rsa_meth; const DSA_METHOD *dsa_meth; const DH_METHOD *dh_meth; + const ECDH_METHOD *ecdh_meth; const ECDSA_METHOD *ecdsa_meth; const RAND_METHOD *rand_meth; /* Cipher handling is via this callback */ diff --git a/crypto/engine/eng_list.c b/crypto/engine/eng_list.c index da53c1c655..5018856781 100644 --- a/crypto/engine/eng_list.c +++ b/crypto/engine/eng_list.c @@ -55,6 +55,11 @@ * Hudson (tjh@cryptsoft.com). * */ +/* ==================================================================== + * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. + * ECDH support in OpenSSL originally developed by + * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project. + */ #include <openssl/crypto.h> #include "cryptlib.h" @@ -324,6 +329,9 @@ static void engine_cpy(ENGINE *dest, const ENGINE *src) #ifndef OPENSSL_NO_DH dest->dh_meth = src->dh_meth; #endif +#ifndef OPENSSL_NO_ECDH + dest->ecdh_meth = src->ecdh_meth; +#endif #ifndef OPENSSL_NO_ECDSA dest->ecdsa_meth = src->ecdsa_meth; #endif diff --git a/crypto/engine/eng_openssl.c b/crypto/engine/eng_openssl.c index e9d976f46b..45fa61834b 100644 --- a/crypto/engine/eng_openssl.c +++ b/crypto/engine/eng_openssl.c @@ -55,6 +55,11 @@ * Hudson (tjh@cryptsoft.com). * */ +/* ==================================================================== + * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. + * ECDH support in OpenSSL originally developed by + * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project. + */ #include <stdio.h> @@ -109,6 +114,12 @@ static int bind_helper(ENGINE *e) #ifndef OPENSSL_NO_DSA || !ENGINE_set_DSA(e, DSA_get_default_method()) #endif +#ifndef OPENSSL_NO_ECDH + || !ENGINE_set_ECDH(e, ECDH_OpenSSL()) +#endif +#ifndef OPENSSL_NO_ECDSA + || !ENGINE_set_ECDSA(e, ECDSA_OpenSSL()) +#endif #ifndef OPENSSL_NO_DH || !ENGINE_set_DH(e, DH_get_default_method()) #endif diff --git a/crypto/engine/engine.h b/crypto/engine/engine.h index 1cd27f8422..50638d4b05 100644 --- a/crypto/engine/engine.h +++ b/crypto/engine/engine.h @@ -55,6 +55,11 @@ * Hudson (tjh@cryptsoft.com). * */ +/* ==================================================================== + * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. + * ECDH support in OpenSSL originally developed by + * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project. + */ #ifndef HEADER_ENGINE_H #define HEADER_ENGINE_H @@ -70,6 +75,9 @@ #ifndef OPENSSL_NO_DH #include <openssl/dh.h> #endif +#ifndef OPENSSL_NO_ECDH +#include <openssl/ecdh.h> +#endif #ifndef OPENSSL_NO_ECDSA #include <openssl/ecdsa.h> #endif @@ -92,6 +100,9 @@ typedef void DSA_METHOD; #ifdef OPENSSL_NO_DH typedef void DH_METHOD; #endif +#ifdef OPENSSL_NO_ECDH +typedef void ECDH_METHOD; +#endif #ifdef OPENSSL_NO_ECDSA typedef void ECDSA_METHOD; #endif @@ -102,7 +113,8 @@ typedef void ECDSA_METHOD; #define ENGINE_METHOD_DSA (unsigned int)0x0002 #define ENGINE_METHOD_DH (unsigned int)0x0004 #define ENGINE_METHOD_RAND (unsigned int)0x0008 -#define ENGINE_METHOD_ECDSA (unsigned int)0x000F +#define ENGINE_METHOD_ECDH (unsigned int)0x0010 +#define ENGINE_METHOD_ECDSA (unsigned int)0x0020 #define ENGINE_METHOD_CIPHERS (unsigned int)0x0040 #define ENGINE_METHOD_DIGESTS (unsigned int)0x0080 /* Obvious all-or-nothing cases. */ @@ -338,6 +350,10 @@ int ENGINE_register_DSA(ENGINE *e); void ENGINE_unregister_DSA(ENGINE *e); void ENGINE_register_all_DSA(void); +int ENGINE_register_ECDH(ENGINE *e); +void ENGINE_unregister_ECDH(ENGINE *e); +void ENGINE_register_all_ECDH(void); + int ENGINE_register_ECDSA(ENGINE *e); void ENGINE_unregister_ECDSA(ENGINE *e); void ENGINE_register_all_ECDSA(void); @@ -421,6 +437,7 @@ int ENGINE_set_id(ENGINE *e, const char *id); int ENGINE_set_name(ENGINE *e, const char *name); int ENGINE_set_RSA(ENGINE *e, const RSA_METHOD *rsa_meth); int ENGINE_set_DSA(ENGINE *e, const DSA_METHOD *dsa_meth); +int ENGINE_set_ECDH(ENGINE *e, const ECDH_METHOD *ecdh_meth); int ENGINE_set_ECDSA(ENGINE *e, const ECDSA_METHOD *ecdsa_meth); int ENGINE_set_DH(ENGINE *e, const DH_METHOD *dh_meth); int ENGINE_set_RAND(ENGINE *e, const RAND_METHOD *rand_meth); @@ -454,6 +471,7 @@ const char *ENGINE_get_id(const ENGINE *e); const char *ENGINE_get_name(const ENGINE *e); const RSA_METHOD *ENGINE_get_RSA(const ENGINE *e); const DSA_METHOD *ENGINE_get_DSA(const ENGINE *e); +const ECDH_METHOD *ENGINE_get_ECDH(const ENGINE *e); const ECDSA_METHOD *ENGINE_get_ECDSA(const ENGINE *e); const DH_METHOD *ENGINE_get_DH(const ENGINE *e); const RAND_METHOD *ENGINE_get_RAND(const ENGINE *e); @@ -507,6 +525,7 @@ EVP_PKEY *ENGINE_load_public_key(ENGINE *e, const char *key_id, ENGINE *ENGINE_get_default_RSA(void); /* Same for the other "methods" */ ENGINE *ENGINE_get_default_DSA(void); +ENGINE *ENGINE_get_default_ECDH(void); ENGINE *ENGINE_get_default_ECDSA(void); ENGINE *ENGINE_get_default_DH(void); ENGINE *ENGINE_get_default_RAND(void); @@ -523,6 +542,7 @@ int ENGINE_set_default_RSA(ENGINE *e); int ENGINE_set_default_string(ENGINE *e, const char *list); /* Same for the other "methods" */ int ENGINE_set_default_DSA(ENGINE *e); +int ENGINE_set_default_ECDH(ENGINE *e); int ENGINE_set_default_ECDSA(ENGINE *e); int ENGINE_set_default_DH(ENGINE *e); int ENGINE_set_default_RAND(ENGINE *e); diff --git a/crypto/engine/hw_cswift.c b/crypto/engine/hw_cswift.c index 31a79a9d16..f5c897bdbb 100644 --- a/crypto/engine/hw_cswift.c +++ b/crypto/engine/hw_cswift.c @@ -501,7 +501,7 @@ static int cswift_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, goto err; default: { - char tmpbuf[20]; + char tmpbuf[DECIMAL_SIZE(sw_status)+1]; CSWIFTerr(CSWIFT_F_CSWIFT_MOD_EXP,CSWIFT_R_REQUEST_FAILED); sprintf(tmpbuf, "%ld", sw_status); ERR_add_error_data(2, "CryptoSwift error number is ",tmpbuf); @@ -518,7 +518,7 @@ static int cswift_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, if((sw_status = p_CSwift_SimpleRequest(hac, SW_CMD_MODEXP, &arg, 1, &res, 1)) != SW_OK) { - char tmpbuf[20]; + char tmpbuf[DECIMAL_SIZE(sw_status)+1]; CSWIFTerr(CSWIFT_F_CSWIFT_MOD_EXP,CSWIFT_R_REQUEST_FAILED); sprintf(tmpbuf, "%ld", sw_status); ERR_add_error_data(2, "CryptoSwift error number is ",tmpbuf); @@ -608,7 +608,7 @@ static int cswift_mod_exp_crt(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, goto err; default: { - char tmpbuf[20]; + char tmpbuf[DECIMAL_SIZE(sw_status)+1]; CSWIFTerr(CSWIFT_F_CSWIFT_MOD_EXP_CRT,CSWIFT_R_REQUEST_FAILED); sprintf(tmpbuf, "%ld", sw_status); ERR_add_error_data(2, "CryptoSwift error number is ",tmpbuf); @@ -625,7 +625,7 @@ static int cswift_mod_exp_crt(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, if((sw_status = p_CSwift_SimpleRequest(hac, SW_CMD_MODEXP_CRT, &arg, 1, &res, 1)) != SW_OK) { - char tmpbuf[20]; + char tmpbuf[DECIMAL_SIZE(sw_status)+1]; CSWIFTerr(CSWIFT_F_CSWIFT_MOD_EXP_CRT,CSWIFT_R_REQUEST_FAILED); sprintf(tmpbuf, "%ld", sw_status); ERR_add_error_data(2, "CryptoSwift error number is ",tmpbuf); @@ -740,7 +740,7 @@ static DSA_SIG *cswift_dsa_sign(const unsigned char *dgst, int dlen, DSA *dsa) goto err; default: { - char tmpbuf[20]; + char tmpbuf[DECIMAL_SIZE(sw_status)+1]; CSWIFTerr(CSWIFT_F_CSWIFT_DSA_SIGN,CSWIFT_R_REQUEST_FAILED); sprintf(tmpbuf, "%ld", sw_status); ERR_add_error_data(2, "CryptoSwift error number is ",tmpbuf); @@ -758,7 +758,7 @@ static DSA_SIG *cswift_dsa_sign(const unsigned char *dgst, int dlen, DSA *dsa) &res, 1); if(sw_status != SW_OK) { - char tmpbuf[20]; + char tmpbuf[DECIMAL_SIZE(sw_status)+1]; CSWIFTerr(CSWIFT_F_CSWIFT_DSA_SIGN,CSWIFT_R_REQUEST_FAILED); sprintf(tmpbuf, "%ld", sw_status); ERR_add_error_data(2, "CryptoSwift error number is ",tmpbuf); @@ -852,7 +852,7 @@ static int cswift_dsa_verify(const unsigned char *dgst, int dgst_len, goto err; default: { - char tmpbuf[20]; + char tmpbuf[DECIMAL_SIZE(sw_status)+1]; CSWIFTerr(CSWIFT_F_CSWIFT_DSA_VERIFY,CSWIFT_R_REQUEST_FAILED); sprintf(tmpbuf, "%ld", sw_status); ERR_add_error_data(2, "CryptoSwift error number is ",tmpbuf); @@ -874,7 +874,7 @@ static int cswift_dsa_verify(const unsigned char *dgst, int dgst_len, &res, 1); if(sw_status != SW_OK) { - char tmpbuf[20]; + char tmpbuf[DECIMAL_SIZE(sw_status)+1]; CSWIFTerr(CSWIFT_F_CSWIFT_DSA_VERIFY,CSWIFT_R_REQUEST_FAILED); sprintf(tmpbuf, "%ld", sw_status); ERR_add_error_data(2, "CryptoSwift error number is ",tmpbuf); diff --git a/crypto/engine/hw_ubsec.c b/crypto/engine/hw_ubsec.c index 63397f868c..ed8401ec16 100644 --- a/crypto/engine/hw_ubsec.c +++ b/crypto/engine/hw_ubsec.c @@ -93,7 +93,7 @@ static int ubsec_rsa_mod_exp(BIGNUM *r0, const BIGNUM *I, RSA *rsa); static int ubsec_mod_exp_mont(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx); #ifndef OPENSSL_NO_DSA -#if NOT_USED +#ifdef NOT_USED static int ubsec_dsa_mod_exp(DSA *dsa, BIGNUM *rr, BIGNUM *a1, BIGNUM *p1, BIGNUM *a2, BIGNUM *p2, BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *in_mont); @@ -113,7 +113,7 @@ static int ubsec_dh_compute_key(unsigned char *key,const BIGNUM *pub_key,DH *dh) static int ubsec_dh_generate_key(DH *dh); #endif -#if NOT_USED +#ifdef NOT_USED static int ubsec_rand_bytes(unsigned char *buf, int num); static int ubsec_rand_status(void); #endif @@ -663,7 +663,7 @@ static int ubsec_mod_exp_crt(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, } #ifndef OPENSSL_NO_DSA -#if NOT_USED +#ifdef NOT_USED static int ubsec_dsa_mod_exp(DSA *dsa, BIGNUM *rr, BIGNUM *a1, BIGNUM *p1, BIGNUM *a2, BIGNUM *p2, BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *in_mont) @@ -987,7 +987,7 @@ err: } #endif -#if NOT_USED +#ifdef NOT_USED static int ubsec_rand_bytes(unsigned char * buf, int num) { diff --git a/crypto/err/Makefile.ssl b/crypto/err/Makefile.ssl index 83367f62e4..1d863ad8d2 100644 --- a/crypto/err/Makefile.ssl +++ b/crypto/err/Makefile.ssl @@ -86,14 +86,14 @@ err.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h err.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h err.o: ../../include/openssl/symhacks.h ../cryptlib.h err.c err_all.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h -err_all.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -err_all.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -err_all.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -err_all.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h -err_all.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -err_all.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -err_all.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h -err_all.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +err_all.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +err_all.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +err_all.o: ../../include/openssl/cast.h ../../include/openssl/conf.h +err_all.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +err_all.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +err_all.o: ../../include/openssl/dsa.h ../../include/openssl/dso.h +err_all.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +err_all.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h err_all.o: ../../include/openssl/engine.h ../../include/openssl/err.h err_all.o: ../../include/openssl/evp.h ../../include/openssl/idea.h err_all.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h diff --git a/crypto/err/err.c b/crypto/err/err.c index 1630cd3034..62e3f42b38 100644 --- a/crypto/err/err.c +++ b/crypto/err/err.c @@ -213,6 +213,7 @@ static ERR_STRING_DATA ERR_str_reasons[]= {ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED ,"called a function you should not call"}, {ERR_R_PASSED_NULL_PARAMETER ,"passed a null parameter"}, {ERR_R_INTERNAL_ERROR ,"internal error"}, +{ERR_R_DISABLED ,"called a function that was disabled at compile-time"}, {0,NULL}, }; diff --git a/crypto/err/err.h b/crypto/err/err.h index 8728ff7c02..ec895c4d12 100644 --- a/crypto/err/err.h +++ b/crypto/err/err.h @@ -132,6 +132,7 @@ typedef struct err_state_st #define ERR_LIB_UI 40 #define ERR_LIB_COMP 41 #define ERR_LIB_ECDSA 42 +#define ERR_LIB_ECDH 43 #define ERR_LIB_USER 128 @@ -161,6 +162,7 @@ typedef struct err_state_st #define UIerr(f,r) ERR_PUT_error(ERR_LIB_UI,(f),(r),__FILE__,__LINE__) #define COMPerr(f,r) ERR_PUT_error(ERR_LIB_COMP,(f),(r),__FILE__,__LINE__) #define ECDSAerr(f,r) ERR_PUT_error(ERR_LIB_ECDSA,(f),(r),__FILE__,__LINE__) +#define ECDHerr(f,r) ERR_PUT_error(ERR_LIB_ECDH,(f),(r),__FILE__,__LINE__) /* Borland C seems too stupid to be able to shift and do longs in * the pre-processor :-( */ @@ -214,6 +216,7 @@ typedef struct err_state_st #define ERR_R_UI_LIB ERR_LIB_UI /* 40 */ #define ERR_R_COMP_LIB ERR_LIB_COMP /* 41 */ #define ERR_R_ECDSA_LIB ERR_LIB_ECDSA /* 42 */ +#define ERR_R_ECDH_LIB ERR_LIB_ECDH /* 43 */ #define ERR_R_NESTED_ASN1_ERROR 58 #define ERR_R_BAD_ASN1_OBJECT_HEADER 59 @@ -228,6 +231,7 @@ typedef struct err_state_st #define ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED (2|ERR_R_FATAL) #define ERR_R_PASSED_NULL_PARAMETER (3|ERR_R_FATAL) #define ERR_R_INTERNAL_ERROR (4|ERR_R_FATAL) +#define ERR_R_DISABLED (5|ERR_R_FATAL) /* 99 is the maximum possible ERR_R_... code, higher values * are reserved for the individual libraries */ diff --git a/crypto/err/openssl.ec b/crypto/err/openssl.ec index 11bb1f9c42..38d68f23e7 100644 --- a/crypto/err/openssl.ec +++ b/crypto/err/openssl.ec @@ -28,6 +28,7 @@ L ENGINE crypto/engine/engine.h crypto/engine/eng_err.c L OCSP crypto/ocsp/ocsp.h crypto/ocsp/ocsp_err.c L UI crypto/ui/ui.h crypto/ui/ui_err.c L ECDSA crypto/ecdsa/ecdsa.h crypto/ecdsa/ecs_err.c +L ECDH crypto/ecdh/ecdh.h crypto/ecdh/ech_err.c # additional header files to be scanned for function names L NONE crypto/x509/x509_vfy.h NONE diff --git a/crypto/evp/Makefile.ssl b/crypto/evp/Makefile.ssl index 0560fcf6a6..70c8f925b0 100644 --- a/crypto/evp/Makefile.ssl +++ b/crypto/evp/Makefile.ssl @@ -199,13 +199,13 @@ c_all.o: ../../include/openssl/sha.h ../../include/openssl/stack.h c_all.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h c_all.o: ../../include/openssl/ui_compat.h ../cryptlib.h c_all.c c_allc.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h -c_allc.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -c_allc.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -c_allc.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -c_allc.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -c_allc.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -c_allc.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -c_allc.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +c_allc.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +c_allc.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +c_allc.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +c_allc.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +c_allc.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +c_allc.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +c_allc.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h c_allc.o: ../../include/openssl/err.h ../../include/openssl/evp.h c_allc.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h c_allc.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -222,13 +222,13 @@ c_allc.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h c_allc.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h c_allc.o: ../cryptlib.h c_allc.c c_alld.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h -c_alld.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -c_alld.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -c_alld.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -c_alld.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -c_alld.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -c_alld.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -c_alld.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +c_alld.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +c_alld.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +c_alld.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +c_alld.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +c_alld.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +c_alld.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +c_alld.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h c_alld.o: ../../include/openssl/err.h ../../include/openssl/evp.h c_alld.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h c_alld.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -245,13 +245,13 @@ c_alld.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h c_alld.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h c_alld.o: ../cryptlib.h c_alld.c digest.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h -digest.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -digest.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -digest.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -digest.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -digest.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -digest.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -digest.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +digest.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +digest.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +digest.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +digest.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +digest.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +digest.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +digest.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h digest.o: ../../include/openssl/engine.h ../../include/openssl/err.h digest.o: ../../include/openssl/evp.h ../../include/openssl/idea.h digest.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -496,14 +496,14 @@ encode.o: ../../include/openssl/sha.h ../../include/openssl/stack.h encode.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h encode.o: ../../include/openssl/ui_compat.h ../cryptlib.h encode.c evp_acnf.o: ../../e_os.h ../../include/openssl/aes.h -evp_acnf.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -evp_acnf.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -evp_acnf.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -evp_acnf.o: ../../include/openssl/cast.h ../../include/openssl/conf.h -evp_acnf.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -evp_acnf.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -evp_acnf.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -evp_acnf.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +evp_acnf.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +evp_acnf.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +evp_acnf.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +evp_acnf.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +evp_acnf.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +evp_acnf.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +evp_acnf.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +evp_acnf.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h evp_acnf.o: ../../include/openssl/engine.h ../../include/openssl/err.h evp_acnf.o: ../../include/openssl/evp.h ../../include/openssl/idea.h evp_acnf.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -519,13 +519,13 @@ evp_acnf.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h evp_acnf.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h evp_acnf.o: ../cryptlib.h evp_acnf.c evp_enc.o: ../../e_os.h ../../include/openssl/aes.h -evp_enc.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -evp_enc.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -evp_enc.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -evp_enc.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -evp_enc.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -evp_enc.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -evp_enc.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +evp_enc.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +evp_enc.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +evp_enc.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +evp_enc.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +evp_enc.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +evp_enc.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +evp_enc.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h evp_enc.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h evp_enc.o: ../../include/openssl/err.h ../../include/openssl/evp.h evp_enc.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h @@ -560,13 +560,13 @@ evp_err.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h evp_err.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h evp_err.o: evp_err.c evp_key.o: ../../e_os.h ../../include/openssl/aes.h -evp_key.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -evp_key.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -evp_key.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -evp_key.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -evp_key.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -evp_key.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -evp_key.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +evp_key.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +evp_key.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +evp_key.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +evp_key.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +evp_key.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +evp_key.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +evp_key.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h evp_key.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h evp_key.o: ../../include/openssl/evp.h ../../include/openssl/idea.h evp_key.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -603,13 +603,13 @@ evp_lib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h evp_lib.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h evp_lib.o: ../cryptlib.h evp_lib.c evp_pbe.o: ../../e_os.h ../../include/openssl/aes.h -evp_pbe.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -evp_pbe.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -evp_pbe.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -evp_pbe.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -evp_pbe.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -evp_pbe.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -evp_pbe.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +evp_pbe.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +evp_pbe.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +evp_pbe.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +evp_pbe.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +evp_pbe.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +evp_pbe.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +evp_pbe.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h evp_pbe.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h evp_pbe.o: ../../include/openssl/evp.h ../../include/openssl/idea.h evp_pbe.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -626,13 +626,13 @@ evp_pbe.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h evp_pbe.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h evp_pbe.o: ../cryptlib.h evp_pbe.c evp_pkey.o: ../../e_os.h ../../include/openssl/aes.h -evp_pkey.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -evp_pkey.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -evp_pkey.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -evp_pkey.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -evp_pkey.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -evp_pkey.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -evp_pkey.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +evp_pkey.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +evp_pkey.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +evp_pkey.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +evp_pkey.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +evp_pkey.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +evp_pkey.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +evp_pkey.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h evp_pkey.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h evp_pkey.o: ../../include/openssl/evp.h ../../include/openssl/idea.h evp_pkey.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -649,13 +649,13 @@ evp_pkey.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h evp_pkey.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h evp_pkey.o: ../../include/openssl/x509_vfy.h ../cryptlib.h evp_pkey.c m_dss.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h -m_dss.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -m_dss.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -m_dss.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -m_dss.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -m_dss.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -m_dss.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -m_dss.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +m_dss.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +m_dss.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +m_dss.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +m_dss.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +m_dss.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +m_dss.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +m_dss.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h m_dss.o: ../../include/openssl/err.h ../../include/openssl/evp.h m_dss.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h m_dss.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -671,13 +671,13 @@ m_dss.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h m_dss.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h m_dss.o: ../../include/openssl/x509_vfy.h ../cryptlib.h m_dss.c m_dss1.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h -m_dss1.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -m_dss1.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -m_dss1.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -m_dss1.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -m_dss1.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -m_dss1.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -m_dss1.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +m_dss1.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +m_dss1.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +m_dss1.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +m_dss1.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +m_dss1.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +m_dss1.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +m_dss1.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h m_dss1.o: ../../include/openssl/err.h ../../include/openssl/evp.h m_dss1.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h m_dss1.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -693,13 +693,13 @@ m_dss1.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h m_dss1.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h m_dss1.o: ../../include/openssl/x509_vfy.h ../cryptlib.h m_dss1.c m_ecdsa.o: ../../e_os.h ../../include/openssl/aes.h -m_ecdsa.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -m_ecdsa.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -m_ecdsa.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -m_ecdsa.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -m_ecdsa.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -m_ecdsa.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -m_ecdsa.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +m_ecdsa.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +m_ecdsa.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +m_ecdsa.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +m_ecdsa.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +m_ecdsa.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +m_ecdsa.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +m_ecdsa.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h m_ecdsa.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h m_ecdsa.o: ../../include/openssl/evp.h ../../include/openssl/idea.h m_ecdsa.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -716,13 +716,13 @@ m_ecdsa.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h m_ecdsa.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h m_ecdsa.o: ../cryptlib.h m_ecdsa.c m_md2.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h -m_md2.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -m_md2.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -m_md2.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -m_md2.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -m_md2.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -m_md2.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -m_md2.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +m_md2.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +m_md2.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +m_md2.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +m_md2.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +m_md2.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +m_md2.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +m_md2.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h m_md2.o: ../../include/openssl/err.h ../../include/openssl/evp.h m_md2.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h m_md2.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -738,13 +738,13 @@ m_md2.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h m_md2.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h m_md2.o: ../../include/openssl/x509_vfy.h ../cryptlib.h m_md2.c m_md4.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h -m_md4.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -m_md4.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -m_md4.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -m_md4.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -m_md4.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -m_md4.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -m_md4.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +m_md4.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +m_md4.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +m_md4.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +m_md4.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +m_md4.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +m_md4.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +m_md4.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h m_md4.o: ../../include/openssl/err.h ../../include/openssl/evp.h m_md4.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h m_md4.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -760,13 +760,13 @@ m_md4.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h m_md4.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h m_md4.o: ../../include/openssl/x509_vfy.h ../cryptlib.h m_md4.c m_md5.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h -m_md5.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -m_md5.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -m_md5.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -m_md5.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -m_md5.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -m_md5.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -m_md5.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +m_md5.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +m_md5.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +m_md5.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +m_md5.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +m_md5.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +m_md5.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +m_md5.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h m_md5.o: ../../include/openssl/err.h ../../include/openssl/evp.h m_md5.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h m_md5.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -782,13 +782,13 @@ m_md5.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h m_md5.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h m_md5.o: ../../include/openssl/x509_vfy.h ../cryptlib.h m_md5.c m_mdc2.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h -m_mdc2.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -m_mdc2.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -m_mdc2.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -m_mdc2.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -m_mdc2.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -m_mdc2.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -m_mdc2.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +m_mdc2.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +m_mdc2.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +m_mdc2.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +m_mdc2.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +m_mdc2.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +m_mdc2.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +m_mdc2.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h m_mdc2.o: ../../include/openssl/err.h ../../include/openssl/evp.h m_mdc2.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h m_mdc2.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -804,13 +804,13 @@ m_mdc2.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h m_mdc2.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h m_mdc2.o: ../../include/openssl/x509_vfy.h ../cryptlib.h m_mdc2.c m_null.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h -m_null.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -m_null.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -m_null.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -m_null.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -m_null.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -m_null.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -m_null.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +m_null.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +m_null.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +m_null.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +m_null.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +m_null.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +m_null.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +m_null.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h m_null.o: ../../include/openssl/err.h ../../include/openssl/evp.h m_null.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h m_null.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -826,13 +826,13 @@ m_null.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h m_null.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h m_null.o: ../../include/openssl/x509_vfy.h ../cryptlib.h m_null.c m_ripemd.o: ../../e_os.h ../../include/openssl/aes.h -m_ripemd.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -m_ripemd.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -m_ripemd.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -m_ripemd.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -m_ripemd.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -m_ripemd.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -m_ripemd.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +m_ripemd.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +m_ripemd.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +m_ripemd.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +m_ripemd.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +m_ripemd.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +m_ripemd.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +m_ripemd.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h m_ripemd.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h m_ripemd.o: ../../include/openssl/evp.h ../../include/openssl/idea.h m_ripemd.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -849,13 +849,13 @@ m_ripemd.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h m_ripemd.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h m_ripemd.o: ../cryptlib.h m_ripemd.c m_sha.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h -m_sha.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -m_sha.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -m_sha.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -m_sha.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -m_sha.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -m_sha.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -m_sha.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +m_sha.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +m_sha.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +m_sha.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +m_sha.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +m_sha.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +m_sha.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +m_sha.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h m_sha.o: ../../include/openssl/err.h ../../include/openssl/evp.h m_sha.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h m_sha.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -871,13 +871,13 @@ m_sha.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h m_sha.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h m_sha.o: ../../include/openssl/x509_vfy.h ../cryptlib.h m_sha.c m_sha1.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h -m_sha1.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -m_sha1.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -m_sha1.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -m_sha1.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -m_sha1.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -m_sha1.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -m_sha1.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +m_sha1.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +m_sha1.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +m_sha1.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +m_sha1.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +m_sha1.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +m_sha1.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +m_sha1.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h m_sha1.o: ../../include/openssl/err.h ../../include/openssl/evp.h m_sha1.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h m_sha1.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -893,13 +893,13 @@ m_sha1.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h m_sha1.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h m_sha1.o: ../../include/openssl/x509_vfy.h ../cryptlib.h m_sha1.c names.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h -names.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -names.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -names.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -names.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -names.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -names.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -names.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +names.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +names.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +names.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +names.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +names.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +names.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +names.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h names.o: ../../include/openssl/err.h ../../include/openssl/evp.h names.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h names.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -915,13 +915,13 @@ names.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h names.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h names.o: ../../include/openssl/x509_vfy.h ../cryptlib.h names.c p5_crpt.o: ../../e_os.h ../../include/openssl/aes.h -p5_crpt.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -p5_crpt.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -p5_crpt.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -p5_crpt.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -p5_crpt.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -p5_crpt.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -p5_crpt.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +p5_crpt.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +p5_crpt.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +p5_crpt.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +p5_crpt.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +p5_crpt.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +p5_crpt.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +p5_crpt.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h p5_crpt.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h p5_crpt.o: ../../include/openssl/evp.h ../../include/openssl/idea.h p5_crpt.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -938,13 +938,13 @@ p5_crpt.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h p5_crpt.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h p5_crpt.o: ../cryptlib.h p5_crpt.c p5_crpt2.o: ../../e_os.h ../../include/openssl/aes.h -p5_crpt2.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -p5_crpt2.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -p5_crpt2.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -p5_crpt2.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -p5_crpt2.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -p5_crpt2.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -p5_crpt2.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +p5_crpt2.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +p5_crpt2.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +p5_crpt2.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +p5_crpt2.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +p5_crpt2.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +p5_crpt2.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +p5_crpt2.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h p5_crpt2.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h p5_crpt2.o: ../../include/openssl/evp.h ../../include/openssl/hmac.h p5_crpt2.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h @@ -962,13 +962,13 @@ p5_crpt2.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h p5_crpt2.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h p5_crpt2.o: ../cryptlib.h p5_crpt2.c p_dec.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h -p_dec.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -p_dec.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -p_dec.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -p_dec.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -p_dec.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -p_dec.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -p_dec.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +p_dec.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +p_dec.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +p_dec.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +p_dec.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +p_dec.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +p_dec.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +p_dec.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h p_dec.o: ../../include/openssl/err.h ../../include/openssl/evp.h p_dec.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h p_dec.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -985,13 +985,13 @@ p_dec.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h p_dec.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h p_dec.o: ../cryptlib.h p_dec.c p_enc.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h -p_enc.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -p_enc.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -p_enc.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -p_enc.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -p_enc.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -p_enc.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -p_enc.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +p_enc.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +p_enc.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +p_enc.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +p_enc.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +p_enc.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +p_enc.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +p_enc.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h p_enc.o: ../../include/openssl/err.h ../../include/openssl/evp.h p_enc.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h p_enc.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -1008,13 +1008,13 @@ p_enc.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h p_enc.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h p_enc.o: ../cryptlib.h p_enc.c p_lib.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h -p_lib.o: ../../include/openssl/asn1_mac.h ../../include/openssl/asn1t.h -p_lib.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -p_lib.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -p_lib.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -p_lib.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -p_lib.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -p_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +p_lib.o: ../../include/openssl/asn1_mac.h ../../include/openssl/bio.h +p_lib.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +p_lib.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +p_lib.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +p_lib.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +p_lib.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +p_lib.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h p_lib.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h p_lib.o: ../../include/openssl/evp.h ../../include/openssl/idea.h p_lib.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -1031,13 +1031,13 @@ p_lib.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h p_lib.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h p_lib.o: ../cryptlib.h p_lib.c p_open.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h -p_open.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -p_open.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -p_open.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -p_open.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -p_open.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -p_open.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -p_open.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +p_open.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +p_open.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +p_open.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +p_open.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +p_open.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +p_open.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +p_open.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h p_open.o: ../../include/openssl/err.h ../../include/openssl/evp.h p_open.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h p_open.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -1053,13 +1053,13 @@ p_open.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h p_open.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h p_open.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p_open.c p_seal.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h -p_seal.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -p_seal.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -p_seal.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -p_seal.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -p_seal.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -p_seal.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -p_seal.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +p_seal.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +p_seal.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +p_seal.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +p_seal.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +p_seal.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +p_seal.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +p_seal.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h p_seal.o: ../../include/openssl/err.h ../../include/openssl/evp.h p_seal.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h p_seal.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -1076,13 +1076,13 @@ p_seal.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h p_seal.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h p_seal.o: ../cryptlib.h p_seal.c p_sign.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h -p_sign.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -p_sign.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -p_sign.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -p_sign.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -p_sign.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -p_sign.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -p_sign.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +p_sign.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +p_sign.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +p_sign.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +p_sign.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +p_sign.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +p_sign.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +p_sign.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h p_sign.o: ../../include/openssl/err.h ../../include/openssl/evp.h p_sign.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h p_sign.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -1098,13 +1098,13 @@ p_sign.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h p_sign.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h p_sign.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p_sign.c p_verify.o: ../../e_os.h ../../include/openssl/aes.h -p_verify.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -p_verify.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -p_verify.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -p_verify.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -p_verify.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -p_verify.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -p_verify.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +p_verify.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +p_verify.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +p_verify.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +p_verify.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +p_verify.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +p_verify.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +p_verify.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h p_verify.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h p_verify.o: ../../include/openssl/evp.h ../../include/openssl/idea.h p_verify.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h diff --git a/crypto/evp/evp.h b/crypto/evp/evp.h index 1a679d5e20..10e9e414c5 100644 --- a/crypto/evp/evp.h +++ b/crypto/evp/evp.h @@ -150,13 +150,13 @@ #define EVP_PK_RSA 0x0001 #define EVP_PK_DSA 0x0002 #define EVP_PK_DH 0x0004 -#define EVP_PK_ECDSA 0x0008 +#define EVP_PK_EC 0x0008 #define EVP_PKT_SIGN 0x0010 #define EVP_PKT_ENC 0x0020 #define EVP_PKT_EXCH 0x0040 #define EVP_PKS_RSA 0x0100 #define EVP_PKS_DSA 0x0200 -#define EVP_PKS_ECDSA 0x0400 +#define EVP_PKS_EC 0x0400 #define EVP_PKT_EXP 0x1000 /* <= 512 bit key */ #define EVP_PKEY_NONE NID_undef @@ -168,7 +168,7 @@ #define EVP_PKEY_DSA3 NID_dsaWithSHA1 #define EVP_PKEY_DSA4 NID_dsaWithSHA1_2 #define EVP_PKEY_DH NID_dhKeyAgreement -#define EVP_PKEY_ECDSA NID_X9_62_id_ecPublicKey +#define EVP_PKEY_EC NID_X9_62_id_ecPublicKey #ifdef __cplusplus extern "C" { @@ -193,8 +193,8 @@ struct evp_pkey_st #ifndef OPENSSL_NO_DH struct dh_st *dh; /* DH */ #endif -#ifndef OPENSSL_NO_ECDSA - struct ecdsa_st *ecdsa; /* ECDSA */ +#ifndef OPENSSL_NO_EC + struct ec_key_st *eckey;/* ECC */ #endif } pkey; int save_parameters; @@ -309,7 +309,7 @@ struct env_md_st #ifndef OPENSSL_NO_ECDSA #define EVP_PKEY_ECDSA_method ECDSA_sign,ECDSA_verify, \ - {EVP_PKEY_ECDSA,0,0,0} + {EVP_PKEY_EC,0,0,0} #else #define EVP_PKEY_ECDSA_method EVP_PKEY_NULL_method #endif @@ -454,9 +454,9 @@ typedef int (EVP_PBE_KEYGEN)(EVP_CIPHER_CTX *ctx, const char *pass, int passlen, (char *)(dh)) #endif -#ifndef OPENSSL_NO_ECDSA -#define EVP_PKEY_assign_ECDSA(pkey,ecdsa) EVP_PKEY_assign((pkey),EVP_PKEY_ECDSA,\ - (char *)(ecdsa)) +#ifndef OPENSSL_NO_EC +#define EVP_PKEY_assign_EC_KEY(pkey,eckey) EVP_PKEY_assign((pkey),EVP_PKEY_EC,\ + (char *)(eckey)) #endif /* Add some extra combinations */ @@ -785,10 +785,10 @@ struct dh_st; int EVP_PKEY_set1_DH(EVP_PKEY *pkey,struct dh_st *key); struct dh_st *EVP_PKEY_get1_DH(EVP_PKEY *pkey); #endif -#ifndef OPENSSL_NO_ECDSA -struct ecdsa_st; -int EVP_PKEY_set1_ECDSA(EVP_PKEY *pkey,struct ecdsa_st *key); -struct ecdsa_st *EVP_PKEY_get1_ECDSA(EVP_PKEY *pkey); +#ifndef OPENSSL_NO_EC +struct ec_key_st; +int EVP_PKEY_set1_EC_KEY(EVP_PKEY *pkey,struct ec_key_st *key); +struct ec_key_st *EVP_PKEY_get1_EC_KEY(EVP_PKEY *pkey); #endif EVP_PKEY * EVP_PKEY_new(void); @@ -848,6 +848,7 @@ void ERR_load_EVP_strings(void); /* Function codes. */ #define EVP_F_D2I_PKEY 100 #define EVP_F_ECDSA_PKEY2PKCS8 129 +#define EVP_F_EC_KEY_PKEY2PKCS8 132 #define EVP_F_EVP_CIPHERINIT 123 #define EVP_F_EVP_CIPHER_CTX_CTRL 124 #define EVP_F_EVP_CIPHER_CTX_SET_KEY_LENGTH 122 @@ -867,6 +868,7 @@ void ERR_load_EVP_strings(void); #define EVP_F_EVP_PKEY_GET1_DH 119 #define EVP_F_EVP_PKEY_GET1_DSA 120 #define EVP_F_EVP_PKEY_GET1_ECDSA 130 +#define EVP_F_EVP_PKEY_GET1_EC_KEY 131 #define EVP_F_EVP_PKEY_GET1_RSA 121 #define EVP_F_EVP_PKEY_NEW 106 #define EVP_F_EVP_RIJNDAEL 126 @@ -896,6 +898,7 @@ void ERR_load_EVP_strings(void); #define EVP_R_EXPECTING_A_DH_KEY 128 #define EVP_R_EXPECTING_A_DSA_KEY 129 #define EVP_R_EXPECTING_A_ECDSA_KEY 141 +#define EVP_R_EXPECTING_A_EC_KEY 142 #define EVP_R_INITIALIZATION_ERROR 134 #define EVP_R_INPUT_NOT_INITIALIZED 111 #define EVP_R_INVALID_KEY_LENGTH 130 diff --git a/crypto/evp/evp_err.c b/crypto/evp/evp_err.c index e6c71d4e01..815ce63b3b 100644 --- a/crypto/evp/evp_err.c +++ b/crypto/evp/evp_err.c @@ -1,6 +1,6 @@ /* crypto/evp/evp_err.c */ /* ==================================================================== - * Copyright (c) 1999 The OpenSSL Project. All rights reserved. + * Copyright (c) 1999-2002 The OpenSSL Project. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -68,6 +68,7 @@ static ERR_STRING_DATA EVP_str_functs[]= { {ERR_PACK(0,EVP_F_D2I_PKEY,0), "D2I_PKEY"}, {ERR_PACK(0,EVP_F_ECDSA_PKEY2PKCS8,0), "ECDSA_PKEY2PKCS8"}, +{ERR_PACK(0,EVP_F_EC_KEY_PKEY2PKCS8,0), "EC_KEY_PKEY2PKCS8"}, {ERR_PACK(0,EVP_F_EVP_CIPHERINIT,0), "EVP_CipherInit"}, {ERR_PACK(0,EVP_F_EVP_CIPHER_CTX_CTRL,0), "EVP_CIPHER_CTX_ctrl"}, {ERR_PACK(0,EVP_F_EVP_CIPHER_CTX_SET_KEY_LENGTH,0), "EVP_CIPHER_CTX_set_key_length"}, @@ -86,7 +87,8 @@ static ERR_STRING_DATA EVP_str_functs[]= {ERR_PACK(0,EVP_F_EVP_PKEY_ENCRYPT,0), "EVP_PKEY_encrypt"}, {ERR_PACK(0,EVP_F_EVP_PKEY_GET1_DH,0), "EVP_PKEY_get1_DH"}, {ERR_PACK(0,EVP_F_EVP_PKEY_GET1_DSA,0), "EVP_PKEY_get1_DSA"}, -{ERR_PACK(0,EVP_F_EVP_PKEY_GET1_ECDSA,0), "EVP_PKEY_get1_ECDSA"}, +{ERR_PACK(0,EVP_F_EVP_PKEY_GET1_ECDSA,0), "EVP_PKEY_GET1_ECDSA"}, +{ERR_PACK(0,EVP_F_EVP_PKEY_GET1_EC_KEY,0), "EVP_PKEY_get1_EC_KEY"}, {ERR_PACK(0,EVP_F_EVP_PKEY_GET1_RSA,0), "EVP_PKEY_get1_RSA"}, {ERR_PACK(0,EVP_F_EVP_PKEY_NEW,0), "EVP_PKEY_new"}, {ERR_PACK(0,EVP_F_EVP_RIJNDAEL,0), "EVP_RIJNDAEL"}, @@ -119,6 +121,7 @@ static ERR_STRING_DATA EVP_str_reasons[]= {EVP_R_EXPECTING_A_DH_KEY ,"expecting a dh key"}, {EVP_R_EXPECTING_A_DSA_KEY ,"expecting a dsa key"}, {EVP_R_EXPECTING_A_ECDSA_KEY ,"expecting a ecdsa key"}, +{EVP_R_EXPECTING_A_EC_KEY ,"expecting a ec key"}, {EVP_R_INITIALIZATION_ERROR ,"initialization error"}, {EVP_R_INPUT_NOT_INITIALIZED ,"input not initialized"}, {EVP_R_INVALID_KEY_LENGTH ,"invalid key length"}, diff --git a/crypto/evp/evp_pkey.c b/crypto/evp/evp_pkey.c index 1772647b16..43200a91a8 100644 --- a/crypto/evp/evp_pkey.c +++ b/crypto/evp/evp_pkey.c @@ -65,8 +65,8 @@ #ifndef OPENSSL_NO_DSA static int dsa_pkey2pkcs8(PKCS8_PRIV_KEY_INFO *p8inf, EVP_PKEY *pkey); #endif -#ifndef OPENSSL_NO_ECDSA -static int ecdsa_pkey2pkcs8(PKCS8_PRIV_KEY_INFO *p8inf, EVP_PKEY *pkey); +#ifndef OPENSSL_NO_EC +static int eckey_pkey2pkcs8(PKCS8_PRIV_KEY_INFO *p8inf, EVP_PKEY *pkey); #endif /* Extract a private key from a PKCS8 structure */ @@ -80,10 +80,10 @@ EVP_PKEY *EVP_PKCS82PKEY (PKCS8_PRIV_KEY_INFO *p8) #ifndef OPENSSL_NO_DSA DSA *dsa = NULL; #endif -#ifndef OPENSSL_NO_ECDSA - ECDSA *ecdsa = NULL; +#ifndef OPENSSL_NO_EC + EC_KEY *eckey = NULL; #endif -#if !defined(OPENSSL_NO_DSA) || !defined(OPENSSL_NO_ECDSA) +#if !defined(OPENSSL_NO_DSA) || !defined(OPENSSL_NO_EC) ASN1_INTEGER *privkey; ASN1_TYPE *t1, *t2, *param = NULL; STACK_OF(ASN1_TYPE) *n_stack = NULL; @@ -124,7 +124,7 @@ EVP_PKEY *EVP_PKCS82PKEY (PKCS8_PRIV_KEY_INFO *p8) EVP_PKEY_assign_RSA (pkey, rsa); break; #endif -#if !defined(OPENSSL_NO_DSA) || !defined(OPENSSL_NO_ECDSA) +#if !defined(OPENSSL_NO_DSA) || !defined(OPENSSL_NO_EC) case NID_ecdsa_with_SHA1: case NID_dsa: /* PKCS#8 DSA/ECDSA is weird: you just get a private key integer @@ -235,35 +235,38 @@ EVP_PKEY *EVP_PKCS82PKEY (PKCS8_PRIV_KEY_INFO *p8) } else /* nid == NID_ecdsa_with_SHA1 */ { -#ifndef OPENSSL_NO_ECDSA - if ((ecdsa = d2i_ECDSAParameters(NULL, &cp, plen)) == NULL) +#ifndef OPENSSL_NO_EC + if ((eckey = d2i_ECParameters(NULL, &cp, + plen)) == NULL) { EVPerr(EVP_F_EVP_PKCS82PKEY, EVP_R_DECODE_ERROR); goto err; } - if ((ecdsa->priv_key = ASN1_INTEGER_to_BN(privkey, NULL)) == NULL) + if ((eckey->priv_key = ASN1_INTEGER_to_BN(privkey, + NULL)) == NULL) { EVPerr(EVP_F_EVP_PKCS82PKEY, EVP_R_DECODE_ERROR); goto err; } - if ((ecdsa->pub_key = EC_POINT_new(ecdsa->group)) == NULL) + if ((eckey->pub_key = EC_POINT_new(eckey->group)) == NULL) { EVPerr(EVP_F_EVP_PKCS82PKEY, ERR_R_EC_LIB); goto err; } - if (!EC_POINT_copy(ecdsa->pub_key, EC_GROUP_get0_generator(ecdsa->group))) + if (!EC_POINT_copy(eckey->pub_key, + EC_GROUP_get0_generator(eckey->group))) { EVPerr(EVP_F_EVP_PKCS82PKEY, ERR_R_EC_LIB); goto err; } - if (!EC_POINT_mul(ecdsa->group, ecdsa->pub_key, ecdsa->priv_key, - NULL, NULL, ctx)) + if (!EC_POINT_mul(eckey->group, eckey->pub_key, + eckey->priv_key, NULL, NULL, ctx)) { EVPerr(EVP_F_EVP_PKCS82PKEY, ERR_R_EC_LIB); goto err; } - EVP_PKEY_assign_ECDSA(pkey, ecdsa); + EVP_PKEY_assign_EC_KEY(pkey, eckey); BN_CTX_free(ctx); if (n_stack) sk_ASN1_TYPE_pop_free(n_stack, ASN1_TYPE_free); else @@ -280,8 +283,9 @@ err: #ifndef OPENSSL_NO_DSA if (dsa) DSA_free(dsa); #endif -#ifndef OPENSSL_NO_ECDSA - if (ecdsa) ECDSA_free(ecdsa); +#ifndef OPENSSL_NO_EC + if (eckey) + EC_KEY_free(eckey); #endif if (pkey) EVP_PKEY_free(pkey); return NULL; @@ -346,9 +350,9 @@ PKCS8_PRIV_KEY_INFO *EVP_PKEY2PKCS8_broken(EVP_PKEY *pkey, int broken) break; #endif -#ifndef OPENSSL_NO_ECDSA - case EVP_PKEY_ECDSA: - if (!ecdsa_pkey2pkcs8(p8, pkey)) +#ifndef OPENSSL_NO_EC + case EVP_PKEY_EC: + if (!eckey_pkey2pkcs8(p8, pkey)) { PKCS8_PRIV_KEY_INFO_free(p8); return(NULL); @@ -499,53 +503,54 @@ static int dsa_pkey2pkcs8(PKCS8_PRIV_KEY_INFO *p8, EVP_PKEY *pkey) } #endif -#ifndef OPENSSL_NO_ECDSA -static int ecdsa_pkey2pkcs8(PKCS8_PRIV_KEY_INFO *p8, EVP_PKEY *pkey) +#ifndef OPENSSL_NO_EC +static int eckey_pkey2pkcs8(PKCS8_PRIV_KEY_INFO *p8, EVP_PKEY *pkey) { ASN1_STRING *params=NULL; ASN1_INTEGER *prkey=NULL; ASN1_TYPE *ttmp=NULL; - STACK_OF(ASN1_TYPE) *necdsa=NULL; + STACK_OF(ASN1_TYPE) *neckey=NULL; unsigned char *p=NULL, *q=NULL; int len=0; EC_POINT *point=NULL; - if (pkey->pkey.ecdsa == NULL || pkey->pkey.ecdsa->group == NULL) + if (pkey->pkey.eckey == NULL || pkey->pkey.eckey->group == NULL) { - EVPerr(EVP_F_ECDSA_PKEY2PKCS8, EVP_R_MISSING_PARAMETERS); + EVPerr(EVP_F_EC_KEY_PKEY2PKCS8, EVP_R_MISSING_PARAMETERS); return 0; } p8->pkeyalg->algorithm = OBJ_nid2obj(NID_ecdsa_with_SHA1); - len = i2d_ECDSAParameters(pkey->pkey.ecdsa, NULL); + len = i2d_ECParameters(pkey->pkey.eckey, NULL); if ((p = OPENSSL_malloc(len)) == NULL) { - EVPerr(EVP_F_ECDSA_PKEY2PKCS8, ERR_R_MALLOC_FAILURE); + EVPerr(EVP_F_EC_KEY_PKEY2PKCS8, ERR_R_MALLOC_FAILURE); return 0; } q = p; - if (!i2d_ECDSAParameters(pkey->pkey.ecdsa, &q)) + if (!i2d_ECParameters(pkey->pkey.eckey, &q)) { - EVPerr(EVP_F_ECDSA_PKEY2PKCS8, ERR_R_ECDSA_LIB); + EVPerr(EVP_F_EC_KEY_PKEY2PKCS8, ERR_R_EC_LIB); OPENSSL_free(p); return 0; } if ((params = ASN1_STRING_new()) == NULL) { - EVPerr(EVP_F_ECDSA_PKEY2PKCS8, ERR_R_MALLOC_FAILURE); + EVPerr(EVP_F_EC_KEY_PKEY2PKCS8, ERR_R_MALLOC_FAILURE); OPENSSL_free(p); return 0; } if (!ASN1_STRING_set(params, p, len)) { - EVPerr(EVP_F_ECDSA_PKEY2PKCS8, ERR_R_ASN1_LIB); + EVPerr(EVP_F_EC_KEY_PKEY2PKCS8, ERR_R_ASN1_LIB); OPENSSL_free(p); return 0; } OPENSSL_free(p); - if ((prkey = BN_to_ASN1_INTEGER(pkey->pkey.ecdsa->priv_key, NULL)) == NULL) + if ((prkey = BN_to_ASN1_INTEGER(pkey->pkey.eckey->priv_key, NULL)) + == NULL) { - EVPerr(EVP_F_ECDSA_PKEY2PKCS8, ERR_R_ASN1_LIB); + EVPerr(EVP_F_EC_KEY_PKEY2PKCS8, ERR_R_ASN1_LIB); return 0; } @@ -557,7 +562,7 @@ static int ecdsa_pkey2pkcs8(PKCS8_PRIV_KEY_INFO *p8, EVP_PKEY *pkey) if (!ASN1_pack_string((char *)prkey, i2d_ASN1_INTEGER, &p8->pkey->value.octet_string)) { - EVPerr(EVP_F_ECDSA_PKEY2PKCS8, ERR_R_MALLOC_FAILURE); + EVPerr(EVP_F_EC_KEY_PKEY2PKCS8, ERR_R_MALLOC_FAILURE); M_ASN1_INTEGER_free(prkey); return 0; } @@ -572,134 +577,137 @@ static int ecdsa_pkey2pkcs8(PKCS8_PRIV_KEY_INFO *p8, EVP_PKEY *pkey) p8->pkeyalg->parameter->value.sequence = params; p8->pkeyalg->parameter->type = V_ASN1_SEQUENCE; - necdsa = sk_ASN1_TYPE_new_null(); - if (necdsa == NULL || (ttmp = ASN1_TYPE_new()) == NULL) + neckey = sk_ASN1_TYPE_new_null(); + if (neckey == NULL || (ttmp = ASN1_TYPE_new()) == NULL) { - EVPerr(EVP_F_ECDSA_PKEY2PKCS8, ERR_R_MALLOC_FAILURE); - sk_ASN1_TYPE_pop_free(necdsa, ASN1_TYPE_free); + EVPerr(EVP_F_EC_KEY_PKEY2PKCS8, ERR_R_MALLOC_FAILURE); + sk_ASN1_TYPE_pop_free(neckey, ASN1_TYPE_free); return 0; } - if ((point = EC_GROUP_get0_generator(pkey->pkey.ecdsa->group)) == NULL) + if ((point = EC_GROUP_get0_generator(pkey->pkey.eckey->group)) + == NULL) { - EVPerr(EVP_F_ECDSA_PKEY2PKCS8, ERR_R_EC_LIB); + EVPerr(EVP_F_EC_KEY_PKEY2PKCS8, ERR_R_EC_LIB); return 0; } - len = EC_POINT_point2oct(pkey->pkey.ecdsa->group, point, ECDSA_get_conversion_form(pkey->pkey.ecdsa), - NULL, 0, NULL); + len = EC_POINT_point2oct(pkey->pkey.eckey->group, point, + pkey->pkey.eckey->conv_form, NULL, 0, NULL); p = OPENSSL_malloc(len); - if (!len || !p || !EC_POINT_point2oct(pkey->pkey.ecdsa->group, point, - ECDSA_get_conversion_form(pkey->pkey.ecdsa), p, len, NULL)) + if (!len || !p || !EC_POINT_point2oct(pkey->pkey.eckey->group, + point, pkey->pkey.eckey->conv_form, p, len, NULL)) { - EVPerr(EVP_F_ECDSA_PKEY2PKCS8, ERR_R_EC_LIB); + EVPerr(EVP_F_EC_KEY_PKEY2PKCS8, ERR_R_EC_LIB); OPENSSL_free(p); return 0; } - if ((ttmp->value.octet_string = ASN1_OCTET_STRING_new()) == NULL) + if ((ttmp->value.octet_string =ASN1_OCTET_STRING_new()) == NULL) { - EVPerr(EVP_F_ECDSA_PKEY2PKCS8, ERR_R_MALLOC_FAILURE); + EVPerr(EVP_F_EC_KEY_PKEY2PKCS8, ERR_R_MALLOC_FAILURE); return 0; } if (!ASN1_OCTET_STRING_set(ttmp->value.octet_string, p, len)) { - EVPerr(EVP_F_ECDSA_PKEY2PKCS8, EVP_R_ASN1_LIB); + EVPerr(EVP_F_EC_KEY_PKEY2PKCS8, EVP_R_ASN1_LIB); return 0; } OPENSSL_free(p); ttmp->type = V_ASN1_OCTET_STRING; - if (!sk_ASN1_TYPE_push(necdsa, ttmp)) + if (!sk_ASN1_TYPE_push(neckey, ttmp)) { - sk_ASN1_TYPE_pop_free(necdsa, ASN1_TYPE_free); + sk_ASN1_TYPE_pop_free(neckey, ASN1_TYPE_free); ASN1_INTEGER_free(prkey); return 0; } if ((ttmp = ASN1_TYPE_new()) == NULL) { - EVPerr(EVP_F_ECDSA_PKEY2PKCS8, ERR_R_MALLOC_FAILURE); + EVPerr(EVP_F_EC_KEY_PKEY2PKCS8, ERR_R_MALLOC_FAILURE); return 0; } ttmp->value.integer = prkey; ttmp->type = V_ASN1_INTEGER; - if (!sk_ASN1_TYPE_push(necdsa, ttmp)) + if (!sk_ASN1_TYPE_push(neckey, ttmp)) { - sk_ASN1_TYPE_pop_free(necdsa, ASN1_TYPE_free); + sk_ASN1_TYPE_pop_free(neckey, ASN1_TYPE_free); ASN1_INTEGER_free(prkey); return 0; } - if ((p8->pkey->value.octet_string = ASN1_OCTET_STRING_new()) == NULL) + if ((p8->pkey->value.octet_string = ASN1_OCTET_STRING_new()) + == NULL) { - EVPerr(EVP_F_ECDSA_PKEY2PKCS8, ERR_R_MALLOC_FAILURE); - sk_ASN1_TYPE_pop_free(necdsa, ASN1_TYPE_free); + EVPerr(EVP_F_EC_KEY_PKEY2PKCS8, ERR_R_MALLOC_FAILURE); + sk_ASN1_TYPE_pop_free(neckey, ASN1_TYPE_free); return 0; } - if (!ASN1_seq_pack_ASN1_TYPE(necdsa, i2d_ASN1_TYPE, + if (!ASN1_seq_pack_ASN1_TYPE(neckey, i2d_ASN1_TYPE, &p8->pkey->value.octet_string->data, &p8->pkey->value.octet_string->length)) { - EVPerr(EVP_F_ECDSA_PKEY2PKCS8, ERR_R_MALLOC_FAILURE); - sk_ASN1_TYPE_pop_free(necdsa, ASN1_TYPE_free); + EVPerr(EVP_F_EC_KEY_PKEY2PKCS8, ERR_R_MALLOC_FAILURE); + sk_ASN1_TYPE_pop_free(neckey, ASN1_TYPE_free); return 0; } - sk_ASN1_TYPE_pop_free(necdsa, ASN1_TYPE_free); + sk_ASN1_TYPE_pop_free(neckey, ASN1_TYPE_free); break; case PKCS8_EMBEDDED_PARAM: p8->pkeyalg->parameter->type = V_ASN1_NULL; - necdsa = sk_ASN1_TYPE_new_null(); + neckey = sk_ASN1_TYPE_new_null(); if ((ttmp = ASN1_TYPE_new()) == NULL) { - EVPerr(EVP_F_ECDSA_PKEY2PKCS8, ERR_R_MALLOC_FAILURE); - sk_ASN1_TYPE_pop_free(necdsa, ASN1_TYPE_free); + EVPerr(EVP_F_EC_KEY_PKEY2PKCS8, ERR_R_MALLOC_FAILURE); + sk_ASN1_TYPE_pop_free(neckey, ASN1_TYPE_free); ASN1_INTEGER_free(prkey); return 0; } ttmp->value.sequence = params; ttmp->type = V_ASN1_SEQUENCE; - if (!sk_ASN1_TYPE_push(necdsa, ttmp)) + if (!sk_ASN1_TYPE_push(neckey, ttmp)) { - sk_ASN1_TYPE_pop_free(necdsa, ASN1_TYPE_free); + sk_ASN1_TYPE_pop_free(neckey, ASN1_TYPE_free); ASN1_INTEGER_free(prkey); return 0; } if ((ttmp = ASN1_TYPE_new()) == NULL) { - EVPerr(EVP_F_ECDSA_PKEY2PKCS8, ERR_R_MALLOC_FAILURE); - sk_ASN1_TYPE_pop_free(necdsa, ASN1_TYPE_free); + EVPerr(EVP_F_EC_KEY_PKEY2PKCS8, ERR_R_MALLOC_FAILURE); + sk_ASN1_TYPE_pop_free(neckey, ASN1_TYPE_free); ASN1_INTEGER_free(prkey); return 0; } ttmp->value.integer = prkey; ttmp->type = V_ASN1_INTEGER; - if (!sk_ASN1_TYPE_push(necdsa, ttmp)) + if (!sk_ASN1_TYPE_push(neckey, ttmp)) { - sk_ASN1_TYPE_pop_free(necdsa, ASN1_TYPE_free); + sk_ASN1_TYPE_pop_free(neckey, ASN1_TYPE_free); ASN1_INTEGER_free(prkey); return 0; } - if ((p8->pkey->value.octet_string = ASN1_OCTET_STRING_new()) == NULL) + if ((p8->pkey->value.octet_string = ASN1_OCTET_STRING_new()) + == NULL) { - EVPerr(EVP_F_ECDSA_PKEY2PKCS8, ERR_R_MALLOC_FAILURE); - sk_ASN1_TYPE_pop_free(necdsa, ASN1_TYPE_free); + EVPerr(EVP_F_EC_KEY_PKEY2PKCS8, ERR_R_MALLOC_FAILURE); + sk_ASN1_TYPE_pop_free(neckey, ASN1_TYPE_free); return 0; } - if (!ASN1_seq_pack_ASN1_TYPE(necdsa, i2d_ASN1_TYPE, + if (!ASN1_seq_pack_ASN1_TYPE(neckey, i2d_ASN1_TYPE, &p8->pkey->value.octet_string->data, &p8->pkey->value.octet_string->length)) { - EVPerr(EVP_F_ECDSA_PKEY2PKCS8, ERR_R_MALLOC_FAILURE); - sk_ASN1_TYPE_pop_free(necdsa, ASN1_TYPE_free); + EVPerr(EVP_F_EC_KEY_PKEY2PKCS8, ERR_R_MALLOC_FAILURE); + sk_ASN1_TYPE_pop_free(neckey, ASN1_TYPE_free); return 0; } - sk_ASN1_TYPE_pop_free(necdsa, ASN1_TYPE_free); + sk_ASN1_TYPE_pop_free(neckey, ASN1_TYPE_free); break; } return 1; diff --git a/crypto/evp/p_lib.c b/crypto/evp/p_lib.c index fcb5711753..1056e4bffd 100644 --- a/crypto/evp/p_lib.c +++ b/crypto/evp/p_lib.c @@ -79,8 +79,8 @@ int EVP_PKEY_bits(EVP_PKEY *pkey) else if (pkey->type == EVP_PKEY_DSA) return(BN_num_bits(pkey->pkey.dsa->p)); #endif -#ifndef OPENSSL_NO_ECDSA - else if (pkey->type == EVP_PKEY_ECDSA) +#ifndef OPENSSL_NO_EC + else if (pkey->type == EVP_PKEY_EC) { BIGNUM *order = BN_new(); int ret; @@ -90,7 +90,7 @@ int EVP_PKEY_bits(EVP_PKEY *pkey) ERR_clear_error(); return 0; } - if (!EC_GROUP_get_order(pkey->pkey.ecdsa->group, order, NULL)) + if (!EC_GROUP_get_order(pkey->pkey.eckey->group, order, NULL)) { ERR_clear_error(); return 0; @@ -117,9 +117,9 @@ int EVP_PKEY_size(EVP_PKEY *pkey) if (pkey->type == EVP_PKEY_DSA) return(DSA_size(pkey->pkey.dsa)); #endif -#ifndef OPENSSL_NO_ECDSA - if (pkey->type == EVP_PKEY_ECDSA) - return(ECDSA_size(pkey->pkey.ecdsa)); +#ifndef OPENSSL_NO_EC + if (pkey->type == EVP_PKEY_EC) + return(ECDSA_size(pkey->pkey.eckey)); #endif return(0); @@ -137,8 +137,8 @@ int EVP_PKEY_save_parameters(EVP_PKEY *pkey, int mode) return(ret); } #endif -#ifndef OPENSSL_NO_ECDSA - if (pkey->type == EVP_PKEY_ECDSA) +#ifndef OPENSSL_NO_EC + if (pkey->type == EVP_PKEY_EC) { int ret = pkey->save_parameters; @@ -181,13 +181,16 @@ int EVP_PKEY_copy_parameters(EVP_PKEY *to, EVP_PKEY *from) to->pkey.dsa->g=a; } #endif -#ifndef OPENSSL_NO_ECDSA - if (to->type == EVP_PKEY_ECDSA) +#ifndef OPENSSL_NO_EC + if (to->type == EVP_PKEY_EC) { - if (to->pkey.ecdsa->group != NULL) - EC_GROUP_free(to->pkey.ecdsa->group); - if ((to->pkey.ecdsa->group = EC_GROUP_new(EC_GROUP_method_of(from->pkey.ecdsa->group))) == NULL) goto err; - if (!EC_GROUP_copy(to->pkey.ecdsa->group,from->pkey.ecdsa->group)) goto err; + if (to->pkey.eckey->group != NULL) + EC_GROUP_free(to->pkey.eckey->group); + if ((to->pkey.eckey->group = EC_GROUP_new( + EC_GROUP_method_of(from->pkey.eckey->group))) == NULL) + goto err; + if (!EC_GROUP_copy(to->pkey.eckey->group, + from->pkey.eckey->group)) goto err; } #endif return(1); @@ -207,10 +210,10 @@ int EVP_PKEY_missing_parameters(EVP_PKEY *pkey) return(1); } #endif -#ifndef OPENSSL_NO_ECDSA - if (pkey->type == EVP_PKEY_ECDSA) +#ifndef OPENSSL_NO_EC + if (pkey->type == EVP_PKEY_EC) { - if (pkey->pkey.ecdsa->group == NULL) + if (pkey->pkey.eckey->group == NULL) return(1); } #endif @@ -303,24 +306,24 @@ DSA *EVP_PKEY_get1_DSA(EVP_PKEY *pkey) } #endif -#ifndef OPENSSL_NO_ECDSA +#ifndef OPENSSL_NO_EC -int EVP_PKEY_set1_ECDSA(EVP_PKEY *pkey, ECDSA *key) +int EVP_PKEY_set1_EC_KEY(EVP_PKEY *pkey, EC_KEY *key) { - int ret = EVP_PKEY_assign_ECDSA(pkey,key); - if (ret) CRYPTO_add(&key->references, 1,CRYPTO_LOCK_ECDSA); + int ret = EVP_PKEY_assign_EC_KEY(pkey,key); + if (ret) CRYPTO_add(&key->references, 1, CRYPTO_LOCK_EC); return ret; } -ECDSA *EVP_PKEY_get1_ECDSA(EVP_PKEY *pkey) +EC_KEY *EVP_PKEY_get1_EC_KEY(EVP_PKEY *pkey) { - if (pkey->type != EVP_PKEY_ECDSA) + if (pkey->type != EVP_PKEY_EC) { - EVPerr(EVP_F_EVP_PKEY_GET1_ECDSA, EVP_R_EXPECTING_A_ECDSA_KEY); + EVPerr(EVP_F_EVP_PKEY_GET1_EC_KEY, EVP_R_EXPECTING_A_EC_KEY); return NULL; } - CRYPTO_add(&pkey->pkey.ecdsa->references, 1, CRYPTO_LOCK_ECDSA); - return pkey->pkey.ecdsa; + CRYPTO_add(&pkey->pkey.eckey->references, 1, CRYPTO_LOCK_EC); + return pkey->pkey.eckey; } #endif @@ -361,8 +364,8 @@ int EVP_PKEY_type(int type) return(EVP_PKEY_DSA); case EVP_PKEY_DH: return(EVP_PKEY_DH); - case EVP_PKEY_ECDSA: - return(EVP_PKEY_ECDSA); + case EVP_PKEY_EC: + return(EVP_PKEY_EC); default: return(NID_undef); } @@ -408,9 +411,9 @@ static void EVP_PKEY_free_it(EVP_PKEY *x) DSA_free(x->pkey.dsa); break; #endif -#ifndef OPENSSL_NO_ECDSA - case EVP_PKEY_ECDSA: - ECDSA_free(x->pkey.ecdsa); +#ifndef OPENSSL_NO_EC + case EVP_PKEY_EC: + EC_KEY_free(x->pkey.eckey); break; #endif #ifndef OPENSSL_NO_DH diff --git a/crypto/install.com b/crypto/install.com index e5200aad9e..b35b424fdd 100644 --- a/crypto/install.com +++ b/crypto/install.com @@ -43,7 +43,7 @@ $ IF F$PARSE("WRK_SSLINCLUDE:") .EQS. "" THEN - $ $ SDIRS := ,MD2,MD4,MD5,SHA,MDC2,HMAC,RIPEMD,- DES,RC2,RC4,RC5,IDEA,BF,CAST,- - BN,EC,RSA,DSA,ECDSA,DH,DSO,ENGINE,AES,- + BN,EC,RSA,DSA,ECDSA,DH,ECDH,DSO,ENGINE,AES,- BUFFER,BIO,STACK,LHASH,RAND,ERR,OBJECTS,- EVP,ASN1,PEM,X509,X509V3,CONF,TXT_DB,PKCS7,PKCS12,COMP,OCSP,- UI,KRB5 @@ -69,6 +69,7 @@ $ EXHEADER_RSA := rsa.h $ EXHEADER_DSA := dsa.h $ EXHEADER_ECDSA := ecdsa.h $ EXHEADER_DH := dh.h +$ EXHEADER_ECDH := ecdh.h $ EXHEADER_DSO := dso.h $ EXHEADER_ENGINE := engine.h $ EXHEADER_AES := aes.h diff --git a/crypto/krb5/Makefile.ssl b/crypto/krb5/Makefile.ssl index 496370f1aa..8daed59211 100644 --- a/crypto/krb5/Makefile.ssl +++ b/crypto/krb5/Makefile.ssl @@ -45,13 +45,13 @@ lib: $(LIBOBJ) @touch lib files: - perl $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO + $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO links: - $(TOP)/util/point.sh Makefile.ssl Makefile ; - $(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) - $(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) - $(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) + @$(TOP)/util/point.sh Makefile.ssl Makefile ; + @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) install: @for i in $(EXHEADER) ; \ diff --git a/crypto/mem.c b/crypto/mem.c index fd08560d23..3955006fca 100644 --- a/crypto/mem.c +++ b/crypto/mem.c @@ -316,6 +316,9 @@ void *CRYPTO_realloc(void *str, int num, const char *file, int line) { void *ret = NULL; + if (str == NULL) + return CRYPTO_malloc(num, file, line); + if (realloc_debug_func != NULL) realloc_debug_func(str, NULL, num, file, line, 0); ret = realloc_ex_func(str,num,file,line); diff --git a/crypto/objects/obj_dat.c b/crypto/objects/obj_dat.c index 3ff64bb8d1..02c3719f04 100644 --- a/crypto/objects/obj_dat.c +++ b/crypto/objects/obj_dat.c @@ -436,7 +436,7 @@ int OBJ_obj2txt(char *buf, int buf_len, const ASN1_OBJECT *a, int no_name) unsigned long l; unsigned char *p; const char *s; - char tbuf[32]; + char tbuf[DECIMAL_SIZE(i)+DECIMAL_SIZE(l)+2]; if (buf_len <= 0) return(0); diff --git a/crypto/objects/obj_dat.h b/crypto/objects/obj_dat.h index 2a4754e0c1..48bb6aa60e 100644 --- a/crypto/objects/obj_dat.h +++ b/crypto/objects/obj_dat.h @@ -62,12 +62,12 @@ * [including the GNU Public Licence.] */ -#define NUM_NID 709 -#define NUM_SN 704 -#define NUM_LN 704 -#define NUM_OBJ 678 +#define NUM_NID 716 +#define NUM_SN 711 +#define NUM_LN 711 +#define NUM_OBJ 685 -static unsigned char lvalues[4814]={ +static unsigned char lvalues[4849]={ 0x00, /* [ 0] OBJ_undef */ 0x2A,0x86,0x48,0x86,0xF7,0x0D, /* [ 1] OBJ_rsadsi */ 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01, /* [ 7] OBJ_pkcs */ @@ -746,6 +746,13 @@ static unsigned char lvalues[4814]={ 0x67,0x2A,0x08,0xAE,0x7B, /* [4791] OBJ_set_brand_Novus */ 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x03,0x0A, /* [4796] OBJ_des_cdmf */ 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01,0x06,/* [4804] OBJ_rsaOAEPEncryptionSET */ +0x67,0x2B,0x0D,0x04,0x03, /* [4813] OBJ_wap_wsg_idm_ecid_wtls3 */ +0x67,0x2B,0x0D,0x04,0x04, /* [4818] OBJ_wap_wsg_idm_ecid_wtls4 */ +0x67,0x2B,0x0D,0x04,0x05, /* [4823] OBJ_wap_wsg_idm_ecid_wtls5 */ +0x67,0x2B,0x0D,0x04,0x07, /* [4828] OBJ_wap_wsg_idm_ecid_wtls7 */ +0x67,0x2B,0x0D,0x04,0x0A, /* [4833] OBJ_wap_wsg_idm_ecid_wtls10 */ +0x67,0x2B,0x0D,0x04,0x0B, /* [4838] OBJ_wap_wsg_idm_ecid_wtls11 */ +0x67,0x2B,0x0D,0x04,0x0C, /* [4843] OBJ_wap_wsg_idm_ecid_wtls12 */ }; static ASN1_OBJECT nid_objs[NUM_NID]={ @@ -1852,6 +1859,20 @@ static ASN1_OBJECT nid_objs[NUM_NID]={ {"DES-CDMF","des-cdmf",NID_des_cdmf,8,&(lvalues[4796]),0}, {"rsaOAEPEncryptionSET","rsaOAEPEncryptionSET", NID_rsaOAEPEncryptionSET,9,&(lvalues[4804]),0}, +{"wap-wsg-idm-ecid-wtls3","wap-wsg-idm-ecid-wtls3", + NID_wap_wsg_idm_ecid_wtls3,5,&(lvalues[4813]),0}, +{"wap-wsg-idm-ecid-wtls4","wap-wsg-idm-ecid-wtls4", + NID_wap_wsg_idm_ecid_wtls4,5,&(lvalues[4818]),0}, +{"wap-wsg-idm-ecid-wtls5","wap-wsg-idm-ecid-wtls5", + NID_wap_wsg_idm_ecid_wtls5,5,&(lvalues[4823]),0}, +{"wap-wsg-idm-ecid-wtls7","wap-wsg-idm-ecid-wtls7", + NID_wap_wsg_idm_ecid_wtls7,5,&(lvalues[4828]),0}, +{"wap-wsg-idm-ecid-wtls10","wap-wsg-idm-ecid-wtls10", + NID_wap_wsg_idm_ecid_wtls10,5,&(lvalues[4833]),0}, +{"wap-wsg-idm-ecid-wtls11","wap-wsg-idm-ecid-wtls11", + NID_wap_wsg_idm_ecid_wtls11,5,&(lvalues[4838]),0}, +{"wap-wsg-idm-ecid-wtls12","wap-wsg-idm-ecid-wtls12", + NID_wap_wsg_idm_ecid_wtls12,5,&(lvalues[4843]),0}, }; static ASN1_OBJECT *sn_objs[NUM_SN]={ @@ -2553,7 +2574,14 @@ static ASN1_OBJECT *sn_objs[NUM_SN]={ &(nid_objs[562]),/* "wap" */ &(nid_objs[563]),/* "wap-wsg" */ &(nid_objs[564]),/* "wap-wsg-idm-ecid-wtls1" */ +&(nid_objs[713]),/* "wap-wsg-idm-ecid-wtls10" */ +&(nid_objs[714]),/* "wap-wsg-idm-ecid-wtls11" */ +&(nid_objs[715]),/* "wap-wsg-idm-ecid-wtls12" */ +&(nid_objs[709]),/* "wap-wsg-idm-ecid-wtls3" */ +&(nid_objs[710]),/* "wap-wsg-idm-ecid-wtls4" */ +&(nid_objs[711]),/* "wap-wsg-idm-ecid-wtls5" */ &(nid_objs[565]),/* "wap-wsg-idm-ecid-wtls6" */ +&(nid_objs[712]),/* "wap-wsg-idm-ecid-wtls7" */ &(nid_objs[566]),/* "wap-wsg-idm-ecid-wtls8" */ &(nid_objs[567]),/* "wap-wsg-idm-ecid-wtls9" */ &(nid_objs[568]),/* "x500UniqueIdentifier" */ @@ -3259,7 +3287,14 @@ static ASN1_OBJECT *ln_objs[NUM_LN]={ &(nid_objs[562]),/* "wap" */ &(nid_objs[563]),/* "wap-wsg" */ &(nid_objs[564]),/* "wap-wsg-idm-ecid-wtls1" */ +&(nid_objs[713]),/* "wap-wsg-idm-ecid-wtls10" */ +&(nid_objs[714]),/* "wap-wsg-idm-ecid-wtls11" */ +&(nid_objs[715]),/* "wap-wsg-idm-ecid-wtls12" */ +&(nid_objs[709]),/* "wap-wsg-idm-ecid-wtls3" */ +&(nid_objs[710]),/* "wap-wsg-idm-ecid-wtls4" */ +&(nid_objs[711]),/* "wap-wsg-idm-ecid-wtls5" */ &(nid_objs[565]),/* "wap-wsg-idm-ecid-wtls6" */ +&(nid_objs[712]),/* "wap-wsg-idm-ecid-wtls7" */ &(nid_objs[566]),/* "wap-wsg-idm-ecid-wtls8" */ &(nid_objs[567]),/* "wap-wsg-idm-ecid-wtls9" */ &(nid_objs[568]),/* "x500UniqueIdentifier" */ @@ -3274,8 +3309,8 @@ static ASN1_OBJECT *obj_objs[NUM_OBJ]={ &(nid_objs[434]),/* OBJ_data 0 9 */ &(nid_objs[181]),/* OBJ_iso 1 */ &(nid_objs[182]),/* OBJ_member_body 1 2 */ -&(nid_objs[527]),/* OBJ_identified_organization 1 3 */ &(nid_objs[379]),/* OBJ_org 1 3 */ +&(nid_objs[527]),/* OBJ_identified_organization 1 3 */ &(nid_objs[393]),/* OBJ_joint_iso_ccitt 2 */ &(nid_objs[11]),/* OBJ_X500 2 5 */ &(nid_objs[380]),/* OBJ_dod 1 3 6 */ @@ -3515,9 +3550,16 @@ static ASN1_OBJECT *obj_objs[NUM_OBJ]={ &(nid_objs[694]),/* OBJ_setAttr_IssCap_Sig 2 23 42 3 3 5 */ &(nid_objs[706]),/* OBJ_set_brand_Novus 2 23 42 8 6011 */ &(nid_objs[564]),/* OBJ_wap_wsg_idm_ecid_wtls1 2 23 43 13 4 1 */ +&(nid_objs[709]),/* OBJ_wap_wsg_idm_ecid_wtls3 2 23 43 13 4 3 */ +&(nid_objs[710]),/* OBJ_wap_wsg_idm_ecid_wtls4 2 23 43 13 4 4 */ +&(nid_objs[711]),/* OBJ_wap_wsg_idm_ecid_wtls5 2 23 43 13 4 5 */ &(nid_objs[565]),/* OBJ_wap_wsg_idm_ecid_wtls6 2 23 43 13 4 6 */ +&(nid_objs[712]),/* OBJ_wap_wsg_idm_ecid_wtls7 2 23 43 13 4 7 */ &(nid_objs[566]),/* OBJ_wap_wsg_idm_ecid_wtls8 2 23 43 13 4 8 */ &(nid_objs[567]),/* OBJ_wap_wsg_idm_ecid_wtls9 2 23 43 13 4 9 */ +&(nid_objs[713]),/* OBJ_wap_wsg_idm_ecid_wtls10 2 23 43 13 4 10 */ +&(nid_objs[714]),/* OBJ_wap_wsg_idm_ecid_wtls11 2 23 43 13 4 11 */ +&(nid_objs[715]),/* OBJ_wap_wsg_idm_ecid_wtls12 2 23 43 13 4 12 */ &(nid_objs[124]),/* OBJ_rle_compression 1 1 1 1 666 1 */ &(nid_objs[125]),/* OBJ_zlib_compression 1 1 1 1 666 2 */ &(nid_objs[ 1]),/* OBJ_rsadsi 1 2 840 113549 */ diff --git a/crypto/objects/obj_mac.h b/crypto/objects/obj_mac.h index 57034c0050..ff9951a272 100644 --- a/crypto/objects/obj_mac.h +++ b/crypto/objects/obj_mac.h @@ -426,10 +426,26 @@ #define NID_wap_wsg_idm_ecid_wtls1 564 #define OBJ_wap_wsg_idm_ecid_wtls1 OBJ_wap_wsg_idm_ecid,1L +#define SN_wap_wsg_idm_ecid_wtls3 "wap-wsg-idm-ecid-wtls3" +#define NID_wap_wsg_idm_ecid_wtls3 709 +#define OBJ_wap_wsg_idm_ecid_wtls3 OBJ_wap_wsg_idm_ecid,3L + +#define SN_wap_wsg_idm_ecid_wtls4 "wap-wsg-idm-ecid-wtls4" +#define NID_wap_wsg_idm_ecid_wtls4 710 +#define OBJ_wap_wsg_idm_ecid_wtls4 OBJ_wap_wsg_idm_ecid,4L + +#define SN_wap_wsg_idm_ecid_wtls5 "wap-wsg-idm-ecid-wtls5" +#define NID_wap_wsg_idm_ecid_wtls5 711 +#define OBJ_wap_wsg_idm_ecid_wtls5 OBJ_wap_wsg_idm_ecid,5L + #define SN_wap_wsg_idm_ecid_wtls6 "wap-wsg-idm-ecid-wtls6" #define NID_wap_wsg_idm_ecid_wtls6 565 #define OBJ_wap_wsg_idm_ecid_wtls6 OBJ_wap_wsg_idm_ecid,6L +#define SN_wap_wsg_idm_ecid_wtls7 "wap-wsg-idm-ecid-wtls7" +#define NID_wap_wsg_idm_ecid_wtls7 712 +#define OBJ_wap_wsg_idm_ecid_wtls7 OBJ_wap_wsg_idm_ecid,7L + #define SN_wap_wsg_idm_ecid_wtls8 "wap-wsg-idm-ecid-wtls8" #define NID_wap_wsg_idm_ecid_wtls8 566 #define OBJ_wap_wsg_idm_ecid_wtls8 OBJ_wap_wsg_idm_ecid,8L @@ -438,6 +454,18 @@ #define NID_wap_wsg_idm_ecid_wtls9 567 #define OBJ_wap_wsg_idm_ecid_wtls9 OBJ_wap_wsg_idm_ecid,9L +#define SN_wap_wsg_idm_ecid_wtls10 "wap-wsg-idm-ecid-wtls10" +#define NID_wap_wsg_idm_ecid_wtls10 713 +#define OBJ_wap_wsg_idm_ecid_wtls10 OBJ_wap_wsg_idm_ecid,10L + +#define SN_wap_wsg_idm_ecid_wtls11 "wap-wsg-idm-ecid-wtls11" +#define NID_wap_wsg_idm_ecid_wtls11 714 +#define OBJ_wap_wsg_idm_ecid_wtls11 OBJ_wap_wsg_idm_ecid,11L + +#define SN_wap_wsg_idm_ecid_wtls12 "wap-wsg-idm-ecid-wtls12" +#define NID_wap_wsg_idm_ecid_wtls12 715 +#define OBJ_wap_wsg_idm_ecid_wtls12 OBJ_wap_wsg_idm_ecid,12L + #define SN_cast5_cbc "CAST5-CBC" #define LN_cast5_cbc "cast5-cbc" #define NID_cast5_cbc 108 diff --git a/crypto/objects/obj_mac.num b/crypto/objects/obj_mac.num index 9f241b666b..9e756f12a2 100644 --- a/crypto/objects/obj_mac.num +++ b/crypto/objects/obj_mac.num @@ -706,3 +706,10 @@ set_brand_MasterCard 705 set_brand_Novus 706 des_cdmf 707 rsaOAEPEncryptionSET 708 +wap_wsg_idm_ecid_wtls3 709 +wap_wsg_idm_ecid_wtls4 710 +wap_wsg_idm_ecid_wtls5 711 +wap_wsg_idm_ecid_wtls7 712 +wap_wsg_idm_ecid_wtls10 713 +wap_wsg_idm_ecid_wtls11 714 +wap_wsg_idm_ecid_wtls12 715 diff --git a/crypto/objects/objects.txt b/crypto/objects/objects.txt index b3eebada17..8ba8d006eb 100644 --- a/crypto/objects/objects.txt +++ b/crypto/objects/objects.txt @@ -111,9 +111,16 @@ secg-ellipticCurve 39 : sect571r1 # WAP/TLS curve OIDs (http://www.wapforum.org/) !Alias wap-wsg-idm-ecid wap-wsg 4 wap-wsg-idm-ecid 1 : wap-wsg-idm-ecid-wtls1 +wap-wsg-idm-ecid 3 : wap-wsg-idm-ecid-wtls3 +wap-wsg-idm-ecid 4 : wap-wsg-idm-ecid-wtls4 +wap-wsg-idm-ecid 5 : wap-wsg-idm-ecid-wtls5 wap-wsg-idm-ecid 6 : wap-wsg-idm-ecid-wtls6 +wap-wsg-idm-ecid 7 : wap-wsg-idm-ecid-wtls7 wap-wsg-idm-ecid 8 : wap-wsg-idm-ecid-wtls8 wap-wsg-idm-ecid 9 : wap-wsg-idm-ecid-wtls9 +wap-wsg-idm-ecid 10 : wap-wsg-idm-ecid-wtls10 +wap-wsg-idm-ecid 11 : wap-wsg-idm-ecid-wtls11 +wap-wsg-idm-ecid 12 : wap-wsg-idm-ecid-wtls12 ISO-US 113533 7 66 10 : CAST5-CBC : cast5-cbc diff --git a/crypto/ocsp/Makefile.ssl b/crypto/ocsp/Makefile.ssl index 25433f5b53..58fff4f941 100644 --- a/crypto/ocsp/Makefile.ssl +++ b/crypto/ocsp/Makefile.ssl @@ -47,13 +47,13 @@ lib: $(LIBOBJ) @touch lib files: - perl $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO + $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO links: - $(TOP)/util/point.sh Makefile.ssl Makefile ; - $(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) - $(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) - $(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) + @$(TOP)/util/point.sh Makefile.ssl Makefile ; + @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) + @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) + @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) install: @for i in $(EXHEADER) ; \ @@ -90,12 +90,13 @@ ocsp_asn.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h ocsp_asn.o: ../../include/openssl/des.h ../../include/openssl/des_old.h ocsp_asn.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h ocsp_asn.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h -ocsp_asn.o: ../../include/openssl/ecdsa.h ../../include/openssl/evp.h -ocsp_asn.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h -ocsp_asn.o: ../../include/openssl/md2.h ../../include/openssl/md4.h -ocsp_asn.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h -ocsp_asn.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h -ocsp_asn.o: ../../include/openssl/ocsp.h ../../include/openssl/opensslconf.h +ocsp_asn.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h +ocsp_asn.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +ocsp_asn.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +ocsp_asn.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +ocsp_asn.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +ocsp_asn.o: ../../include/openssl/objects.h ../../include/openssl/ocsp.h +ocsp_asn.o: ../../include/openssl/opensslconf.h ocsp_asn.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h ocsp_asn.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h ocsp_asn.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h @@ -106,14 +107,14 @@ ocsp_asn.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h ocsp_asn.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h ocsp_asn.o: ../../include/openssl/x509v3.h ocsp_asn.c ocsp_cl.o: ../../e_os.h ../../include/openssl/aes.h -ocsp_cl.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -ocsp_cl.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -ocsp_cl.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -ocsp_cl.o: ../../include/openssl/cast.h ../../include/openssl/conf.h -ocsp_cl.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -ocsp_cl.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -ocsp_cl.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -ocsp_cl.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +ocsp_cl.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +ocsp_cl.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +ocsp_cl.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +ocsp_cl.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +ocsp_cl.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +ocsp_cl.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +ocsp_cl.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +ocsp_cl.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h ocsp_cl.o: ../../include/openssl/err.h ../../include/openssl/evp.h ocsp_cl.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h ocsp_cl.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -132,13 +133,13 @@ ocsp_cl.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h ocsp_cl.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h ocsp_cl.o: ../cryptlib.h ocsp_cl.c ocsp_err.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h -ocsp_err.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -ocsp_err.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -ocsp_err.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -ocsp_err.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h -ocsp_err.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -ocsp_err.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -ocsp_err.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +ocsp_err.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +ocsp_err.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +ocsp_err.o: ../../include/openssl/cast.h ../../include/openssl/conf.h +ocsp_err.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +ocsp_err.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +ocsp_err.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +ocsp_err.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h ocsp_err.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h ocsp_err.o: ../../include/openssl/evp.h ../../include/openssl/idea.h ocsp_err.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -156,14 +157,14 @@ ocsp_err.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h ocsp_err.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h ocsp_err.o: ../../include/openssl/x509v3.h ocsp_err.c ocsp_ext.o: ../../e_os.h ../../include/openssl/aes.h -ocsp_ext.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -ocsp_ext.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -ocsp_ext.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -ocsp_ext.o: ../../include/openssl/cast.h ../../include/openssl/conf.h -ocsp_ext.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -ocsp_ext.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -ocsp_ext.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -ocsp_ext.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +ocsp_ext.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +ocsp_ext.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +ocsp_ext.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +ocsp_ext.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +ocsp_ext.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +ocsp_ext.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +ocsp_ext.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +ocsp_ext.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h ocsp_ext.o: ../../include/openssl/err.h ../../include/openssl/evp.h ocsp_ext.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h ocsp_ext.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -181,13 +182,13 @@ ocsp_ext.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h ocsp_ext.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h ocsp_ext.o: ../cryptlib.h ocsp_ext.c ocsp_ht.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h -ocsp_ht.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -ocsp_ht.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -ocsp_ht.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -ocsp_ht.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h -ocsp_ht.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -ocsp_ht.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -ocsp_ht.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +ocsp_ht.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +ocsp_ht.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +ocsp_ht.o: ../../include/openssl/cast.h ../../include/openssl/conf.h +ocsp_ht.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +ocsp_ht.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +ocsp_ht.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +ocsp_ht.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h ocsp_ht.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h ocsp_ht.o: ../../include/openssl/evp.h ../../include/openssl/idea.h ocsp_ht.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -205,14 +206,14 @@ ocsp_ht.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h ocsp_ht.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h ocsp_ht.o: ocsp_ht.c ocsp_lib.o: ../../e_os.h ../../include/openssl/aes.h -ocsp_lib.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -ocsp_lib.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -ocsp_lib.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -ocsp_lib.o: ../../include/openssl/cast.h ../../include/openssl/conf.h -ocsp_lib.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -ocsp_lib.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -ocsp_lib.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -ocsp_lib.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +ocsp_lib.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +ocsp_lib.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +ocsp_lib.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +ocsp_lib.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +ocsp_lib.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +ocsp_lib.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +ocsp_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +ocsp_lib.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h ocsp_lib.o: ../../include/openssl/err.h ../../include/openssl/evp.h ocsp_lib.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h ocsp_lib.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -231,13 +232,13 @@ ocsp_lib.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h ocsp_lib.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h ocsp_lib.o: ../cryptlib.h ocsp_lib.c ocsp_prn.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h -ocsp_prn.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -ocsp_prn.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -ocsp_prn.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -ocsp_prn.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h -ocsp_prn.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -ocsp_prn.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -ocsp_prn.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +ocsp_prn.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +ocsp_prn.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +ocsp_prn.o: ../../include/openssl/cast.h ../../include/openssl/conf.h +ocsp_prn.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +ocsp_prn.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +ocsp_prn.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +ocsp_prn.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h ocsp_prn.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h ocsp_prn.o: ../../include/openssl/evp.h ../../include/openssl/idea.h ocsp_prn.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -256,14 +257,14 @@ ocsp_prn.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h ocsp_prn.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h ocsp_prn.o: ../../include/openssl/x509v3.h ocsp_prn.c ocsp_srv.o: ../../e_os.h ../../include/openssl/aes.h -ocsp_srv.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -ocsp_srv.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -ocsp_srv.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -ocsp_srv.o: ../../include/openssl/cast.h ../../include/openssl/conf.h -ocsp_srv.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -ocsp_srv.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -ocsp_srv.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -ocsp_srv.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +ocsp_srv.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +ocsp_srv.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +ocsp_srv.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +ocsp_srv.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +ocsp_srv.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +ocsp_srv.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +ocsp_srv.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +ocsp_srv.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h ocsp_srv.o: ../../include/openssl/err.h ../../include/openssl/evp.h ocsp_srv.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h ocsp_srv.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -282,13 +283,13 @@ ocsp_srv.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h ocsp_srv.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h ocsp_srv.o: ../cryptlib.h ocsp_srv.c ocsp_vfy.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h -ocsp_vfy.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -ocsp_vfy.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -ocsp_vfy.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -ocsp_vfy.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h -ocsp_vfy.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -ocsp_vfy.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -ocsp_vfy.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +ocsp_vfy.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +ocsp_vfy.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +ocsp_vfy.o: ../../include/openssl/cast.h ../../include/openssl/conf.h +ocsp_vfy.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +ocsp_vfy.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +ocsp_vfy.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +ocsp_vfy.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h ocsp_vfy.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h ocsp_vfy.o: ../../include/openssl/evp.h ../../include/openssl/idea.h ocsp_vfy.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h diff --git a/crypto/opensslv.h b/crypto/opensslv.h index cb21ee381f..e63b275e46 100644 --- a/crypto/opensslv.h +++ b/crypto/opensslv.h @@ -79,7 +79,7 @@ * should only keep the versions that are binary compatible with the current. */ #define SHLIB_VERSION_HISTORY "" -#define SHLIB_VERSION_NUMBER "0.9.7" +#define SHLIB_VERSION_NUMBER "0.9.8" #endif /* HEADER_OPENSSLV_H */ diff --git a/crypto/pem/Makefile.ssl b/crypto/pem/Makefile.ssl index 4120171898..2c49e8a6a4 100644 --- a/crypto/pem/Makefile.ssl +++ b/crypto/pem/Makefile.ssl @@ -83,13 +83,13 @@ clean: # DO NOT DELETE THIS LINE -- make depend depends on it. pem_all.o: ../../e_os.h ../../include/openssl/aes.h -pem_all.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -pem_all.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -pem_all.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -pem_all.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -pem_all.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -pem_all.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -pem_all.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +pem_all.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +pem_all.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +pem_all.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +pem_all.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +pem_all.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +pem_all.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +pem_all.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h pem_all.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h pem_all.o: ../../include/openssl/evp.h ../../include/openssl/idea.h pem_all.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -107,13 +107,13 @@ pem_all.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h pem_all.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h pem_all.o: ../cryptlib.h pem_all.c pem_err.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h -pem_err.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -pem_err.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -pem_err.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -pem_err.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -pem_err.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -pem_err.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -pem_err.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +pem_err.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +pem_err.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +pem_err.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +pem_err.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +pem_err.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +pem_err.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +pem_err.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h pem_err.o: ../../include/openssl/err.h ../../include/openssl/evp.h pem_err.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h pem_err.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -130,13 +130,13 @@ pem_err.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h pem_err.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h pem_err.o: ../../include/openssl/x509_vfy.h pem_err.c pem_info.o: ../../e_os.h ../../include/openssl/aes.h -pem_info.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -pem_info.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -pem_info.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -pem_info.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -pem_info.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -pem_info.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -pem_info.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +pem_info.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +pem_info.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +pem_info.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +pem_info.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +pem_info.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +pem_info.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +pem_info.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h pem_info.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h pem_info.o: ../../include/openssl/evp.h ../../include/openssl/idea.h pem_info.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -154,13 +154,13 @@ pem_info.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h pem_info.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h pem_info.o: ../cryptlib.h pem_info.c pem_lib.o: ../../e_os.h ../../include/openssl/aes.h -pem_lib.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -pem_lib.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -pem_lib.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -pem_lib.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -pem_lib.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -pem_lib.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -pem_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +pem_lib.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +pem_lib.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +pem_lib.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +pem_lib.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +pem_lib.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +pem_lib.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +pem_lib.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h pem_lib.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h pem_lib.o: ../../include/openssl/evp.h ../../include/openssl/idea.h pem_lib.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -179,13 +179,13 @@ pem_lib.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h pem_lib.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h pem_lib.o: ../cryptlib.h pem_lib.c pem_oth.o: ../../e_os.h ../../include/openssl/aes.h -pem_oth.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -pem_oth.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -pem_oth.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -pem_oth.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -pem_oth.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -pem_oth.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -pem_oth.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +pem_oth.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +pem_oth.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +pem_oth.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +pem_oth.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +pem_oth.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +pem_oth.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +pem_oth.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h pem_oth.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h pem_oth.o: ../../include/openssl/evp.h ../../include/openssl/idea.h pem_oth.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -203,13 +203,13 @@ pem_oth.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h pem_oth.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h pem_oth.o: ../../include/openssl/x509_vfy.h ../cryptlib.h pem_oth.c pem_pk8.o: ../../e_os.h ../../include/openssl/aes.h -pem_pk8.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -pem_pk8.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -pem_pk8.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -pem_pk8.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -pem_pk8.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -pem_pk8.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -pem_pk8.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +pem_pk8.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +pem_pk8.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +pem_pk8.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +pem_pk8.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +pem_pk8.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +pem_pk8.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +pem_pk8.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h pem_pk8.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h pem_pk8.o: ../../include/openssl/evp.h ../../include/openssl/idea.h pem_pk8.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -228,13 +228,13 @@ pem_pk8.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h pem_pk8.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h pem_pk8.o: ../cryptlib.h pem_pk8.c pem_pkey.o: ../../e_os.h ../../include/openssl/aes.h -pem_pkey.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -pem_pkey.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -pem_pkey.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -pem_pkey.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -pem_pkey.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -pem_pkey.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -pem_pkey.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +pem_pkey.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +pem_pkey.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +pem_pkey.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +pem_pkey.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +pem_pkey.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +pem_pkey.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +pem_pkey.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h pem_pkey.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h pem_pkey.o: ../../include/openssl/evp.h ../../include/openssl/idea.h pem_pkey.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -253,13 +253,13 @@ pem_pkey.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h pem_pkey.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h pem_pkey.o: ../cryptlib.h pem_pkey.c pem_seal.o: ../../e_os.h ../../include/openssl/aes.h -pem_seal.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -pem_seal.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -pem_seal.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -pem_seal.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -pem_seal.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -pem_seal.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -pem_seal.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +pem_seal.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +pem_seal.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +pem_seal.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +pem_seal.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +pem_seal.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +pem_seal.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +pem_seal.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h pem_seal.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h pem_seal.o: ../../include/openssl/evp.h ../../include/openssl/idea.h pem_seal.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -277,13 +277,13 @@ pem_seal.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h pem_seal.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h pem_seal.o: ../../include/openssl/x509_vfy.h ../cryptlib.h pem_seal.c pem_sign.o: ../../e_os.h ../../include/openssl/aes.h -pem_sign.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -pem_sign.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -pem_sign.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -pem_sign.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -pem_sign.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -pem_sign.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -pem_sign.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +pem_sign.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +pem_sign.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +pem_sign.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +pem_sign.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +pem_sign.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +pem_sign.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +pem_sign.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h pem_sign.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h pem_sign.o: ../../include/openssl/evp.h ../../include/openssl/idea.h pem_sign.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -301,13 +301,13 @@ pem_sign.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h pem_sign.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h pem_sign.o: ../../include/openssl/x509_vfy.h ../cryptlib.h pem_sign.c pem_x509.o: ../../e_os.h ../../include/openssl/aes.h -pem_x509.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -pem_x509.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -pem_x509.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -pem_x509.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -pem_x509.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -pem_x509.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -pem_x509.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +pem_x509.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +pem_x509.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +pem_x509.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +pem_x509.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +pem_x509.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +pem_x509.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +pem_x509.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h pem_x509.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h pem_x509.o: ../../include/openssl/evp.h ../../include/openssl/idea.h pem_x509.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -325,13 +325,13 @@ pem_x509.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h pem_x509.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h pem_x509.o: ../cryptlib.h pem_x509.c pem_xaux.o: ../../e_os.h ../../include/openssl/aes.h -pem_xaux.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -pem_xaux.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -pem_xaux.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -pem_xaux.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -pem_xaux.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -pem_xaux.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -pem_xaux.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +pem_xaux.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +pem_xaux.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +pem_xaux.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +pem_xaux.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +pem_xaux.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +pem_xaux.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +pem_xaux.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h pem_xaux.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h pem_xaux.o: ../../include/openssl/evp.h ../../include/openssl/idea.h pem_xaux.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h diff --git a/crypto/pem/pem.h b/crypto/pem/pem.h index 3e8c37b25c..fb196562fa 100644 --- a/crypto/pem/pem.h +++ b/crypto/pem/pem.h @@ -129,9 +129,9 @@ extern "C" { #define PEM_STRING_DHPARAMS "DH PARAMETERS" #define PEM_STRING_SSL_SESSION "SSL SESSION PARAMETERS" #define PEM_STRING_DSAPARAMS "DSA PARAMETERS" -#define PEM_STRING_ECDSA "ECDSA PRIVATE KEY" #define PEM_STRING_ECDSA_PUBLIC "ECDSA PUBLIC KEY" #define PEM_STRING_ECPARAMETERS "EC PARAMETERS" +#define PEM_STRING_ECPRIVATEKEY "EC PRIVATE KEY" /* Note that this structure is initialised by PEM_SealInit and cleaned up by PEM_SealFinal (at least for now) */ @@ -578,13 +578,10 @@ DECLARE_PEM_rw(DSAparams, DSA) #endif -#ifndef OPENSSL_NO_ECDSA -DECLARE_PEM_rw_cb(ECDSAPrivateKey, ECDSA) -DECLARE_PEM_rw(ECDSA_PUBKEY, ECDSA) -#endif - #ifndef OPENSSL_NO_EC DECLARE_PEM_rw(ECPKParameters, EC_GROUP) +DECLARE_PEM_rw_cb(ECPrivateKey, EC_KEY) +DECLARE_PEM_rw(EC_PUBKEY, EC_KEY) #endif #ifndef OPENSSL_NO_DH diff --git a/crypto/pem/pem_all.c b/crypto/pem/pem_all.c index 897c4329f3..60f5188f30 100644 --- a/crypto/pem/pem_all.c +++ b/crypto/pem/pem_all.c @@ -125,8 +125,8 @@ static RSA *pkey_get_rsa(EVP_PKEY *key, RSA **rsa); static DSA *pkey_get_dsa(EVP_PKEY *key, DSA **dsa); #endif -#ifndef OPENSSL_NO_ECDSA -static ECDSA *pkey_get_ecdsa(EVP_PKEY *key, ECDSA **ecdsa); +#ifndef OPENSSL_NO_EC +static EC_KEY *pkey_get_eckey(EVP_PKEY *key, EC_KEY **eckey); #endif IMPLEMENT_PEM_rw(X509_REQ, X509_REQ, PEM_STRING_X509_REQ, X509_REQ) @@ -234,52 +234,51 @@ IMPLEMENT_PEM_rw(DSAparams, DSA, PEM_STRING_DSAPARAMS, DSAparams) #endif -#ifndef OPENSSL_NO_ECDSA -static ECDSA *pkey_get_ecdsa(EVP_PKEY *key, ECDSA **ecdsa) +#ifndef OPENSSL_NO_EC +static EC_KEY *pkey_get_eckey(EVP_PKEY *key, EC_KEY **eckey) { - ECDSA *dtmp; + EC_KEY *dtmp; if(!key) return NULL; - dtmp = EVP_PKEY_get1_ECDSA(key); + dtmp = EVP_PKEY_get1_EC_KEY(key); EVP_PKEY_free(key); if(!dtmp) return NULL; - if(ecdsa) + if(eckey) { - ECDSA_free(*ecdsa); - *ecdsa = dtmp; + EC_KEY_free(*eckey); + *eckey = dtmp; } return dtmp; } -ECDSA *PEM_read_bio_ECDSAPrivateKey(BIO *bp, ECDSA **ecdsa, pem_password_cb *cb, +EC_KEY *PEM_read_bio_ECPrivateKey(BIO *bp, EC_KEY **key, pem_password_cb *cb, void *u) { EVP_PKEY *pktmp; pktmp = PEM_read_bio_PrivateKey(bp, NULL, cb, u); - return pkey_get_ecdsa(pktmp, ecdsa); + return pkey_get_eckey(pktmp, key); } -IMPLEMENT_PEM_write_cb(ECDSAPrivateKey, ECDSA, PEM_STRING_ECDSA, ECDSAPrivateKey) -IMPLEMENT_PEM_rw(ECDSA_PUBKEY, ECDSA, PEM_STRING_PUBLIC, ECDSA_PUBKEY) +IMPLEMENT_PEM_rw(ECPKParameters, EC_GROUP, PEM_STRING_ECPARAMETERS, ECPKParameters) + +IMPLEMENT_PEM_write_cb(ECPrivateKey, EC_KEY, PEM_STRING_ECPRIVATEKEY, ECPrivateKey) + +IMPLEMENT_PEM_rw(EC_PUBKEY, EC_KEY, PEM_STRING_PUBLIC, EC_PUBKEY) #ifndef OPENSSL_NO_FP_API -ECDSA *PEM_read_ECDSAPrivateKey(FILE *fp, ECDSA **ecdsa, pem_password_cb *cb, +EC_KEY *PEM_read_ECPrivateKey(FILE *fp, EC_KEY **eckey, pem_password_cb *cb, void *u) { EVP_PKEY *pktmp; pktmp = PEM_read_PrivateKey(fp, NULL, cb, u); - return pkey_get_ecdsa(pktmp, ecdsa); + return pkey_get_eckey(pktmp, eckey); } #endif #endif -#ifndef OPENSSL_NO_EC -IMPLEMENT_PEM_rw(ECPKParameters, EC_GROUP, PEM_STRING_ECPARAMETERS, ECPKParameters) -#endif - #ifndef OPENSSL_NO_DH IMPLEMENT_PEM_rw(DHparams, DH, PEM_STRING_DHPARAMS, DHparams) @@ -294,7 +293,7 @@ IMPLEMENT_PEM_rw(DHparams, DH, PEM_STRING_DHPARAMS, DHparams) * appropriate.) */ IMPLEMENT_PEM_write_cb(PrivateKey, EVP_PKEY, ((x->type == EVP_PKEY_DSA)?PEM_STRING_DSA:\ - (x->type == EVP_PKEY_RSA)?PEM_STRING_RSA:PEM_STRING_ECDSA), PrivateKey) + (x->type == EVP_PKEY_RSA)?PEM_STRING_RSA:PEM_STRING_ECPRIVATEKEY), PrivateKey) IMPLEMENT_PEM_rw(PUBKEY, EVP_PKEY, PEM_STRING_PUBLIC, PUBKEY) diff --git a/crypto/pem/pem_info.c b/crypto/pem/pem_info.c index 27bcc25177..328afd2e95 100644 --- a/crypto/pem/pem_info.c +++ b/crypto/pem/pem_info.c @@ -203,10 +203,10 @@ start: } else #endif -#ifndef OPENSSL_NO_ECDSA - if (strcmp(name,PEM_STRING_ECDSA) == 0) +#ifndef OPENSSL_NO_EC + if (strcmp(name,PEM_STRING_ECPRIVATEKEY) == 0) { - d2i=(char *(*)())d2i_ECDSAPrivateKey; + d2i=(char *(*)())d2i_ECPrivateKey; if (xi->x_pkey != NULL) { if (!sk_X509_INFO_push(ret,xi)) goto err; @@ -220,8 +220,8 @@ start: xi->x_pkey=X509_PKEY_new(); if ((xi->x_pkey->dec_pkey=EVP_PKEY_new()) == NULL) goto err; - xi->x_pkey->dec_pkey->type=EVP_PKEY_ECDSA; - pp=(char **)&(xi->x_pkey->dec_pkey->pkey.ecdsa); + xi->x_pkey->dec_pkey->type=EVP_PKEY_EC; + pp=(char **)&(xi->x_pkey->dec_pkey->pkey.eckey); if ((int)strlen(header) > 10) /* assume encrypted */ raw=1; } diff --git a/crypto/pem/pem_lib.c b/crypto/pem/pem_lib.c index 94ecae7f3f..c32044cf70 100644 --- a/crypto/pem/pem_lib.c +++ b/crypto/pem/pem_lib.c @@ -193,7 +193,7 @@ static int check_pem(const char *nm, const char *name) if(!strcmp(nm,PEM_STRING_DSA) && !strcmp(name,PEM_STRING_EVP_PKEY)) return 1; - if(!strcmp(nm,PEM_STRING_ECDSA) && + if(!strcmp(nm,PEM_STRING_ECPRIVATEKEY) && !strcmp(name,PEM_STRING_EVP_PKEY)) return 1; /* Permit older strings */ diff --git a/crypto/pem/pem_pkey.c b/crypto/pem/pem_pkey.c index 7d9f302777..92a55f536a 100644 --- a/crypto/pem/pem_pkey.c +++ b/crypto/pem/pem_pkey.c @@ -82,8 +82,8 @@ EVP_PKEY *PEM_read_bio_PrivateKey(BIO *bp, EVP_PKEY **x, pem_password_cb *cb, vo ret=d2i_PrivateKey(EVP_PKEY_RSA,x,&p,len); else if (strcmp(nm,PEM_STRING_DSA) == 0) ret=d2i_PrivateKey(EVP_PKEY_DSA,x,&p,len); - else if (strcmp(nm,PEM_STRING_ECDSA) == 0) - ret=d2i_PrivateKey(EVP_PKEY_ECDSA,x,&p,len); + else if (strcmp(nm,PEM_STRING_ECPRIVATEKEY) == 0) + ret=d2i_PrivateKey(EVP_PKEY_EC,x,&p,len); else if (strcmp(nm,PEM_STRING_PKCS8INF) == 0) { PKCS8_PRIV_KEY_INFO *p8inf; p8inf=d2i_PKCS8_PRIV_KEY_INFO(NULL, &p, len); diff --git a/crypto/pkcs12/Makefile.ssl b/crypto/pkcs12/Makefile.ssl index e7973a9ea8..9c81c4ae13 100644 --- a/crypto/pkcs12/Makefile.ssl +++ b/crypto/pkcs12/Makefile.ssl @@ -86,13 +86,13 @@ clean: # DO NOT DELETE THIS LINE -- make depend depends on it. p12_add.o: ../../e_os.h ../../include/openssl/aes.h -p12_add.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -p12_add.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -p12_add.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -p12_add.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -p12_add.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -p12_add.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -p12_add.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +p12_add.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +p12_add.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +p12_add.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +p12_add.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +p12_add.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +p12_add.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +p12_add.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h p12_add.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h p12_add.o: ../../include/openssl/evp.h ../../include/openssl/idea.h p12_add.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -116,29 +116,30 @@ p12_asn.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h p12_asn.o: ../../include/openssl/des.h ../../include/openssl/des_old.h p12_asn.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h p12_asn.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h -p12_asn.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h -p12_asn.o: ../../include/openssl/evp.h ../../include/openssl/idea.h -p12_asn.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h -p12_asn.o: ../../include/openssl/md4.h ../../include/openssl/md5.h -p12_asn.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h -p12_asn.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h -p12_asn.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h -p12_asn.o: ../../include/openssl/pkcs12.h ../../include/openssl/pkcs7.h -p12_asn.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h -p12_asn.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h -p12_asn.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h -p12_asn.o: ../../include/openssl/sha.h ../../include/openssl/stack.h -p12_asn.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h -p12_asn.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h -p12_asn.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p12_asn.c +p12_asn.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h +p12_asn.o: ../../include/openssl/err.h ../../include/openssl/evp.h +p12_asn.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +p12_asn.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +p12_asn.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +p12_asn.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +p12_asn.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +p12_asn.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs12.h +p12_asn.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +p12_asn.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +p12_asn.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +p12_asn.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +p12_asn.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +p12_asn.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +p12_asn.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +p12_asn.o: ../cryptlib.h p12_asn.c p12_attr.o: ../../e_os.h ../../include/openssl/aes.h -p12_attr.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -p12_attr.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -p12_attr.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -p12_attr.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -p12_attr.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -p12_attr.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -p12_attr.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +p12_attr.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +p12_attr.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +p12_attr.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +p12_attr.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +p12_attr.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +p12_attr.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +p12_attr.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h p12_attr.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h p12_attr.o: ../../include/openssl/evp.h ../../include/openssl/idea.h p12_attr.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -155,13 +156,13 @@ p12_attr.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h p12_attr.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h p12_attr.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p12_attr.c p12_crpt.o: ../../e_os.h ../../include/openssl/aes.h -p12_crpt.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -p12_crpt.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -p12_crpt.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -p12_crpt.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -p12_crpt.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -p12_crpt.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -p12_crpt.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +p12_crpt.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +p12_crpt.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +p12_crpt.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +p12_crpt.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +p12_crpt.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +p12_crpt.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +p12_crpt.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h p12_crpt.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h p12_crpt.o: ../../include/openssl/evp.h ../../include/openssl/idea.h p12_crpt.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -178,13 +179,13 @@ p12_crpt.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h p12_crpt.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h p12_crpt.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p12_crpt.c p12_crt.o: ../../e_os.h ../../include/openssl/aes.h -p12_crt.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -p12_crt.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -p12_crt.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -p12_crt.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -p12_crt.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -p12_crt.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -p12_crt.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +p12_crt.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +p12_crt.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +p12_crt.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +p12_crt.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +p12_crt.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +p12_crt.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +p12_crt.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h p12_crt.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h p12_crt.o: ../../include/openssl/evp.h ../../include/openssl/idea.h p12_crt.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -201,13 +202,13 @@ p12_crt.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h p12_crt.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h p12_crt.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p12_crt.c p12_decr.o: ../../e_os.h ../../include/openssl/aes.h -p12_decr.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -p12_decr.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -p12_decr.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -p12_decr.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -p12_decr.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -p12_decr.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -p12_decr.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +p12_decr.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +p12_decr.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +p12_decr.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +p12_decr.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +p12_decr.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +p12_decr.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +p12_decr.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h p12_decr.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h p12_decr.o: ../../include/openssl/evp.h ../../include/openssl/idea.h p12_decr.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -224,13 +225,13 @@ p12_decr.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h p12_decr.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h p12_decr.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p12_decr.c p12_init.o: ../../e_os.h ../../include/openssl/aes.h -p12_init.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -p12_init.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -p12_init.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -p12_init.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -p12_init.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -p12_init.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -p12_init.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +p12_init.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +p12_init.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +p12_init.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +p12_init.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +p12_init.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +p12_init.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +p12_init.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h p12_init.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h p12_init.o: ../../include/openssl/evp.h ../../include/openssl/idea.h p12_init.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -247,13 +248,13 @@ p12_init.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h p12_init.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h p12_init.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p12_init.c p12_key.o: ../../e_os.h ../../include/openssl/aes.h -p12_key.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -p12_key.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -p12_key.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -p12_key.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -p12_key.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -p12_key.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -p12_key.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +p12_key.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +p12_key.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +p12_key.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +p12_key.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +p12_key.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +p12_key.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +p12_key.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h p12_key.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h p12_key.o: ../../include/openssl/evp.h ../../include/openssl/idea.h p12_key.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -270,13 +271,13 @@ p12_key.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h p12_key.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h p12_key.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p12_key.c p12_kiss.o: ../../e_os.h ../../include/openssl/aes.h -p12_kiss.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -p12_kiss.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -p12_kiss.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -p12_kiss.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -p12_kiss.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -p12_kiss.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -p12_kiss.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +p12_kiss.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +p12_kiss.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +p12_kiss.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +p12_kiss.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +p12_kiss.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +p12_kiss.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +p12_kiss.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h p12_kiss.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h p12_kiss.o: ../../include/openssl/evp.h ../../include/openssl/idea.h p12_kiss.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -293,13 +294,13 @@ p12_kiss.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h p12_kiss.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h p12_kiss.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p12_kiss.c p12_mutl.o: ../../e_os.h ../../include/openssl/aes.h -p12_mutl.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -p12_mutl.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -p12_mutl.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -p12_mutl.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -p12_mutl.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -p12_mutl.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -p12_mutl.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +p12_mutl.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +p12_mutl.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +p12_mutl.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +p12_mutl.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +p12_mutl.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +p12_mutl.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +p12_mutl.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h p12_mutl.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h p12_mutl.o: ../../include/openssl/evp.h ../../include/openssl/hmac.h p12_mutl.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h @@ -318,13 +319,13 @@ p12_mutl.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h p12_mutl.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h p12_mutl.o: ../cryptlib.h p12_mutl.c p12_npas.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h -p12_npas.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -p12_npas.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -p12_npas.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -p12_npas.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -p12_npas.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -p12_npas.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -p12_npas.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +p12_npas.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +p12_npas.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +p12_npas.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +p12_npas.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +p12_npas.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +p12_npas.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +p12_npas.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h p12_npas.o: ../../include/openssl/err.h ../../include/openssl/evp.h p12_npas.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h p12_npas.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -342,13 +343,13 @@ p12_npas.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h p12_npas.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h p12_npas.o: ../../include/openssl/x509_vfy.h p12_npas.c p12_p8d.o: ../../e_os.h ../../include/openssl/aes.h -p12_p8d.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -p12_p8d.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -p12_p8d.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -p12_p8d.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -p12_p8d.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -p12_p8d.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -p12_p8d.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +p12_p8d.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +p12_p8d.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +p12_p8d.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +p12_p8d.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +p12_p8d.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +p12_p8d.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +p12_p8d.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h p12_p8d.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h p12_p8d.o: ../../include/openssl/evp.h ../../include/openssl/idea.h p12_p8d.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -365,13 +366,13 @@ p12_p8d.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h p12_p8d.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h p12_p8d.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p12_p8d.c p12_p8e.o: ../../e_os.h ../../include/openssl/aes.h -p12_p8e.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -p12_p8e.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -p12_p8e.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -p12_p8e.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -p12_p8e.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -p12_p8e.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -p12_p8e.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +p12_p8e.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +p12_p8e.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +p12_p8e.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +p12_p8e.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +p12_p8e.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +p12_p8e.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +p12_p8e.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h p12_p8e.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h p12_p8e.o: ../../include/openssl/evp.h ../../include/openssl/idea.h p12_p8e.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -388,13 +389,13 @@ p12_p8e.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h p12_p8e.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h p12_p8e.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p12_p8e.c p12_utl.o: ../../e_os.h ../../include/openssl/aes.h -p12_utl.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -p12_utl.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -p12_utl.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -p12_utl.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -p12_utl.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -p12_utl.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -p12_utl.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +p12_utl.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +p12_utl.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +p12_utl.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +p12_utl.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +p12_utl.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +p12_utl.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +p12_utl.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h p12_utl.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h p12_utl.o: ../../include/openssl/evp.h ../../include/openssl/idea.h p12_utl.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -411,13 +412,13 @@ p12_utl.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h p12_utl.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h p12_utl.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p12_utl.c pk12err.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h -pk12err.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -pk12err.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -pk12err.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -pk12err.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -pk12err.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -pk12err.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -pk12err.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +pk12err.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +pk12err.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +pk12err.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +pk12err.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +pk12err.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +pk12err.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +pk12err.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h pk12err.o: ../../include/openssl/err.h ../../include/openssl/evp.h pk12err.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h pk12err.o: ../../include/openssl/md2.h ../../include/openssl/md4.h diff --git a/crypto/pkcs7/Makefile.ssl b/crypto/pkcs7/Makefile.ssl index a97250f4f0..dfc9a47b44 100644 --- a/crypto/pkcs7/Makefile.ssl +++ b/crypto/pkcs7/Makefile.ssl @@ -108,12 +108,13 @@ pk7_asn1.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h pk7_asn1.o: ../../include/openssl/des.h ../../include/openssl/des_old.h pk7_asn1.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h pk7_asn1.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h -pk7_asn1.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h -pk7_asn1.o: ../../include/openssl/evp.h ../../include/openssl/idea.h -pk7_asn1.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h -pk7_asn1.o: ../../include/openssl/md4.h ../../include/openssl/md5.h -pk7_asn1.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h -pk7_asn1.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +pk7_asn1.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h +pk7_asn1.o: ../../include/openssl/err.h ../../include/openssl/evp.h +pk7_asn1.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +pk7_asn1.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +pk7_asn1.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +pk7_asn1.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +pk7_asn1.o: ../../include/openssl/opensslconf.h pk7_asn1.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h pk7_asn1.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h pk7_asn1.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h @@ -124,13 +125,13 @@ pk7_asn1.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h pk7_asn1.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h pk7_asn1.o: ../cryptlib.h pk7_asn1.c pk7_attr.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h -pk7_attr.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -pk7_attr.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -pk7_attr.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -pk7_attr.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -pk7_attr.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -pk7_attr.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -pk7_attr.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +pk7_attr.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +pk7_attr.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +pk7_attr.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +pk7_attr.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +pk7_attr.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +pk7_attr.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +pk7_attr.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h pk7_attr.o: ../../include/openssl/err.h ../../include/openssl/evp.h pk7_attr.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h pk7_attr.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -148,14 +149,14 @@ pk7_attr.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h pk7_attr.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h pk7_attr.o: pk7_attr.c pk7_doit.o: ../../e_os.h ../../include/openssl/aes.h -pk7_doit.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -pk7_doit.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -pk7_doit.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -pk7_doit.o: ../../include/openssl/cast.h ../../include/openssl/conf.h -pk7_doit.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -pk7_doit.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -pk7_doit.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -pk7_doit.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +pk7_doit.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +pk7_doit.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +pk7_doit.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +pk7_doit.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +pk7_doit.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +pk7_doit.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +pk7_doit.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +pk7_doit.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h pk7_doit.o: ../../include/openssl/err.h ../../include/openssl/evp.h pk7_doit.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h pk7_doit.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -173,13 +174,13 @@ pk7_doit.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h pk7_doit.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h pk7_doit.o: ../cryptlib.h pk7_doit.c pk7_lib.o: ../../e_os.h ../../include/openssl/aes.h -pk7_lib.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -pk7_lib.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -pk7_lib.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -pk7_lib.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -pk7_lib.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -pk7_lib.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -pk7_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +pk7_lib.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +pk7_lib.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +pk7_lib.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +pk7_lib.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +pk7_lib.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +pk7_lib.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +pk7_lib.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h pk7_lib.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h pk7_lib.o: ../../include/openssl/evp.h ../../include/openssl/idea.h pk7_lib.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -196,13 +197,13 @@ pk7_lib.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h pk7_lib.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h pk7_lib.o: ../cryptlib.h pk7_lib.c pk7_mime.o: ../../e_os.h ../../include/openssl/aes.h -pk7_mime.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -pk7_mime.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -pk7_mime.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -pk7_mime.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -pk7_mime.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -pk7_mime.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -pk7_mime.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +pk7_mime.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +pk7_mime.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +pk7_mime.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +pk7_mime.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +pk7_mime.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +pk7_mime.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +pk7_mime.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h pk7_mime.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h pk7_mime.o: ../../include/openssl/evp.h ../../include/openssl/idea.h pk7_mime.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -219,14 +220,14 @@ pk7_mime.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h pk7_mime.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h pk7_mime.o: ../../include/openssl/x509_vfy.h ../cryptlib.h pk7_mime.c pk7_smime.o: ../../e_os.h ../../include/openssl/aes.h -pk7_smime.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -pk7_smime.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -pk7_smime.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -pk7_smime.o: ../../include/openssl/cast.h ../../include/openssl/conf.h -pk7_smime.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -pk7_smime.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -pk7_smime.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -pk7_smime.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +pk7_smime.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +pk7_smime.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +pk7_smime.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +pk7_smime.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +pk7_smime.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +pk7_smime.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +pk7_smime.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +pk7_smime.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h pk7_smime.o: ../../include/openssl/err.h ../../include/openssl/evp.h pk7_smime.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h pk7_smime.o: ../../include/openssl/md2.h ../../include/openssl/md4.h diff --git a/crypto/pkcs7/pk7_doit.c b/crypto/pkcs7/pk7_doit.c index f589508fdd..1c0a9c9edf 100644 --- a/crypto/pkcs7/pk7_doit.c +++ b/crypto/pkcs7/pk7_doit.c @@ -629,7 +629,7 @@ int PKCS7_dataFinal(PKCS7 *p7, BIO *bio) ctx_tmp.digest=EVP_dss1(); #endif #ifndef OPENSSL_NO_ECDSA - if (si->pkey->type == EVP_PKEY_ECDSA) + if (si->pkey->type == EVP_PKEY_EC) ctx_tmp.digest=EVP_ecdsa(); #endif @@ -830,7 +830,7 @@ for (ii=0; ii<md_len; ii++) printf("%02X",md_dat[ii]); printf(" calc\n"); if(pkey->type == EVP_PKEY_DSA) mdc_tmp.digest=EVP_dss1(); #endif #ifndef OPENSSL_NO_ECDSA - if (pkey->type == EVP_PKEY_ECDSA) mdc_tmp.digest=EVP_ecdsa(); + if (pkey->type == EVP_PKEY_EC) mdc_tmp.digest=EVP_ecdsa(); #endif i=EVP_VerifyFinal(&mdc_tmp,os->data,os->length, pkey); diff --git a/crypto/pkcs7/pk7_lib.c b/crypto/pkcs7/pk7_lib.c index b7c18cbf72..c913c59791 100644 --- a/crypto/pkcs7/pk7_lib.c +++ b/crypto/pkcs7/pk7_lib.c @@ -310,7 +310,7 @@ int PKCS7_SIGNER_INFO_set(PKCS7_SIGNER_INFO *p7i, X509 *x509, EVP_PKEY *pkey, int nid; char is_dsa; - if (pkey->type == EVP_PKEY_DSA || pkey->type == EVP_PKEY_ECDSA) + if (pkey->type == EVP_PKEY_DSA || pkey->type == EVP_PKEY_EC) is_dsa = 1; else is_dsa = 0; @@ -363,7 +363,7 @@ int PKCS7_SIGNER_INFO_set(PKCS7_SIGNER_INFO *p7i, X509 *x509, EVP_PKEY *pkey, #endif p7i->digest_enc_alg->parameter = NULL; /* special case for DSA: omit 'parameter'! */ } - else if (nid == EVP_PKEY_ECDSA) + else if (nid == EVP_PKEY_EC) { p7i->digest_enc_alg->algorithm=OBJ_nid2obj(NID_ecdsa_with_SHA1); if (!(p7i->digest_enc_alg->parameter=ASN1_TYPE_new())) diff --git a/crypto/pkcs7/verify.c b/crypto/pkcs7/verify.c index 5f7afe8933..b40f26032e 100644 --- a/crypto/pkcs7/verify.c +++ b/crypto/pkcs7/verify.c @@ -179,10 +179,11 @@ char *argv[]; { ASN1_UTCTIME *tm; char *str1,*str2; + int rc; si=sk_PKCS7_SIGNER_INFO_value(sk,i); - i=PKCS7_dataVerify(cert_store,&cert_ctx,p7bio,p7,si); - if (i <= 0) + rc=PKCS7_dataVerify(cert_store,&cert_ctx,p7bio,p7,si); + if (rc <= 0) goto err; printf("signer info\n"); if ((tm=get_signed_time(si)) != NULL) diff --git a/crypto/rand/Makefile.ssl b/crypto/rand/Makefile.ssl index a2b14583e4..4035e825ef 100644 --- a/crypto/rand/Makefile.ssl +++ b/crypto/rand/Makefile.ssl @@ -112,11 +112,11 @@ rand_err.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h rand_err.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h rand_err.o: rand_err.c rand_lib.o: ../../e_os.h ../../include/openssl/asn1.h -rand_lib.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -rand_lib.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -rand_lib.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h -rand_lib.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -rand_lib.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +rand_lib.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +rand_lib.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +rand_lib.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +rand_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +rand_lib.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h rand_lib.o: ../../include/openssl/engine.h ../../include/openssl/err.h rand_lib.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h rand_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h diff --git a/crypto/ripemd/rmdtest.c b/crypto/ripemd/rmdtest.c index 19e9741db2..be1fb8b1f6 100644 --- a/crypto/ripemd/rmdtest.c +++ b/crypto/ripemd/rmdtest.c @@ -59,7 +59,6 @@ #include <stdio.h> #include <string.h> #include <stdlib.h> -#include <openssl/ripemd.h> #ifdef OPENSSL_NO_RIPEMD int main(int argc, char *argv[]) @@ -68,6 +67,7 @@ int main(int argc, char *argv[]) return(0); } #else +#include <openssl/ripemd.h> #include <openssl/evp.h> #ifdef CHARSET_EBCDIC diff --git a/crypto/rsa/Makefile.ssl b/crypto/rsa/Makefile.ssl index 7616295ed8..874776ce36 100644 --- a/crypto/rsa/Makefile.ssl +++ b/crypto/rsa/Makefile.ssl @@ -102,11 +102,11 @@ rsa_chk.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h rsa_chk.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h rsa_chk.o: rsa_chk.c rsa_eay.o: ../../e_os.h ../../include/openssl/asn1.h -rsa_eay.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -rsa_eay.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -rsa_eay.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h -rsa_eay.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -rsa_eay.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.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/ec.h +rsa_eay.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h rsa_eay.o: ../../include/openssl/engine.h ../../include/openssl/err.h rsa_eay.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h rsa_eay.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h @@ -132,11 +132,11 @@ rsa_gen.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h rsa_gen.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h rsa_gen.o: ../cryptlib.h rsa_gen.c rsa_lib.o: ../../e_os.h ../../include/openssl/asn1.h -rsa_lib.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -rsa_lib.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -rsa_lib.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h -rsa_lib.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -rsa_lib.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.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/ec.h +rsa_lib.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h rsa_lib.o: ../../include/openssl/engine.h ../../include/openssl/err.h rsa_lib.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h rsa_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h @@ -193,13 +193,13 @@ rsa_pk1.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h rsa_pk1.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h rsa_pk1.o: ../../include/openssl/symhacks.h ../cryptlib.h rsa_pk1.c rsa_saos.o: ../../e_os.h ../../include/openssl/aes.h -rsa_saos.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.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/des_old.h -rsa_saos.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -rsa_saos.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +rsa_saos.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +rsa_saos.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +rsa_saos.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +rsa_saos.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +rsa_saos.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +rsa_saos.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +rsa_saos.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h rsa_saos.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h rsa_saos.o: ../../include/openssl/evp.h ../../include/openssl/idea.h rsa_saos.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -216,13 +216,13 @@ rsa_saos.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h rsa_saos.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h rsa_saos.o: ../cryptlib.h rsa_saos.c rsa_sign.o: ../../e_os.h ../../include/openssl/aes.h -rsa_sign.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.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/des_old.h -rsa_sign.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -rsa_sign.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +rsa_sign.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +rsa_sign.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +rsa_sign.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +rsa_sign.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +rsa_sign.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +rsa_sign.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +rsa_sign.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h rsa_sign.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h rsa_sign.o: ../../include/openssl/err.h ../../include/openssl/evp.h rsa_sign.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h diff --git a/crypto/symhacks.h b/crypto/symhacks.h index dd59aa3f0f..c225602064 100644 --- a/crypto/symhacks.h +++ b/crypto/symhacks.h @@ -211,6 +211,32 @@ #define EC_POINT_get_affine_coordinates_GFp EC_POINT_get_affine_coords_GFp #undef EC_POINT_set_compressed_coordinates_GFp #define EC_POINT_set_compressed_coordinates_GFp EC_POINT_set_compr_coords_GFp +#undef EC_POINT_set_affine_coordinates_GF2m +#define EC_POINT_set_affine_coordinates_GF2m EC_POINT_set_affine_coords_GF2m +#undef EC_POINT_get_affine_coordinates_GF2m +#define EC_POINT_get_affine_coordinates_GF2m EC_POINT_get_affine_coords_GF2m +#undef EC_POINT_set_compressed_coordinates_GF2m +#define EC_POINT_set_compressed_coordinates_GF2m \ + EC_POINT_set_compr_coords_GF2m +#undef ec_GF2m_simple_group_clear_finish +#define ec_GF2m_simple_group_clear_finish ec_GF2m_simple_grp_clr_finish +#undef ec_GF2m_simple_group_check_discriminant +#define ec_GF2m_simple_group_check_discriminant ec_GF2m_simple_grp_chk_discrim +#undef ec_GF2m_simple_point_clear_finish +#define ec_GF2m_simple_point_clear_finish ec_GF2m_simple_pt_clr_finish +#undef ec_GF2m_simple_point_set_to_infinity +#define ec_GF2m_simple_point_set_to_infinity ec_GF2m_simple_pt_set_to_inf +#undef ec_GF2m_simple_points_make_affine +#define ec_GF2m_simple_points_make_affine ec_GF2m_simple_pts_make_affine +#undef ec_GF2m_simple_point_set_affine_coordinates +#define ec_GF2m_simple_point_set_affine_coordinates \ + ec_GF2m_smp_pt_set_af_coords +#undef ec_GF2m_simple_point_get_affine_coordinates +#define ec_GF2m_simple_point_get_affine_coordinates \ + ec_GF2m_smp_pt_get_af_coords +#undef ec_GF2m_simple_set_compressed_coordinates +#define ec_GF2m_simple_set_compressed_coordinates \ + ec_GF2m_smp_set_compr_coords #undef ec_GFp_simple_group_set_curve_GFp #define ec_GFp_simple_group_set_curve_GFp ec_GFp_simple_grp_set_curve_GFp #undef ec_GFp_simple_group_get_curve_GFp @@ -246,6 +272,15 @@ #undef ec_GFp_simple_set_compressed_coordinates_GFp #define ec_GFp_simple_set_compressed_coordinates_GFp \ ec_GFp_smp_set_compr_coords_GFp +#undef ec_GFp_simple_point_set_affine_coordinates +#define ec_GFp_simple_point_set_affine_coordinates \ + ec_GFp_smp_pt_set_af_coords +#undef ec_GFp_simple_point_get_affine_coordinates +#define ec_GFp_simple_point_get_affine_coordinates \ + ec_GFp_smp_pt_get_af_coords +#undef ec_GFp_simple_set_compressed_coordinates +#define ec_GFp_simple_set_compressed_coordinates \ + ec_GFp_smp_set_compr_coords #undef ec_GFp_simple_group_check_discriminant #define ec_GFp_simple_group_check_discriminant ec_GFp_simple_grp_chk_discrim @@ -259,6 +294,15 @@ #undef OCSP_crlID_new #define OCSP_crlID_new OCSP_crlID2_new +#undef d2i_ECPARAMETERS +#define d2i_ECPARAMETERS d2i_UC_ECPARAMETERS +#undef i2d_ECPARAMETERS +#define i2d_ECPARAMETERS i2d_UC_ECPARAMETERS +#undef d2i_ECPKPARAMETERS +#define d2i_ECPKPARAMETERS d2i_UC_ECPKPARAMETERS +#undef i2d_ECPKPARAMETERS +#define i2d_ECPKPARAMETERS i2d_UC_ECPKPARAMETERS + /* These functions do not seem to exist! However, I'm paranoid... Original command in x509v3.h: These functions are being redefined in another directory, diff --git a/crypto/x509/Makefile.ssl b/crypto/x509/Makefile.ssl index 31a2410a59..424ed1dc54 100644 --- a/crypto/x509/Makefile.ssl +++ b/crypto/x509/Makefile.ssl @@ -90,13 +90,13 @@ clean: # DO NOT DELETE THIS LINE -- make depend depends on it. by_dir.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h -by_dir.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -by_dir.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -by_dir.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -by_dir.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -by_dir.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -by_dir.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -by_dir.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +by_dir.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +by_dir.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +by_dir.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +by_dir.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +by_dir.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +by_dir.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +by_dir.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h by_dir.o: ../../include/openssl/err.h ../../include/openssl/evp.h by_dir.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h by_dir.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -112,13 +112,13 @@ by_dir.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h by_dir.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h by_dir.o: ../../include/openssl/x509_vfy.h ../cryptlib.h by_dir.c by_file.o: ../../e_os.h ../../include/openssl/aes.h -by_file.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -by_file.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -by_file.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -by_file.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -by_file.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -by_file.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -by_file.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +by_file.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +by_file.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +by_file.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +by_file.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +by_file.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +by_file.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +by_file.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h by_file.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h by_file.o: ../../include/openssl/evp.h ../../include/openssl/idea.h by_file.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -136,14 +136,14 @@ by_file.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h by_file.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h by_file.o: ../cryptlib.h by_file.c x509_att.o: ../../e_os.h ../../include/openssl/aes.h -x509_att.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -x509_att.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -x509_att.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -x509_att.o: ../../include/openssl/cast.h ../../include/openssl/conf.h -x509_att.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -x509_att.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -x509_att.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -x509_att.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +x509_att.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +x509_att.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x509_att.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x509_att.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +x509_att.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +x509_att.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +x509_att.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +x509_att.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h x509_att.o: ../../include/openssl/err.h ../../include/openssl/evp.h x509_att.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h x509_att.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -160,14 +160,14 @@ x509_att.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h x509_att.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h x509_att.o: ../../include/openssl/x509v3.h ../cryptlib.h x509_att.c x509_cmp.o: ../../e_os.h ../../include/openssl/aes.h -x509_cmp.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -x509_cmp.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -x509_cmp.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -x509_cmp.o: ../../include/openssl/cast.h ../../include/openssl/conf.h -x509_cmp.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -x509_cmp.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -x509_cmp.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -x509_cmp.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +x509_cmp.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +x509_cmp.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x509_cmp.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x509_cmp.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +x509_cmp.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +x509_cmp.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +x509_cmp.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +x509_cmp.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h x509_cmp.o: ../../include/openssl/err.h ../../include/openssl/evp.h x509_cmp.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h x509_cmp.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -184,13 +184,13 @@ x509_cmp.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h x509_cmp.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h x509_cmp.o: ../../include/openssl/x509v3.h ../cryptlib.h x509_cmp.c x509_d2.o: ../../e_os.h ../../include/openssl/aes.h -x509_d2.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -x509_d2.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -x509_d2.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -x509_d2.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -x509_d2.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -x509_d2.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -x509_d2.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +x509_d2.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +x509_d2.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x509_d2.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x509_d2.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +x509_d2.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +x509_d2.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +x509_d2.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h x509_d2.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h x509_d2.o: ../../include/openssl/evp.h ../../include/openssl/idea.h x509_d2.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -207,13 +207,13 @@ x509_d2.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h x509_d2.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h x509_d2.o: ../cryptlib.h x509_d2.c x509_def.o: ../../e_os.h ../../include/openssl/aes.h -x509_def.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -x509_def.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -x509_def.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -x509_def.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -x509_def.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -x509_def.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -x509_def.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +x509_def.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +x509_def.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x509_def.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x509_def.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +x509_def.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +x509_def.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +x509_def.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h x509_def.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h x509_def.o: ../../include/openssl/evp.h ../../include/openssl/idea.h x509_def.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -230,13 +230,13 @@ x509_def.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h x509_def.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h x509_def.o: ../cryptlib.h x509_def.c x509_err.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h -x509_err.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -x509_err.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -x509_err.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -x509_err.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -x509_err.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -x509_err.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -x509_err.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +x509_err.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +x509_err.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +x509_err.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +x509_err.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +x509_err.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +x509_err.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +x509_err.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h x509_err.o: ../../include/openssl/err.h ../../include/openssl/evp.h x509_err.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h x509_err.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -253,14 +253,14 @@ x509_err.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h x509_err.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h x509_err.o: x509_err.c x509_ext.o: ../../e_os.h ../../include/openssl/aes.h -x509_ext.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -x509_ext.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -x509_ext.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -x509_ext.o: ../../include/openssl/cast.h ../../include/openssl/conf.h -x509_ext.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -x509_ext.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -x509_ext.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -x509_ext.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +x509_ext.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +x509_ext.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x509_ext.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x509_ext.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +x509_ext.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +x509_ext.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +x509_ext.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +x509_ext.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h x509_ext.o: ../../include/openssl/err.h ../../include/openssl/evp.h x509_ext.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h x509_ext.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -277,14 +277,14 @@ x509_ext.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h x509_ext.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h x509_ext.o: ../../include/openssl/x509v3.h ../cryptlib.h x509_ext.c x509_lu.o: ../../e_os.h ../../include/openssl/aes.h -x509_lu.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -x509_lu.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -x509_lu.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -x509_lu.o: ../../include/openssl/cast.h ../../include/openssl/conf.h -x509_lu.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -x509_lu.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -x509_lu.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -x509_lu.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +x509_lu.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +x509_lu.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x509_lu.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x509_lu.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +x509_lu.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +x509_lu.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +x509_lu.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +x509_lu.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h x509_lu.o: ../../include/openssl/err.h ../../include/openssl/evp.h x509_lu.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h x509_lu.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -301,13 +301,13 @@ x509_lu.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h x509_lu.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h x509_lu.o: ../cryptlib.h x509_lu.c x509_obj.o: ../../e_os.h ../../include/openssl/aes.h -x509_obj.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -x509_obj.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -x509_obj.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -x509_obj.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -x509_obj.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -x509_obj.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -x509_obj.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +x509_obj.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +x509_obj.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x509_obj.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x509_obj.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +x509_obj.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +x509_obj.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +x509_obj.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h x509_obj.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h x509_obj.o: ../../include/openssl/evp.h ../../include/openssl/idea.h x509_obj.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -324,13 +324,13 @@ x509_obj.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h x509_obj.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h x509_obj.o: ../cryptlib.h x509_obj.c x509_r2x.o: ../../e_os.h ../../include/openssl/aes.h -x509_r2x.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -x509_r2x.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -x509_r2x.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -x509_r2x.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -x509_r2x.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -x509_r2x.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -x509_r2x.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +x509_r2x.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +x509_r2x.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x509_r2x.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x509_r2x.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +x509_r2x.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +x509_r2x.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +x509_r2x.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h x509_r2x.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h x509_r2x.o: ../../include/openssl/evp.h ../../include/openssl/idea.h x509_r2x.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -347,13 +347,13 @@ x509_r2x.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h x509_r2x.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h x509_r2x.o: ../cryptlib.h x509_r2x.c x509_req.o: ../../e_os.h ../../include/openssl/aes.h -x509_req.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -x509_req.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -x509_req.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -x509_req.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -x509_req.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -x509_req.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -x509_req.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +x509_req.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +x509_req.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x509_req.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x509_req.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +x509_req.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +x509_req.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +x509_req.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h x509_req.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h x509_req.o: ../../include/openssl/evp.h ../../include/openssl/idea.h x509_req.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -371,13 +371,13 @@ x509_req.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h x509_req.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h x509_req.o: ../cryptlib.h x509_req.c x509_set.o: ../../e_os.h ../../include/openssl/aes.h -x509_set.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -x509_set.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -x509_set.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -x509_set.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -x509_set.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -x509_set.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -x509_set.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +x509_set.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +x509_set.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x509_set.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x509_set.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +x509_set.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +x509_set.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +x509_set.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h x509_set.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h x509_set.o: ../../include/openssl/evp.h ../../include/openssl/idea.h x509_set.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -394,14 +394,14 @@ x509_set.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h x509_set.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h x509_set.o: ../cryptlib.h x509_set.c x509_trs.o: ../../e_os.h ../../include/openssl/aes.h -x509_trs.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -x509_trs.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -x509_trs.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -x509_trs.o: ../../include/openssl/cast.h ../../include/openssl/conf.h -x509_trs.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -x509_trs.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -x509_trs.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -x509_trs.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +x509_trs.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +x509_trs.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x509_trs.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x509_trs.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +x509_trs.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +x509_trs.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +x509_trs.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +x509_trs.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h x509_trs.o: ../../include/openssl/err.h ../../include/openssl/evp.h x509_trs.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h x509_trs.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -418,13 +418,13 @@ x509_trs.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h x509_trs.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h x509_trs.o: ../../include/openssl/x509v3.h ../cryptlib.h x509_trs.c x509_txt.o: ../../e_os.h ../../include/openssl/aes.h -x509_txt.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -x509_txt.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -x509_txt.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -x509_txt.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -x509_txt.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -x509_txt.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -x509_txt.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +x509_txt.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +x509_txt.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x509_txt.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x509_txt.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +x509_txt.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +x509_txt.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +x509_txt.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h x509_txt.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h x509_txt.o: ../../include/openssl/evp.h ../../include/openssl/idea.h x509_txt.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -441,14 +441,14 @@ x509_txt.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h x509_txt.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h x509_txt.o: ../cryptlib.h x509_txt.c x509_v3.o: ../../e_os.h ../../include/openssl/aes.h -x509_v3.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -x509_v3.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -x509_v3.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -x509_v3.o: ../../include/openssl/cast.h ../../include/openssl/conf.h -x509_v3.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -x509_v3.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -x509_v3.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -x509_v3.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +x509_v3.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +x509_v3.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x509_v3.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x509_v3.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +x509_v3.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +x509_v3.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +x509_v3.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +x509_v3.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h x509_v3.o: ../../include/openssl/err.h ../../include/openssl/evp.h x509_v3.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h x509_v3.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -465,14 +465,14 @@ x509_v3.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h x509_v3.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h x509_v3.o: ../cryptlib.h x509_v3.c x509_vfy.o: ../../e_os.h ../../include/openssl/aes.h -x509_vfy.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -x509_vfy.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -x509_vfy.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -x509_vfy.o: ../../include/openssl/cast.h ../../include/openssl/conf.h -x509_vfy.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -x509_vfy.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -x509_vfy.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -x509_vfy.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +x509_vfy.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +x509_vfy.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x509_vfy.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x509_vfy.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +x509_vfy.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +x509_vfy.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +x509_vfy.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +x509_vfy.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h x509_vfy.o: ../../include/openssl/err.h ../../include/openssl/evp.h x509_vfy.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h x509_vfy.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -489,13 +489,13 @@ x509_vfy.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h x509_vfy.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h x509_vfy.o: ../../include/openssl/x509v3.h ../cryptlib.h x509_vfy.c x509cset.o: ../../e_os.h ../../include/openssl/aes.h -x509cset.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -x509cset.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -x509cset.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -x509cset.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -x509cset.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -x509cset.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -x509cset.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +x509cset.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +x509cset.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x509cset.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x509cset.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +x509cset.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +x509cset.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +x509cset.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h x509cset.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h x509cset.o: ../../include/openssl/evp.h ../../include/openssl/idea.h x509cset.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -512,13 +512,13 @@ x509cset.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h x509cset.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h x509cset.o: ../cryptlib.h x509cset.c x509name.o: ../../e_os.h ../../include/openssl/aes.h -x509name.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -x509name.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -x509name.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -x509name.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -x509name.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -x509name.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -x509name.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +x509name.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +x509name.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x509name.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x509name.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +x509name.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +x509name.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +x509name.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h x509name.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h x509name.o: ../../include/openssl/evp.h ../../include/openssl/idea.h x509name.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -535,13 +535,13 @@ x509name.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h x509name.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h x509name.o: ../cryptlib.h x509name.c x509rset.o: ../../e_os.h ../../include/openssl/aes.h -x509rset.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -x509rset.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -x509rset.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -x509rset.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -x509rset.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -x509rset.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -x509rset.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +x509rset.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +x509rset.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x509rset.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x509rset.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +x509rset.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +x509rset.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +x509rset.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h x509rset.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h x509rset.o: ../../include/openssl/evp.h ../../include/openssl/idea.h x509rset.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -558,13 +558,13 @@ x509rset.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h x509rset.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h x509rset.o: ../cryptlib.h x509rset.c x509spki.o: ../../e_os.h ../../include/openssl/aes.h -x509spki.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -x509spki.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -x509spki.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -x509spki.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -x509spki.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -x509spki.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -x509spki.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +x509spki.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +x509spki.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x509spki.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x509spki.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +x509spki.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +x509spki.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +x509spki.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h x509spki.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h x509spki.o: ../../include/openssl/evp.h ../../include/openssl/idea.h x509spki.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -581,13 +581,13 @@ x509spki.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h x509spki.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h x509spki.o: ../cryptlib.h x509spki.c x509type.o: ../../e_os.h ../../include/openssl/aes.h -x509type.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -x509type.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -x509type.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -x509type.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h -x509type.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -x509type.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -x509type.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +x509type.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +x509type.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +x509type.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +x509type.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +x509type.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +x509type.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +x509type.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h x509type.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h x509type.o: ../../include/openssl/evp.h ../../include/openssl/idea.h x509type.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -604,13 +604,13 @@ x509type.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h x509type.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h x509type.o: ../cryptlib.h x509type.c x_all.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h -x_all.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -x_all.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -x_all.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -x_all.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -x_all.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -x_all.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -x_all.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +x_all.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +x_all.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +x_all.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h +x_all.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +x_all.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +x_all.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +x_all.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h x_all.o: ../../include/openssl/err.h ../../include/openssl/evp.h x_all.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h x_all.o: ../../include/openssl/md2.h ../../include/openssl/md4.h diff --git a/crypto/x509/x509.h b/crypto/x509/x509.h index 7687e3bf2e..8b42b09f61 100644 --- a/crypto/x509/x509.h +++ b/crypto/x509/x509.h @@ -55,6 +55,11 @@ * copied and put under another distribution licence * [including the GNU Public Licence.] */ +/* ==================================================================== + * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. + * ECDH support in OpenSSL originally developed by + * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project. + */ #ifndef HEADER_X509_H #define HEADER_X509_H @@ -81,10 +86,18 @@ #include <openssl/dsa.h> #endif +#ifndef OPENSSL_NO_EC +#include <openssl/ec.h> +#endif + #ifndef OPENSSL_NO_ECDSA #include <openssl/ecdsa.h> #endif +#ifndef OPENSSL_NO_ECDH +#include <openssl/ecdh.h> +#endif + #ifndef OPENSSL_NO_DH #include <openssl/dh.h> #endif @@ -656,15 +669,15 @@ extern "C" { #define i2d_DSAPrivateKey_bio(bp,dsa) ASN1_i2d_bio(i2d_DSAPrivateKey,bp, \ (unsigned char *)dsa) -#define d2i_ECDSAPrivateKey_fp(fp,ecdsa) (ECDSA *)ASN1_d2i_fp((char *(*)())\ - ECDSA_new,(char *(*)())d2i_ECDSAPrivateKey, (fp), \ +#define d2i_ECPrivateKey_fp(fp,ecdsa) (EC_KEY *)ASN1_d2i_fp((char *(*)())\ + EC_KEY_new,(char *(*)())d2i_ECPrivateKey, (fp), \ (unsigned char **)(ecdsa)) -#define i2d_ECDSAPrivateKey_fp(fp,ecdsa) ASN1_i2d_fp(i2d_ECDSAPrivateKey,fp, \ +#define i2d_ECPrivateKey_fp(fp,ecdsa) ASN1_i2d_fp(i2d_ECPrivateKey,fp, \ (unsigned char *)ecdsa) -#define d2i_ECDSAPrivateKey_bio(bp,ecdsa) (ECDSA *)ASN1_d2i_bio((char *(*)())\ - ECDSA_new,(char *(*)())d2i_ECDSAPrivateKey, (bp), \ +#define d2i_ECPrivateKey_bio(bp,ecdsa) (EC_KEY *)ASN1_d2i_bio((char *(*)())\ + EC_KEY_new,(char *(*)())d2i_ECPrivateKey, (bp), \ (unsigned char **)(ecdsa)) -#define i2d_ECDSAPrivateKey_bio(bp,ecdsa) ASN1_i2d_bio(i2d_ECDSAPrivateKey,bp, \ +#define i2d_ECPrivateKey_bio(bp,ecdsa) ASN1_i2d_bio(i2d_ECPrivateKey,bp, \ (unsigned char *)ecdsa) #define X509_ALGOR_dup(xn) (X509_ALGOR *)ASN1_dup((int (*)())i2d_X509_ALGOR,\ @@ -770,11 +783,11 @@ int i2d_DSA_PUBKEY_fp(FILE *fp, DSA *dsa); DSA *d2i_DSAPrivateKey_fp(FILE *fp, DSA **dsa); int i2d_DSAPrivateKey_fp(FILE *fp, DSA *dsa); #endif -#ifndef OPENSSL_NO_ECDSA -ECDSA *d2i_ECDSA_PUBKEY_fp(FILE *fp, ECDSA **ecdsa); -int i2d_ECDSA_PUBKEY_fp(FILE *fp, ECDSA *ecdsa); -ECDSA *d2i_ECDSAPrivateKey_fp(FILE *fp, ECDSA **ecdsa); -int i2d_ECDSAPrivateKey_fp(FILE *fp, ECDSA *ecdsa); +#ifndef OPENSSL_NO_EC +EC_KEY *d2i_EC_PUBKEY_fp(FILE *fp, EC_KEY **eckey); +int i2d_EC_PUBKEY_fp(FILE *fp, EC_KEY *eckey); +EC_KEY *d2i_ECPrivateKey_fp(FILE *fp, EC_KEY **eckey); +int i2d_ECPrivateKey_fp(FILE *fp, EC_KEY *eckey); #endif X509_SIG *d2i_PKCS8_fp(FILE *fp,X509_SIG **p8); int i2d_PKCS8_fp(FILE *fp,X509_SIG *p8); @@ -809,11 +822,11 @@ int i2d_DSA_PUBKEY_bio(BIO *bp, DSA *dsa); DSA *d2i_DSAPrivateKey_bio(BIO *bp, DSA **dsa); int i2d_DSAPrivateKey_bio(BIO *bp, DSA *dsa); #endif -#ifndef OPENSSL_NO_ECDSA -ECDSA *d2i_ECDSA_PUBKEY_bio(BIO *bp, ECDSA **ecdsa); -int i2d_ECDSA_PUBKEY_bio(BIO *bp, ECDSA *ecdsa); -ECDSA *d2i_ECDSAPrivateKey_bio(BIO *bp, ECDSA **ecdsa); -int i2d_ECDSAPrivateKey_bio(BIO *bp, ECDSA *ecdsa); +#ifndef OPENSSL_NO_EC +EC_KEY *d2i_EC_PUBKEY_bio(BIO *bp, EC_KEY **eckey); +int i2d_EC_PUBKEY_bio(BIO *bp, EC_KEY *eckey); +EC_KEY *d2i_ECPrivateKey_bio(BIO *bp, EC_KEY **eckey); +int i2d_ECPrivateKey_bio(BIO *bp, EC_KEY *eckey); #endif X509_SIG *d2i_PKCS8_bio(BIO *bp,X509_SIG **p8); int i2d_PKCS8_bio(BIO *bp,X509_SIG *p8); @@ -879,9 +892,9 @@ int i2d_DSA_PUBKEY(DSA *a,unsigned char **pp); DSA * d2i_DSA_PUBKEY(DSA **a,unsigned char **pp, long length); #endif -#ifndef OPENSSL_NO_ECDSA -int i2d_ECDSA_PUBKEY(ECDSA *a, unsigned char **pp); -ECDSA *d2i_ECDSA_PUBKEY(ECDSA **a, unsigned char **pp, +#ifndef OPENSSL_NO_EC +int i2d_EC_PUBKEY(EC_KEY *a, unsigned char **pp); +EC_KEY *d2i_EC_PUBKEY(EC_KEY **a, unsigned char **pp, long length); #endif diff --git a/crypto/x509/x509_cmp.c b/crypto/x509/x509_cmp.c index dbbe0a9236..415e5f3863 100644 --- a/crypto/x509/x509_cmp.c +++ b/crypto/x509/x509_cmp.c @@ -295,10 +295,11 @@ int X509_check_private_key(X509 *x, EVP_PKEY *k) } break; #endif -#ifndef OPENSSL_NO_ECDSA - case EVP_PKEY_ECDSA: +#ifndef OPENSSL_NO_EC + case EVP_PKEY_EC: { - int r = EC_POINT_cmp(xk->pkey.ecdsa->group,xk->pkey.ecdsa->pub_key,k->pkey.ecdsa->pub_key,NULL); + int r = EC_POINT_cmp(xk->pkey.eckey->group, + xk->pkey.eckey->pub_key,k->pkey.eckey->pub_key,NULL); if (r != 0) { if (r == 1) diff --git a/crypto/x509/x509type.c b/crypto/x509/x509type.c index 7673c1ba03..8eaf102480 100644 --- a/crypto/x509/x509type.c +++ b/crypto/x509/x509type.c @@ -86,8 +86,8 @@ int X509_certificate_type(X509 *x, EVP_PKEY *pkey) case EVP_PKEY_DSA: ret=EVP_PK_DSA|EVP_PKT_SIGN; break; - case EVP_PKEY_ECDSA: - ret=EVP_PK_ECDSA|EVP_PKT_SIGN; + case EVP_PKEY_EC: + ret=EVP_PK_EC|EVP_PKT_SIGN|EVP_PKT_EXCH; break; case EVP_PKEY_DH: ret=EVP_PK_DH|EVP_PKT_EXCH; @@ -105,8 +105,8 @@ int X509_certificate_type(X509 *x, EVP_PKEY *pkey) case EVP_PKS_DSA: ret|=EVP_PKS_DSA; break; - case EVP_PKS_ECDSA: - ret|=EVP_PKS_ECDSA; + case EVP_PKS_EC: + ret|=EVP_PKS_EC; break; default: break; diff --git a/crypto/x509/x_all.c b/crypto/x509/x_all.c index cc1ff90e9a..801df78f08 100644 --- a/crypto/x509/x_all.c +++ b/crypto/x509/x_all.c @@ -325,59 +325,58 @@ int i2d_DSA_PUBKEY_bio(BIO *bp, DSA *dsa) #endif -#ifndef OPENSSL_NO_ECDSA +#ifndef OPENSSL_NO_EC #ifndef OPENSSL_NO_FP_API -ECDSA *d2i_ECDSAPrivateKey_fp(FILE *fp, ECDSA **ecdsa) +EC_KEY *d2i_EC_PUBKEY_fp(FILE *fp, EC_KEY **eckey) { - return((ECDSA *)ASN1_d2i_fp((char *(*)()) - ECDSA_new,(char *(*)())d2i_ECDSAPrivateKey, (fp), - (unsigned char **)(ecdsa))); + return((EC_KEY *)ASN1_d2i_fp((char *(*)()) + EC_KEY_new,(char *(*)())d2i_EC_PUBKEY, (fp), + (unsigned char **)(eckey))); } -int i2d_ECDSAPrivateKey_fp(FILE *fp, ECDSA *ecdsa) +int i2d_EC_PUBKEY_fp(FILE *fp, EC_KEY *eckey) { - return(ASN1_i2d_fp(i2d_ECDSAPrivateKey,fp,(unsigned char *)ecdsa)); + return(ASN1_i2d_fp(i2d_EC_PUBKEY,fp,(unsigned char *)eckey)); } - -ECDSA *d2i_ECDSA_PUBKEY_fp(FILE *fp, ECDSA **ecdsa) + +EC_KEY *d2i_ECPrivateKey_fp(FILE *fp, EC_KEY **eckey) { - return((ECDSA *)ASN1_d2i_fp((char *(*)()) - ECDSA_new,(char *(*)())d2i_ECDSA_PUBKEY, (fp), - (unsigned char **)(ecdsa))); + return((EC_KEY *)ASN1_d2i_fp((char *(*)()) + EC_KEY_new,(char *(*)())d2i_ECPrivateKey, (fp), + (unsigned char **)(eckey))); } -int i2d_ECDSA_PUBKEY_fp(FILE *fp, ECDSA *ecdsa) +int i2d_ECPrivateKey_fp(FILE *fp, EC_KEY *eckey) { - return(ASN1_i2d_fp(i2d_ECDSA_PUBKEY,fp,(unsigned char *)ecdsa)); + return(ASN1_i2d_fp(i2d_ECPrivateKey,fp,(unsigned char *)eckey)); } #endif - -ECDSA *d2i_ECDSAPrivateKey_bio(BIO *bp, ECDSA **ecdsa) +EC_KEY *d2i_EC_PUBKEY_bio(BIO *bp, EC_KEY **eckey) { - return((ECDSA *)ASN1_d2i_bio((char *(*)()) - ECDSA_new,(char *(*)())d2i_ECDSAPrivateKey, (bp), - (unsigned char **)(ecdsa))); + return((EC_KEY *)ASN1_d2i_bio((char *(*)()) + EC_KEY_new,(char *(*)())d2i_EC_PUBKEY, (bp), + (unsigned char **)(eckey))); } -int i2d_ECDSAPrivateKey_bio(BIO *bp, ECDSA *ecdsa) +int i2d_EC_PUBKEY_bio(BIO *bp, EC_KEY *ecdsa) { - return(ASN1_i2d_bio(i2d_ECDSAPrivateKey,bp,(unsigned char *)ecdsa)); + return(ASN1_i2d_bio(i2d_EC_PUBKEY,bp,(unsigned char *)ecdsa)); } - -ECDSA *d2i_ECDSA_PUBKEY_bio(BIO *bp, ECDSA **ecdsa) + +EC_KEY *d2i_ECPrivateKey_bio(BIO *bp, EC_KEY **eckey) { - return((ECDSA *)ASN1_d2i_bio((char *(*)()) - ECDSA_new,(char *(*)())d2i_ECDSA_PUBKEY, (bp), - (unsigned char **)(ecdsa))); + return((EC_KEY *)ASN1_d2i_bio((char *(*)()) + EC_KEY_new,(char *(*)())d2i_ECPrivateKey, (bp), + (unsigned char **)(eckey))); } -int i2d_ECDSA_PUBKEY_bio(BIO *bp, ECDSA *ecdsa) +int i2d_ECPrivateKey_bio(BIO *bp, EC_KEY *eckey) { - return(ASN1_i2d_bio(i2d_ECDSA_PUBKEY,bp,(unsigned char *)ecdsa)); + return(ASN1_i2d_bio(i2d_ECPrivateKey,bp,(unsigned char *)eckey)); } - #endif + int X509_pubkey_digest(const X509 *data, const EVP_MD *type, unsigned char *md, unsigned int *len) { diff --git a/crypto/x509v3/Makefile.ssl b/crypto/x509v3/Makefile.ssl index a0680e6f7f..b33e3d1eb5 100644 --- a/crypto/x509v3/Makefile.ssl +++ b/crypto/x509v3/Makefile.ssl @@ -93,22 +93,22 @@ v3_akey.o: ../../include/openssl/cast.h ../../include/openssl/conf.h v3_akey.o: ../../include/openssl/crypto.h ../../include/openssl/des.h v3_akey.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h v3_akey.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -v3_akey.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h -v3_akey.o: ../../include/openssl/err.h ../../include/openssl/evp.h -v3_akey.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h -v3_akey.o: ../../include/openssl/md2.h ../../include/openssl/md4.h -v3_akey.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h -v3_akey.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h -v3_akey.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h -v3_akey.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h -v3_akey.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h -v3_akey.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h -v3_akey.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h -v3_akey.o: ../../include/openssl/sha.h ../../include/openssl/stack.h -v3_akey.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h -v3_akey.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h -v3_akey.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h -v3_akey.o: ../cryptlib.h v3_akey.c +v3_akey.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h +v3_akey.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h +v3_akey.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +v3_akey.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +v3_akey.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +v3_akey.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +v3_akey.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +v3_akey.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +v3_akey.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +v3_akey.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +v3_akey.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +v3_akey.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +v3_akey.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +v3_akey.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +v3_akey.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +v3_akey.o: ../../include/openssl/x509v3.h ../cryptlib.h v3_akey.c v3_akeya.o: ../../e_os.h ../../include/openssl/aes.h v3_akeya.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h v3_akeya.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h @@ -117,13 +117,13 @@ v3_akeya.o: ../../include/openssl/cast.h ../../include/openssl/conf.h v3_akeya.o: ../../include/openssl/crypto.h ../../include/openssl/des.h v3_akeya.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h v3_akeya.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -v3_akeya.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h -v3_akeya.o: ../../include/openssl/err.h ../../include/openssl/evp.h -v3_akeya.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h -v3_akeya.o: ../../include/openssl/md2.h ../../include/openssl/md4.h -v3_akeya.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h -v3_akeya.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h -v3_akeya.o: ../../include/openssl/opensslconf.h +v3_akeya.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h +v3_akeya.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h +v3_akeya.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +v3_akeya.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +v3_akeya.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +v3_akeya.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +v3_akeya.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h v3_akeya.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h v3_akeya.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h v3_akeya.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h @@ -134,13 +134,13 @@ v3_akeya.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h v3_akeya.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h v3_akeya.o: ../../include/openssl/x509v3.h ../cryptlib.h v3_akeya.c v3_alt.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h -v3_alt.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -v3_alt.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -v3_alt.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -v3_alt.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h -v3_alt.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -v3_alt.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -v3_alt.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +v3_alt.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +v3_alt.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +v3_alt.o: ../../include/openssl/cast.h ../../include/openssl/conf.h +v3_alt.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +v3_alt.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +v3_alt.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +v3_alt.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h v3_alt.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h v3_alt.o: ../../include/openssl/evp.h ../../include/openssl/idea.h v3_alt.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -164,13 +164,13 @@ v3_bcons.o: ../../include/openssl/cast.h ../../include/openssl/conf.h v3_bcons.o: ../../include/openssl/crypto.h ../../include/openssl/des.h v3_bcons.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h v3_bcons.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -v3_bcons.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h -v3_bcons.o: ../../include/openssl/err.h ../../include/openssl/evp.h -v3_bcons.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h -v3_bcons.o: ../../include/openssl/md2.h ../../include/openssl/md4.h -v3_bcons.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h -v3_bcons.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h -v3_bcons.o: ../../include/openssl/opensslconf.h +v3_bcons.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h +v3_bcons.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h +v3_bcons.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +v3_bcons.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +v3_bcons.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +v3_bcons.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +v3_bcons.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h v3_bcons.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h v3_bcons.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h v3_bcons.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h @@ -181,14 +181,14 @@ v3_bcons.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h v3_bcons.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h v3_bcons.o: ../../include/openssl/x509v3.h ../cryptlib.h v3_bcons.c v3_bitst.o: ../../e_os.h ../../include/openssl/aes.h -v3_bitst.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -v3_bitst.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -v3_bitst.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -v3_bitst.o: ../../include/openssl/cast.h ../../include/openssl/conf.h -v3_bitst.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -v3_bitst.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -v3_bitst.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -v3_bitst.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +v3_bitst.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +v3_bitst.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +v3_bitst.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +v3_bitst.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +v3_bitst.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +v3_bitst.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +v3_bitst.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +v3_bitst.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h v3_bitst.o: ../../include/openssl/err.h ../../include/openssl/evp.h v3_bitst.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h v3_bitst.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -205,14 +205,14 @@ v3_bitst.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h v3_bitst.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h v3_bitst.o: ../../include/openssl/x509v3.h ../cryptlib.h v3_bitst.c v3_conf.o: ../../e_os.h ../../include/openssl/aes.h -v3_conf.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -v3_conf.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -v3_conf.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -v3_conf.o: ../../include/openssl/cast.h ../../include/openssl/conf.h -v3_conf.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -v3_conf.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -v3_conf.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -v3_conf.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +v3_conf.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +v3_conf.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +v3_conf.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +v3_conf.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +v3_conf.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +v3_conf.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +v3_conf.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +v3_conf.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h v3_conf.o: ../../include/openssl/err.h ../../include/openssl/evp.h v3_conf.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h v3_conf.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -236,13 +236,13 @@ v3_cpols.o: ../../include/openssl/cast.h ../../include/openssl/conf.h v3_cpols.o: ../../include/openssl/crypto.h ../../include/openssl/des.h v3_cpols.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h v3_cpols.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -v3_cpols.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h -v3_cpols.o: ../../include/openssl/err.h ../../include/openssl/evp.h -v3_cpols.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h -v3_cpols.o: ../../include/openssl/md2.h ../../include/openssl/md4.h -v3_cpols.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h -v3_cpols.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h -v3_cpols.o: ../../include/openssl/opensslconf.h +v3_cpols.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h +v3_cpols.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h +v3_cpols.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +v3_cpols.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +v3_cpols.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +v3_cpols.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +v3_cpols.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h v3_cpols.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h v3_cpols.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h v3_cpols.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h @@ -260,31 +260,31 @@ v3_crld.o: ../../include/openssl/cast.h ../../include/openssl/conf.h v3_crld.o: ../../include/openssl/crypto.h ../../include/openssl/des.h v3_crld.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h v3_crld.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -v3_crld.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h -v3_crld.o: ../../include/openssl/err.h ../../include/openssl/evp.h -v3_crld.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h -v3_crld.o: ../../include/openssl/md2.h ../../include/openssl/md4.h -v3_crld.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h -v3_crld.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h -v3_crld.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h -v3_crld.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h -v3_crld.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h -v3_crld.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h -v3_crld.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h -v3_crld.o: ../../include/openssl/sha.h ../../include/openssl/stack.h -v3_crld.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h -v3_crld.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h -v3_crld.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h -v3_crld.o: ../cryptlib.h v3_crld.c +v3_crld.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h +v3_crld.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h +v3_crld.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +v3_crld.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +v3_crld.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +v3_crld.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +v3_crld.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +v3_crld.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +v3_crld.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +v3_crld.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +v3_crld.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +v3_crld.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +v3_crld.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +v3_crld.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +v3_crld.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +v3_crld.o: ../../include/openssl/x509v3.h ../cryptlib.h v3_crld.c v3_enum.o: ../../e_os.h ../../include/openssl/aes.h -v3_enum.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -v3_enum.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -v3_enum.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -v3_enum.o: ../../include/openssl/cast.h ../../include/openssl/conf.h -v3_enum.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -v3_enum.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -v3_enum.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -v3_enum.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +v3_enum.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +v3_enum.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +v3_enum.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +v3_enum.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +v3_enum.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +v3_enum.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +v3_enum.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +v3_enum.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h v3_enum.o: ../../include/openssl/err.h ../../include/openssl/evp.h v3_enum.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h v3_enum.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -308,13 +308,13 @@ v3_extku.o: ../../include/openssl/cast.h ../../include/openssl/conf.h v3_extku.o: ../../include/openssl/crypto.h ../../include/openssl/des.h v3_extku.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h v3_extku.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -v3_extku.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h -v3_extku.o: ../../include/openssl/err.h ../../include/openssl/evp.h -v3_extku.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h -v3_extku.o: ../../include/openssl/md2.h ../../include/openssl/md4.h -v3_extku.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h -v3_extku.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h -v3_extku.o: ../../include/openssl/opensslconf.h +v3_extku.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h +v3_extku.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h +v3_extku.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +v3_extku.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +v3_extku.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +v3_extku.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +v3_extku.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h v3_extku.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h v3_extku.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h v3_extku.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h @@ -332,30 +332,30 @@ v3_genn.o: ../../include/openssl/cast.h ../../include/openssl/conf.h v3_genn.o: ../../include/openssl/crypto.h ../../include/openssl/des.h v3_genn.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h v3_genn.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -v3_genn.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h -v3_genn.o: ../../include/openssl/err.h ../../include/openssl/evp.h -v3_genn.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h -v3_genn.o: ../../include/openssl/md2.h ../../include/openssl/md4.h -v3_genn.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h -v3_genn.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h -v3_genn.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h -v3_genn.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h -v3_genn.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h -v3_genn.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h -v3_genn.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h -v3_genn.o: ../../include/openssl/sha.h ../../include/openssl/stack.h -v3_genn.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h -v3_genn.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h -v3_genn.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h -v3_genn.o: ../cryptlib.h v3_genn.c +v3_genn.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h +v3_genn.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h +v3_genn.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +v3_genn.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +v3_genn.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +v3_genn.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +v3_genn.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +v3_genn.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +v3_genn.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +v3_genn.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +v3_genn.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +v3_genn.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +v3_genn.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +v3_genn.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +v3_genn.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +v3_genn.o: ../../include/openssl/x509v3.h ../cryptlib.h v3_genn.c v3_ia5.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h -v3_ia5.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -v3_ia5.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -v3_ia5.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -v3_ia5.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h -v3_ia5.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -v3_ia5.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -v3_ia5.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +v3_ia5.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +v3_ia5.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +v3_ia5.o: ../../include/openssl/cast.h ../../include/openssl/conf.h +v3_ia5.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +v3_ia5.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +v3_ia5.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +v3_ia5.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h v3_ia5.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h v3_ia5.o: ../../include/openssl/evp.h ../../include/openssl/idea.h v3_ia5.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -379,30 +379,30 @@ v3_info.o: ../../include/openssl/cast.h ../../include/openssl/conf.h v3_info.o: ../../include/openssl/crypto.h ../../include/openssl/des.h v3_info.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h v3_info.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -v3_info.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h -v3_info.o: ../../include/openssl/err.h ../../include/openssl/evp.h -v3_info.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h -v3_info.o: ../../include/openssl/md2.h ../../include/openssl/md4.h -v3_info.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h -v3_info.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h -v3_info.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h -v3_info.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h -v3_info.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h -v3_info.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h -v3_info.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h -v3_info.o: ../../include/openssl/sha.h ../../include/openssl/stack.h -v3_info.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h -v3_info.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h -v3_info.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h -v3_info.o: ../cryptlib.h v3_info.c +v3_info.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h +v3_info.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h +v3_info.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +v3_info.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +v3_info.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +v3_info.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +v3_info.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +v3_info.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +v3_info.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h +v3_info.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h +v3_info.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h +v3_info.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +v3_info.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +v3_info.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h +v3_info.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h +v3_info.o: ../../include/openssl/x509v3.h ../cryptlib.h v3_info.c v3_int.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h -v3_int.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -v3_int.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -v3_int.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -v3_int.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h -v3_int.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -v3_int.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -v3_int.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +v3_int.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +v3_int.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +v3_int.o: ../../include/openssl/cast.h ../../include/openssl/conf.h +v3_int.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +v3_int.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +v3_int.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +v3_int.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h v3_int.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h v3_int.o: ../../include/openssl/evp.h ../../include/openssl/idea.h v3_int.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -419,13 +419,13 @@ v3_int.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h v3_int.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h v3_int.o: ../../include/openssl/x509v3.h ../cryptlib.h v3_int.c v3_lib.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h -v3_lib.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -v3_lib.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -v3_lib.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -v3_lib.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h -v3_lib.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -v3_lib.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -v3_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +v3_lib.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +v3_lib.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +v3_lib.o: ../../include/openssl/cast.h ../../include/openssl/conf.h +v3_lib.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +v3_lib.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +v3_lib.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +v3_lib.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h v3_lib.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h v3_lib.o: ../../include/openssl/evp.h ../../include/openssl/idea.h v3_lib.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -442,14 +442,14 @@ v3_lib.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h v3_lib.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h v3_lib.o: ../../include/openssl/x509v3.h ../cryptlib.h ext_dat.h v3_lib.c v3_ocsp.o: ../../e_os.h ../../include/openssl/aes.h -v3_ocsp.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -v3_ocsp.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -v3_ocsp.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -v3_ocsp.o: ../../include/openssl/cast.h ../../include/openssl/conf.h -v3_ocsp.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -v3_ocsp.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -v3_ocsp.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -v3_ocsp.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +v3_ocsp.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +v3_ocsp.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +v3_ocsp.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +v3_ocsp.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +v3_ocsp.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +v3_ocsp.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +v3_ocsp.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +v3_ocsp.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h v3_ocsp.o: ../../include/openssl/err.h ../../include/openssl/evp.h v3_ocsp.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h v3_ocsp.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -473,29 +473,30 @@ v3_pku.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h v3_pku.o: ../../include/openssl/des.h ../../include/openssl/des_old.h v3_pku.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h v3_pku.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h -v3_pku.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h -v3_pku.o: ../../include/openssl/evp.h ../../include/openssl/idea.h -v3_pku.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h -v3_pku.o: ../../include/openssl/md4.h ../../include/openssl/md5.h -v3_pku.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h -v3_pku.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h -v3_pku.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h -v3_pku.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h -v3_pku.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h -v3_pku.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h -v3_pku.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h -v3_pku.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h -v3_pku.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h -v3_pku.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h -v3_pku.o: ../../include/openssl/x509v3.h ../cryptlib.h v3_pku.c +v3_pku.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h +v3_pku.o: ../../include/openssl/err.h ../../include/openssl/evp.h +v3_pku.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h +v3_pku.o: ../../include/openssl/md2.h ../../include/openssl/md4.h +v3_pku.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h +v3_pku.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +v3_pku.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +v3_pku.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h +v3_pku.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h +v3_pku.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h +v3_pku.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +v3_pku.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +v3_pku.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h +v3_pku.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h +v3_pku.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h +v3_pku.o: ../cryptlib.h v3_pku.c v3_prn.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h -v3_prn.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -v3_prn.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -v3_prn.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -v3_prn.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h -v3_prn.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -v3_prn.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -v3_prn.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +v3_prn.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +v3_prn.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +v3_prn.o: ../../include/openssl/cast.h ../../include/openssl/conf.h +v3_prn.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +v3_prn.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +v3_prn.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +v3_prn.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h v3_prn.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h v3_prn.o: ../../include/openssl/evp.h ../../include/openssl/idea.h v3_prn.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -512,14 +513,14 @@ v3_prn.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h v3_prn.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h v3_prn.o: ../../include/openssl/x509v3.h ../cryptlib.h v3_prn.c v3_purp.o: ../../e_os.h ../../include/openssl/aes.h -v3_purp.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -v3_purp.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -v3_purp.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -v3_purp.o: ../../include/openssl/cast.h ../../include/openssl/conf.h -v3_purp.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -v3_purp.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -v3_purp.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -v3_purp.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +v3_purp.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +v3_purp.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +v3_purp.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +v3_purp.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +v3_purp.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +v3_purp.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +v3_purp.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +v3_purp.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h v3_purp.o: ../../include/openssl/err.h ../../include/openssl/evp.h v3_purp.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h v3_purp.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -536,14 +537,14 @@ v3_purp.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h v3_purp.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h v3_purp.o: ../cryptlib.h v3_purp.c v3_skey.o: ../../e_os.h ../../include/openssl/aes.h -v3_skey.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h -v3_skey.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h -v3_skey.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -v3_skey.o: ../../include/openssl/cast.h ../../include/openssl/conf.h -v3_skey.o: ../../include/openssl/crypto.h ../../include/openssl/des.h -v3_skey.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h -v3_skey.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -v3_skey.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h +v3_skey.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +v3_skey.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h +v3_skey.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h +v3_skey.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h +v3_skey.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +v3_skey.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h +v3_skey.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +v3_skey.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h v3_skey.o: ../../include/openssl/err.h ../../include/openssl/evp.h v3_skey.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h v3_skey.o: ../../include/openssl/md2.h ../../include/openssl/md4.h @@ -567,13 +568,13 @@ v3_sxnet.o: ../../include/openssl/cast.h ../../include/openssl/conf.h v3_sxnet.o: ../../include/openssl/crypto.h ../../include/openssl/des.h v3_sxnet.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h v3_sxnet.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -v3_sxnet.o: ../../include/openssl/ec.h ../../include/openssl/ecdsa.h -v3_sxnet.o: ../../include/openssl/err.h ../../include/openssl/evp.h -v3_sxnet.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h -v3_sxnet.o: ../../include/openssl/md2.h ../../include/openssl/md4.h -v3_sxnet.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h -v3_sxnet.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h -v3_sxnet.o: ../../include/openssl/opensslconf.h +v3_sxnet.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h +v3_sxnet.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h +v3_sxnet.o: ../../include/openssl/evp.h ../../include/openssl/idea.h +v3_sxnet.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h +v3_sxnet.o: ../../include/openssl/md4.h ../../include/openssl/md5.h +v3_sxnet.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h +v3_sxnet.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h v3_sxnet.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h v3_sxnet.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h v3_sxnet.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h @@ -584,13 +585,13 @@ v3_sxnet.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h v3_sxnet.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h v3_sxnet.o: ../../include/openssl/x509v3.h ../cryptlib.h v3_sxnet.c v3_utl.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h -v3_utl.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -v3_utl.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -v3_utl.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -v3_utl.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h -v3_utl.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -v3_utl.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -v3_utl.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +v3_utl.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +v3_utl.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +v3_utl.o: ../../include/openssl/cast.h ../../include/openssl/conf.h +v3_utl.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +v3_utl.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +v3_utl.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +v3_utl.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h v3_utl.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h v3_utl.o: ../../include/openssl/evp.h ../../include/openssl/idea.h v3_utl.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h @@ -607,13 +608,13 @@ v3_utl.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h v3_utl.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h v3_utl.o: ../../include/openssl/x509v3.h ../cryptlib.h v3_utl.c v3err.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h -v3err.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h -v3err.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h -v3err.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h -v3err.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h -v3err.o: ../../include/openssl/des.h ../../include/openssl/des_old.h -v3err.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -v3err.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +v3err.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h +v3err.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +v3err.o: ../../include/openssl/cast.h ../../include/openssl/conf.h +v3err.o: ../../include/openssl/crypto.h ../../include/openssl/des.h +v3err.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h +v3err.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +v3err.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h v3err.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h v3err.o: ../../include/openssl/evp.h ../../include/openssl/idea.h v3err.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h |