SKF Wrapper

This commit is contained in:
Zhi Guan
2016-05-29 00:22:33 +02:00
parent 0cf9126a7d
commit ee4384daeb
142 changed files with 9469 additions and 6750 deletions

View File

@@ -18,10 +18,10 @@ APPS=
LIB=$(TOP)/libcrypto.a
LIBSRC= pem_sign.c pem_seal.c pem_info.c pem_lib.c pem_all.c pem_err.c \
pem_x509.c pem_xaux.c pem_oth.c pem_pk8.c pem_pkey.c pvkfmt.c pem_sm2.c
pem_x509.c pem_xaux.c pem_oth.c pem_pk8.c pem_pkey.c pvkfmt.c
LIBOBJ= pem_sign.o pem_seal.o pem_info.o pem_lib.o pem_all.o pem_err.o \
pem_x509.o pem_xaux.o pem_oth.o pem_pk8.o pem_pkey.o pvkfmt.o pem_sm2.o
pem_x509.o pem_xaux.o pem_oth.o pem_pk8.o pem_pkey.o pvkfmt.o
SRC= $(LIBSRC)
@@ -85,40 +85,46 @@ 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/ecdh.h
pem_all.o: ../../include/openssl/ecdsa.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_all.o: ../../include/openssl/evp.h ../../include/openssl/kdf.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/sm2.h ../../include/openssl/sm3.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/bio.h
pem_err.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.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/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/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_err.o: ../../include/openssl/kdf.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/safestack.h ../../include/openssl/sha.h
pem_err.o: ../../include/openssl/sm2.h ../../include/openssl/sm3.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_info.o: ../../e_os.h ../../include/openssl/asn1.h
pem_info.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
pem_info.o: ../../include/openssl/crypto.h ../../include/openssl/dsa.h
pem_info.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
pem_info.o: ../../include/openssl/ecdh.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/kdf.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/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
pem_info.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
pem_info.o: ../../include/openssl/sm2.h ../../include/openssl/sm3.h
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
@@ -129,60 +135,65 @@ pem_lib.o: ../../include/openssl/des_old.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/engine.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/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 ../asn1/asn1_locl.h ../cryptlib.h
pem_lib.o: pem_lib.c
pem_lib.o: ../../include/openssl/kdf.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/safestack.h ../../include/openssl/sha.h
pem_lib.o: ../../include/openssl/sm2.h ../../include/openssl/sm3.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: ../asn1/asn1_locl.h ../cryptlib.h pem_lib.c
pem_oth.o: ../../e_os.h ../../include/openssl/asn1.h
pem_oth.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
pem_oth.o: ../../include/openssl/crypto.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/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/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_oth.o: ../../include/openssl/evp.h ../../include/openssl/kdf.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/safestack.h ../../include/openssl/sha.h
pem_oth.o: ../../include/openssl/sm2.h ../../include/openssl/sm3.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_pk8.o: ../../e_os.h ../../include/openssl/asn1.h
pem_pk8.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
pem_pk8.o: ../../include/openssl/crypto.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/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/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_pk8.o: ../../include/openssl/evp.h ../../include/openssl/kdf.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/safestack.h
pem_pk8.o: ../../include/openssl/sha.h ../../include/openssl/sm2.h
pem_pk8.o: ../../include/openssl/sm3.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_pkey.o: ../../e_os.h ../../include/openssl/asn1.h
pem_pkey.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
pem_pkey.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h
pem_pkey.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
pem_pkey.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
pem_pkey.o: ../../include/openssl/engine.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/evp.h ../../include/openssl/kdf.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
pem_pkey.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h
pem_pkey.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
pem_pkey.o: ../../include/openssl/sha.h ../../include/openssl/sm2.h
pem_pkey.o: ../../include/openssl/sm3.h ../../include/openssl/stack.h
pem_pkey.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
pem_pkey.o: ../../include/openssl/x509_vfy.h ../asn1/asn1_locl.h ../cryptlib.h
pem_pkey.o: pem_pkey.c
@@ -191,14 +202,15 @@ pem_seal.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
pem_seal.o: ../../include/openssl/crypto.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/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/evp.h ../../include/openssl/kdf.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
pem_seal.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
pem_seal.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
pem_seal.o: ../../include/openssl/sha.h ../../include/openssl/sm2.h
pem_seal.o: ../../include/openssl/sm3.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
@@ -206,13 +218,14 @@ pem_sign.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
pem_sign.o: ../../include/openssl/crypto.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/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/evp.h ../../include/openssl/kdf.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
pem_sign.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
pem_sign.o: ../../include/openssl/sm2.h ../../include/openssl/sm3.h
pem_sign.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
pem_sign.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
pem_sign.o: ../cryptlib.h pem_sign.c
@@ -221,13 +234,14 @@ pem_x509.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
pem_x509.o: ../../include/openssl/crypto.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/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/evp.h ../../include/openssl/kdf.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/safestack.h
pem_x509.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
pem_x509.o: ../../include/openssl/sha.h ../../include/openssl/sm2.h
pem_x509.o: ../../include/openssl/sm3.h ../../include/openssl/stack.h
pem_x509.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
pem_x509.o: ../../include/openssl/x509_vfy.h ../cryptlib.h pem_x509.c
pem_xaux.o: ../../e_os.h ../../include/openssl/asn1.h
@@ -235,13 +249,14 @@ pem_xaux.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
pem_xaux.o: ../../include/openssl/crypto.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/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/evp.h ../../include/openssl/kdf.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/safestack.h
pem_xaux.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
pem_xaux.o: ../../include/openssl/sha.h ../../include/openssl/sm2.h
pem_xaux.o: ../../include/openssl/sm3.h ../../include/openssl/stack.h
pem_xaux.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
pem_xaux.o: ../../include/openssl/x509_vfy.h ../cryptlib.h pem_xaux.c
pvkfmt.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
@@ -250,12 +265,14 @@ pvkfmt.o: ../../include/openssl/crypto.h ../../include/openssl/dsa.h
pvkfmt.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
pvkfmt.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
pvkfmt.o: ../../include/openssl/err.h ../../include/openssl/evp.h
pvkfmt.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
pvkfmt.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
pvkfmt.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
pvkfmt.o: ../../include/openssl/pem.h ../../include/openssl/pem2.h
pvkfmt.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h
pvkfmt.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
pvkfmt.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
pvkfmt.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
pvkfmt.o: ../../include/openssl/x509_vfy.h ../cryptlib.h pvkfmt.c
pvkfmt.o: ../../include/openssl/kdf.h ../../include/openssl/lhash.h
pvkfmt.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
pvkfmt.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
pvkfmt.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pem.h
pvkfmt.o: ../../include/openssl/pem2.h ../../include/openssl/pkcs7.h
pvkfmt.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h
pvkfmt.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
pvkfmt.o: ../../include/openssl/sm2.h ../../include/openssl/sm3.h
pvkfmt.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
pvkfmt.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
pvkfmt.o: ../cryptlib.h pvkfmt.c

