diff options
author | Bodo Möller <bodo@openssl.org> | 2002-02-13 18:21:51 +0000 |
---|---|---|
committer | Bodo Möller <bodo@openssl.org> | 2002-02-13 18:21:51 +0000 |
commit | 4d94ae00d5614d64d4dd065860c4b00161a81f82 (patch) | |
tree | e993aa323ea753b3c0782439eb78f4f8c896a67e /crypto/pem | |
parent | 60d8bae30d1040a4f955e3247443b2dd4c674cde (diff) |
ECDSA support
Submitted by: Nils Larsch <nla@trustcenter.de>
Diffstat (limited to 'crypto/pem')
-rw-r--r-- | crypto/pem/Makefile.ssl | 240 | ||||
-rw-r--r-- | crypto/pem/pem.h | 12 | ||||
-rw-r--r-- | crypto/pem/pem_all.c | 104 | ||||
-rw-r--r-- | crypto/pem/pem_info.c | 24 | ||||
-rw-r--r-- | crypto/pem/pem_lib.c | 2 | ||||
-rw-r--r-- | crypto/pem/pem_pkey.c | 2 |
6 files changed, 270 insertions, 114 deletions
diff --git a/crypto/pem/Makefile.ssl b/crypto/pem/Makefile.ssl index a051b6fecc..c02be5b091 100644 --- a/crypto/pem/Makefile.ssl +++ b/crypto/pem/Makefile.ssl @@ -83,41 +83,45 @@ clean: # DO NOT DELETE THIS LINE -- make depend depends on it. pem_all.o: ../../e_os.h ../../include/openssl/asn1.h -pem_all.o: ../../include/openssl/bio.h ../../include/openssl/bn.h -pem_all.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h -pem_all.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -pem_all.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h -pem_all.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h -pem_all.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h -pem_all.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h -pem_all.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pem.h -pem_all.o: ../../include/openssl/pem2.h ../../include/openssl/pkcs7.h -pem_all.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h -pem_all.o: ../../include/openssl/sha.h ../../include/openssl/stack.h -pem_all.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h -pem_all.o: ../../include/openssl/x509_vfy.h ../cryptlib.h pem_all.c -pem_err.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h -pem_err.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h -pem_err.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h -pem_err.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h -pem_err.o: ../../include/openssl/err.h ../../include/openssl/evp.h -pem_err.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h -pem_err.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h -pem_err.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h -pem_err.o: ../../include/openssl/pem.h ../../include/openssl/pem2.h -pem_err.o: ../../include/openssl/pkcs7.h ../../include/openssl/rsa.h -pem_err.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h -pem_err.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h -pem_err.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h -pem_err.o: pem_err.c +pem_all.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h +pem_all.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +pem_all.o: ../../include/openssl/crypto.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/ecdsa.h +pem_all.o: ../../include/openssl/err.h ../../include/openssl/evp.h +pem_all.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h +pem_all.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +pem_all.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +pem_all.o: ../../include/openssl/pem.h ../../include/openssl/pem2.h +pem_all.o: ../../include/openssl/pkcs7.h ../../include/openssl/rsa.h +pem_all.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +pem_all.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.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/asn1.h ../../include/openssl/asn1t.h +pem_err.o: ../../include/openssl/bio.h ../../include/openssl/bn.h +pem_err.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.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/ecdsa.h ../../include/openssl/err.h +pem_err.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h +pem_err.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h +pem_err.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h +pem_err.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pem.h +pem_err.o: ../../include/openssl/pem2.h ../../include/openssl/pkcs7.h +pem_err.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +pem_err.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +pem_err.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h +pem_err.o: ../../include/openssl/x509_vfy.h pem_err.c pem_info.o: ../../e_os.h ../../include/openssl/asn1.h -pem_info.o: ../../include/openssl/bio.h ../../include/openssl/bn.h -pem_info.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h -pem_info.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -pem_info.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h -pem_info.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h -pem_info.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h -pem_info.o: ../../include/openssl/opensslconf.h +pem_info.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h +pem_info.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +pem_info.o: ../../include/openssl/crypto.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/ecdsa.h +pem_info.o: ../../include/openssl/err.h ../../include/openssl/evp.h +pem_info.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h +pem_info.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h pem_info.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h pem_info.o: ../../include/openssl/pem.h ../../include/openssl/pem2.h pem_info.o: ../../include/openssl/pkcs7.h ../../include/openssl/rsa.h @@ -126,60 +130,66 @@ pem_info.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.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/asn1.h -pem_lib.o: ../../include/openssl/bio.h ../../include/openssl/bn.h -pem_lib.o: ../../include/openssl/buffer.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/err.h -pem_lib.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h -pem_lib.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h -pem_lib.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h -pem_lib.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pem.h -pem_lib.o: ../../include/openssl/pem2.h ../../include/openssl/pkcs12.h -pem_lib.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h -pem_lib.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h -pem_lib.o: ../../include/openssl/sha.h ../../include/openssl/stack.h -pem_lib.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h -pem_lib.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h -pem_lib.o: ../../include/openssl/x509_vfy.h ../cryptlib.h pem_lib.c +pem_lib.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h +pem_lib.o: ../../include/openssl/bn.h ../../include/openssl/buffer.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/ecdsa.h +pem_lib.o: ../../include/openssl/err.h ../../include/openssl/evp.h +pem_lib.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h +pem_lib.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +pem_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +pem_lib.o: ../../include/openssl/pem.h ../../include/openssl/pem2.h +pem_lib.o: ../../include/openssl/pkcs12.h ../../include/openssl/pkcs7.h +pem_lib.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h +pem_lib.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +pem_lib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h +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/asn1.h -pem_oth.o: ../../include/openssl/bio.h ../../include/openssl/bn.h -pem_oth.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h -pem_oth.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -pem_oth.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h -pem_oth.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h -pem_oth.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h -pem_oth.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h -pem_oth.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pem.h -pem_oth.o: ../../include/openssl/pem2.h ../../include/openssl/pkcs7.h -pem_oth.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h -pem_oth.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h -pem_oth.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h -pem_oth.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h -pem_oth.o: ../cryptlib.h pem_oth.c +pem_oth.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h +pem_oth.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +pem_oth.o: ../../include/openssl/crypto.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/ecdsa.h +pem_oth.o: ../../include/openssl/err.h ../../include/openssl/evp.h +pem_oth.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h +pem_oth.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +pem_oth.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +pem_oth.o: ../../include/openssl/pem.h ../../include/openssl/pem2.h +pem_oth.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h +pem_oth.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +pem_oth.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +pem_oth.o: ../../include/openssl/symhacks.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/asn1.h -pem_pk8.o: ../../include/openssl/bio.h ../../include/openssl/bn.h -pem_pk8.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h -pem_pk8.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -pem_pk8.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h -pem_pk8.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h -pem_pk8.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h -pem_pk8.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h -pem_pk8.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pem.h -pem_pk8.o: ../../include/openssl/pem2.h ../../include/openssl/pkcs12.h -pem_pk8.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h -pem_pk8.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h -pem_pk8.o: ../../include/openssl/sha.h ../../include/openssl/stack.h -pem_pk8.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h -pem_pk8.o: ../../include/openssl/x509_vfy.h ../cryptlib.h pem_pk8.c +pem_pk8.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h +pem_pk8.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +pem_pk8.o: ../../include/openssl/crypto.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/ecdsa.h +pem_pk8.o: ../../include/openssl/err.h ../../include/openssl/evp.h +pem_pk8.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h +pem_pk8.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h +pem_pk8.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h +pem_pk8.o: ../../include/openssl/pem.h ../../include/openssl/pem2.h +pem_pk8.o: ../../include/openssl/pkcs12.h ../../include/openssl/pkcs7.h +pem_pk8.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h +pem_pk8.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h +pem_pk8.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.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/asn1.h -pem_pkey.o: ../../include/openssl/bio.h ../../include/openssl/bn.h -pem_pkey.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h -pem_pkey.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -pem_pkey.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h -pem_pkey.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h -pem_pkey.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h -pem_pkey.o: ../../include/openssl/opensslconf.h +pem_pkey.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h +pem_pkey.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +pem_pkey.o: ../../include/openssl/crypto.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/ecdsa.h +pem_pkey.o: ../../include/openssl/err.h ../../include/openssl/evp.h +pem_pkey.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h +pem_pkey.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h pem_pkey.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h pem_pkey.o: ../../include/openssl/pem.h ../../include/openssl/pem2.h pem_pkey.o: ../../include/openssl/pkcs12.h ../../include/openssl/pkcs7.h @@ -189,13 +199,14 @@ pem_pkey.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.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/asn1.h -pem_seal.o: ../../include/openssl/bio.h ../../include/openssl/bn.h -pem_seal.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h -pem_seal.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -pem_seal.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h -pem_seal.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h -pem_seal.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h -pem_seal.o: ../../include/openssl/opensslconf.h +pem_seal.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h +pem_seal.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +pem_seal.o: ../../include/openssl/crypto.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/ecdsa.h +pem_seal.o: ../../include/openssl/err.h ../../include/openssl/evp.h +pem_seal.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h +pem_seal.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h pem_seal.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h pem_seal.o: ../../include/openssl/pem.h ../../include/openssl/pem2.h pem_seal.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h @@ -204,13 +215,14 @@ pem_seal.o: ../../include/openssl/sha.h ../../include/openssl/stack.h pem_seal.o: ../../include/openssl/symhacks.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/asn1.h -pem_sign.o: ../../include/openssl/bio.h ../../include/openssl/bn.h -pem_sign.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h -pem_sign.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -pem_sign.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h -pem_sign.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h -pem_sign.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h -pem_sign.o: ../../include/openssl/opensslconf.h +pem_sign.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h +pem_sign.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +pem_sign.o: ../../include/openssl/crypto.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/ecdsa.h +pem_sign.o: ../../include/openssl/err.h ../../include/openssl/evp.h +pem_sign.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h +pem_sign.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h pem_sign.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h pem_sign.o: ../../include/openssl/pem.h ../../include/openssl/pem2.h pem_sign.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h @@ -219,13 +231,14 @@ pem_sign.o: ../../include/openssl/sha.h ../../include/openssl/stack.h pem_sign.o: ../../include/openssl/symhacks.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/asn1.h -pem_x509.o: ../../include/openssl/bio.h ../../include/openssl/bn.h -pem_x509.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h -pem_x509.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -pem_x509.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h -pem_x509.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h -pem_x509.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h -pem_x509.o: ../../include/openssl/opensslconf.h +pem_x509.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h +pem_x509.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +pem_x509.o: ../../include/openssl/crypto.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/ecdsa.h +pem_x509.o: ../../include/openssl/err.h ../../include/openssl/evp.h +pem_x509.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h +pem_x509.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h pem_x509.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h pem_x509.o: ../../include/openssl/pem.h ../../include/openssl/pem2.h pem_x509.o: ../../include/openssl/pkcs7.h ../../include/openssl/rsa.h @@ -234,13 +247,14 @@ pem_x509.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.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/asn1.h -pem_xaux.o: ../../include/openssl/bio.h ../../include/openssl/bn.h -pem_xaux.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h -pem_xaux.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -pem_xaux.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h -pem_xaux.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h -pem_xaux.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h -pem_xaux.o: ../../include/openssl/opensslconf.h +pem_xaux.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h +pem_xaux.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +pem_xaux.o: ../../include/openssl/crypto.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/ecdsa.h +pem_xaux.o: ../../include/openssl/err.h ../../include/openssl/evp.h +pem_xaux.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h +pem_xaux.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h pem_xaux.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h pem_xaux.o: ../../include/openssl/pem.h ../../include/openssl/pem2.h pem_xaux.o: ../../include/openssl/pkcs7.h ../../include/openssl/rsa.h diff --git a/crypto/pem/pem.h b/crypto/pem/pem.h index 3785fca77d..a0feea36c5 100644 --- a/crypto/pem/pem.h +++ b/crypto/pem/pem.h @@ -91,6 +91,9 @@ extern "C" { #define PEM_OBJ_DHPARAMS 17 #define PEM_OBJ_DSAPARAMS 18 #define PEM_OBJ_PRIV_RSA_PUBLIC 19 +#define PEM_OBJ_PRIV_ECDSA 20 +#define PEM_OBJ_PUB_ECDSA 21 +#define PEM_OBJ_ECDSAPARAMS 22 #define PEM_ERROR 30 #define PEM_DEK_DES_CBC 40 @@ -126,6 +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_ECDSAPARAMS "ECDSA PARAMETERS" /* Note that this structure is initialised by PEM_SealInit and cleaned up by PEM_SealFinal (at least for now) */ @@ -572,6 +578,12 @@ DECLARE_PEM_rw(DSAparams, DSA) #endif +#ifndef OPENSSL_NO_ECDSA +DECLARE_PEM_rw_cb(ECDSAPrivateKey, ECDSA) +DECLARE_PEM_rw(ECDSA_PUBKEY, ECDSA) +DECLARE_PEM_rw(ECDSAParameters, ECDSA) +#endif + #ifndef OPENSSL_NO_DH DECLARE_PEM_rw(DHparams, DH) diff --git a/crypto/pem/pem_all.c b/crypto/pem/pem_all.c index e72b7134ce..2a4b865a50 100644 --- a/crypto/pem/pem_all.c +++ b/crypto/pem/pem_all.c @@ -55,6 +55,59 @@ * copied and put under another distribution licence * [including the GNU Public Licence.] */ +/* ==================================================================== + * 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). + * + */ #include <stdio.h> #undef SSLEAY_MACROS @@ -72,6 +125,10 @@ 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); +#endif + IMPLEMENT_PEM_rw(X509_REQ, X509_REQ, PEM_STRING_X509_REQ, X509_REQ) IMPLEMENT_PEM_write(X509_REQ_NEW, X509_REQ, PEM_STRING_X509_REQ_OLD, X509_REQ) @@ -177,6 +234,50 @@ IMPLEMENT_PEM_rw(DSAparams, DSA, PEM_STRING_DSAPARAMS, DSAparams) #endif +#ifndef OPENSSL_NO_ECDSA + +static ECDSA *pkey_get_ecdsa(EVP_PKEY *key, ECDSA **ecdsa) +{ + ECDSA *dtmp; + if(!key) return NULL; + dtmp = EVP_PKEY_get1_ECDSA(key); + EVP_PKEY_free(key); + if(!dtmp) return NULL; + if(ecdsa) + { + ECDSA_free(*ecdsa); + *ecdsa = dtmp; + } + return dtmp; +} + +ECDSA *PEM_read_bio_ECDSAPrivateKey(BIO *bp, ECDSA **ecdsa, pem_password_cb *cb, + void *u) +{ + EVP_PKEY *pktmp; + pktmp = PEM_read_bio_PrivateKey(bp, NULL, cb, u); + return pkey_get_ecdsa(pktmp, ecdsa); +} + +IMPLEMENT_PEM_write_cb(ECDSAPrivateKey, ECDSA, PEM_STRING_ECDSA, ECDSAPrivateKey) +IMPLEMENT_PEM_rw(ECDSA_PUBKEY, ECDSA, PEM_STRING_PUBLIC, ECDSA_PUBKEY) + +#ifndef OPENSSL_NO_FP_API + +ECDSA *PEM_read_ECDSAPrivateKey(FILE *fp, ECDSA **ecdsa, pem_password_cb *cb, + void *u) +{ + EVP_PKEY *pktmp; + pktmp = PEM_read_PrivateKey(fp, NULL, cb, u); + return pkey_get_ecdsa(pktmp, ecdsa); +} + +#endif + +IMPLEMENT_PEM_rw(ECDSAParameters, ECDSA, PEM_STRING_ECDSAPARAMS, ECDSAParameters) + +#endif + #ifndef OPENSSL_NO_DH IMPLEMENT_PEM_rw(DHparams, DH, PEM_STRING_DHPARAMS, DHparams) @@ -190,7 +291,8 @@ IMPLEMENT_PEM_rw(DHparams, DH, PEM_STRING_DHPARAMS, DHparams) * (When reading, parameter PEM_STRING_EVP_PKEY is a wildcard for anything * appropriate.) */ -IMPLEMENT_PEM_write_cb(PrivateKey, EVP_PKEY, ((x->type == EVP_PKEY_DSA)?PEM_STRING_DSA:PEM_STRING_RSA), PrivateKey) +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) 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 b6ca51a186..8bcd9f770d 100644 --- a/crypto/pem/pem_info.c +++ b/crypto/pem/pem_info.c @@ -203,6 +203,30 @@ start: } else #endif +#ifndef OPENSSL_NO_ECDSA + if (strcmp(name,PEM_STRING_ECDSA) == 0) + { + d2i=(char *(*)())d2i_ECDSAPrivateKey; + if (xi->x_pkey != NULL) + { + if (!sk_X509_INFO_push(ret,xi)) goto err; + if ((xi=X509_INFO_new()) == NULL) goto err; + goto start; + } + + xi->enc_data=NULL; + xi->enc_len=0; + + 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); + if ((int)strlen(header) > 10) /* assume encrypted */ + raw=1; + } + else +#endif { d2i=NULL; pp=NULL; diff --git a/crypto/pem/pem_lib.c b/crypto/pem/pem_lib.c index 94373e1d23..52a36dc00d 100644 --- a/crypto/pem/pem_lib.c +++ b/crypto/pem/pem_lib.c @@ -193,6 +193,8 @@ 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) && + !strcmp(name,PEM_STRING_EVP_PKEY)) return 1; /* Permit older strings */ if(!strcmp(nm,PEM_STRING_X509_OLD) && diff --git a/crypto/pem/pem_pkey.c b/crypto/pem/pem_pkey.c index 270892d72b..0e3faffa44 100644 --- a/crypto/pem/pem_pkey.c +++ b/crypto/pem/pem_pkey.c @@ -82,6 +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_PKCS8INF) == 0) { PKCS8_PRIV_KEY_INFO *p8inf; p8inf=d2i_PKCS8_PRIV_KEY_INFO(NULL, &p, len); |