View File

@@ -1,270 +0,0 @@
/* crypto/pem/pem_sm2.c */
/* ====================================================================
* Copyright (c) 2016 The GmSSL 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 GmSSL Project.
* (http://gmssl.org/)"
*
* 4. The name "GmSSL Project" must not be used to endorse or promote
* products derived from this software without prior written
* permission. For written permission, please contact
* guanzhi1980@gmail.com.
*
* 5. Products derived from this software may not be called "GmSSL"
* nor may "GmSSL" appear in their names without prior written
* permission of the GmSSL Project.
*
* 6. Redistributions of any form whatsoever must retain the following
* acknowledgment:
* "This product includes software developed by the GmSSL Project
* (http://gmssl.org/)"
*
* THIS SOFTWARE IS PROVIDED BY THE GmSSL 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 GmSSL 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.
* ====================================================================
*
*/
/* 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.]
*/
/* ====================================================================
* 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>
#include "cryptlib.h"
#include <openssl/bio.h>
#include <openssl/evp.h>
#include <openssl/x509.h>
#include <openssl/pkcs7.h>
#include <openssl/pem.h>
#ifndef OPENSSL_NO_SM2
static EC_KEY *pkey_get_sm2key(EVP_PKEY *key, EC_KEY **eckey)
{
EC_KEY *dtmp;
if (!key)
return NULL;
dtmp = EVP_PKEY_get1_SM2(key);
EVP_PKEY_free(key);
if (!dtmp)
return NULL;
if (eckey) {
EC_KEY_free(*eckey);
*eckey = dtmp;
}
fprintf(stderr, "GMSSL %s %d\n", __FILE__, __LINE__);
return dtmp;
}
EC_KEY *PEM_read_bio_SM2PrivateKey(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_sm2key(pktmp, key); /* will free pktmp */
}
IMPLEMENT_PEM_rw_const(SM2PKParameters, EC_GROUP, PEM_STRING_SM2PARAMETERS,
ECPKParameters)
# ifdef OPENSSL_FIPS
int PEM_write_bio_SM2PrivateKey(BIO *bp, EC_KEY *x, const EVP_CIPHER *enc,
unsigned char *kstr, int klen,
pem_password_cb *cb, void *u)
{
if (FIPS_mode()) {
EVP_PKEY *k;
int ret;
k = EVP_PKEY_new();
if (!k)
return 0;
EVP_PKEY_set1_EC_KEY(k, x);
ret = PEM_write_bio_PrivateKey(bp, k, enc, kstr, klen, cb, u);
EVP_PKEY_free(k);
return ret;
} else
return PEM_ASN1_write_bio((i2d_of_void *)i2d_ECPrivateKey,
PEM_STRING_SM2PRIVATEKEY,
bp, x, enc, kstr, klen, cb, u);
}
# ifndef OPENSSL_NO_FP_API
int PEM_write_SM2PrivateKey(FILE *fp, EC_KEY *x, const EVP_CIPHER *enc,
unsigned char *kstr, int klen,
pem_password_cb *cb, void *u)
{
if (FIPS_mode()) {
EVP_PKEY *k;
int ret;
k = EVP_PKEY_new();
if (!k)
return 0;
EVP_PKEY_set1_EC_KEY(k, x);
ret = PEM_write_PrivateKey(fp, k, enc, kstr, klen, cb, u);
EVP_PKEY_free(k);
return ret;
} else
return PEM_ASN1_write((i2d_of_void *)i2d_ECPrivateKey,
PEM_STRING_SM2PRIVATEKEY,
fp, x, enc, kstr, klen, cb, u);
}
# endif
# else
IMPLEMENT_PEM_write_cb(SM2PrivateKey, EC_KEY, PEM_STRING_SM2PRIVATEKEY,
ECPrivateKey)
# endif
IMPLEMENT_PEM_rw(SM2_PUBKEY, EC_KEY, PEM_STRING_PUBLIC, EC_PUBKEY)
# ifndef OPENSSL_NO_FP_API
EC_KEY *PEM_read_SM2PrivateKey(FILE *fp, EC_KEY **eckey, pem_password_cb *cb,
void *u)
{
EVP_PKEY *pktmp;
pktmp = PEM_read_PrivateKey(fp, NULL, cb, u);
printf("GMSSL %s %d\n", __FILE__, __LINE__);
BIO *out = BIO_new_fp(stderr, BIO_NOCLOSE);
EVP_PKEY_print_public(out, pktmp, 0, NULL);
EVP_PKEY_print_private(out, pktmp, 0, NULL);
EVP_PKEY_print_params(out, pktmp, 0, NULL);
return pkey_get_sm2key(pktmp, eckey); /* will free pktmp */
}
# endif
#endif