summaryrefslogtreecommitdiff
path: root/Cryptlib/OpenSSL
diff options
context:
space:
mode:
Diffstat (limited to 'Cryptlib/OpenSSL')
-rw-r--r--Cryptlib/OpenSSL/Makefile867
-rw-r--r--Cryptlib/OpenSSL/crypto/asn1/asn_mime.c4
-rw-r--r--Cryptlib/OpenSSL/crypto/asn1/t_req.c5
-rw-r--r--Cryptlib/OpenSSL/crypto/bio/b_print.c76
-rw-r--r--Cryptlib/OpenSSL/crypto/bn/bn_lib.c3
-rw-r--r--Cryptlib/OpenSSL/crypto/conf/conf_lib.c3
-rw-r--r--Cryptlib/OpenSSL/crypto/cryptlib.c4
-rw-r--r--Cryptlib/OpenSSL/crypto/cryptlib.h2
-rw-r--r--Cryptlib/OpenSSL/crypto/err/err.c12
-rw-r--r--Cryptlib/OpenSSL/crypto/mem_dbg.c5
-rw-r--r--Cryptlib/OpenSSL/crypto/pkcs7/pk7_doit.c2
-rw-r--r--Cryptlib/OpenSSL/crypto/pkcs7/pk7_smime.c3
-rw-r--r--Cryptlib/OpenSSL/crypto/rsa/rsa_ameth.c2
-rw-r--r--Cryptlib/OpenSSL/crypto/x509/x509_trs.c8
-rw-r--r--Cryptlib/OpenSSL/crypto/x509/x509_vfy.c3
15 files changed, 523 insertions, 476 deletions
diff --git a/Cryptlib/OpenSSL/Makefile b/Cryptlib/OpenSSL/Makefile
index 9a7697cc..795f471d 100644
--- a/Cryptlib/OpenSSL/Makefile
+++ b/Cryptlib/OpenSSL/Makefile
@@ -1,440 +1,465 @@
+ifneq ($(CCACHE_DISABLE),)
+export CCACHE_DISABLE
+endif
+
+CRYPTDIR = $(TOPDIR)/Cryptlib
+OSSLDIR = $(TOPDIR)/Cryptlib/OpenSSL
+
+DEFINES = -DL_ENDIAN \
+ -D_CRT_SECURE_NO_DEPRECATE \
+ -D_CRT_NONSTDC_NO_DEPRECATE \
+ -DOPENSSL_SMALL_FOOTPRINT \
+ -DPEDANTIC
-EFI_INCLUDES = -I$(TOPDIR)/../Include \
- -I$(EFI_INCLUDE) -I$(EFI_INCLUDE)/$(ARCH) -I$(EFI_INCLUDE)/protocol \
- -I$(TOPDIR)/crypto/asn1 -I$(TOPDIR)/crypto/evp -I$(TOPDIR)/crypto/modes -I$(TOPDIR)/crypto/include
+INCLUDES = -I$(OSSLDIR) -I$(CRYPTDIR) -I$(OSSLDIR)/Include/ \
+ -I$(OSSLDIR)/crypto -I$(CRYPTDIR)/Include $(EFI_INCLUDES) \
+ -I$(OSSLDIR)/crypto/asn1 -I$(OSSLDIR)/crypto/evp \
+ -I$(OSSLDIR)/crypto/modes -I$(OSSLDIR)/crypto/include \
+ -isystem $(TOPDIR)/include/system \
+ -isystem $(shell $(CC) -print-file-name=include)
-CFLAGS = -ggdb $(OPTIMIZATIONS) -I$(TOPDIR) -I$(TOPDIR)/.. -I$(TOPDIR)/../Include/ -I$(TOPDIR)/crypto \
- -fno-stack-protector -fno-strict-aliasing -fpic -fshort-wchar -nostdinc \
- -ffreestanding -std=gnu89 -I$(shell $(CC) -print-file-name=include) \
- -Wall $(EFI_INCLUDES) -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DOPENSSL_SMALL_FOOTPRINT -DPEDANTIC
+FEATUREFLAGS += -nostdinc
+
+WARNFLAGS += -Wno-empty-body \
+ -Wno-implicit-fallthrough \
+ $(if $(findstring gcc,$(CC)),-Wno-old-style-declaration) \
+ $(if $(findstring gcc,$(CC)),-Wno-unused-but-set-variable) \
+ -Wno-unused-parameter
+
+CFLAGS = $(FEATUREFLAGS) \
+ $(OPTIMIZATIONS) \
+ $(WARNFLAGS) \
+ $(WERRFLAGS) \
+ $(INCLUDES) \
+ $(DEFINES)
CLANG_BUGS = $(if $(findstring gcc,$(CC)),-maccumulate-outgoing-args,)
ifeq ($(ARCH),x86_64)
- CFLAGS += -mno-mmx -mno-sse -mno-red-zone $(CLANG_BUGS) \
- -m64 -DEFI_FUNCTION_WRAPPER -DGNU_EFI_USE_MS_ABI \
- -UNO_BUILTIN_VA_FUNCS -DMDE_CPU_X64
+FEATUREFLAGS += -m64 -mno-mmx -mno-sse -mno-red-zone $(CLANG_BUGS)
+DEFINES += -DMDE_CPU_X64
endif
ifeq ($(ARCH),ia32)
- CFLAGS += -mno-mmx -mno-sse -mno-red-zone -nostdinc \
- $(CLANG_BUGS) -m32 -DMDE_CPU_IA32
+FEATUREFLAGS += -m32 -mno-mmx -mno-sse -mno-red-zone -nostdinc $(CLANG_BUGS)
+DEFINES += -DMDE_CPU_IA32
endif
ifeq ($(ARCH),aarch64)
- CFLAGS += -O2 -DMDE_CPU_AARCH64
+DEFINES += -DMDE_CPU_AARCH64
endif
ifeq ($(ARCH),arm)
- CFLAGS += -O2 -DMDE_CPU_ARM
+DEFINES += -DMDE_CPU_ARM
endif
+
LDFLAGS = -nostdlib -znocombreloc
TARGET = libopenssl.a
-OBJS = crypto/cryptlib.o \
- crypto/mem.o \
- crypto/mem_clr.o \
- crypto/mem_dbg.o \
- crypto/cversion.o \
- crypto/ex_data.o \
- crypto/cpt_err.o \
- crypto/ebcdic.o \
- crypto/uid.o \
- crypto/o_time.o \
- crypto/o_str.o \
- crypto/o_dir.o \
- crypto/o_fips.o \
- crypto/o_init.o \
- crypto/fips_ers.o \
- crypto/md5/md5_dgst.o \
- crypto/md5/md5_one.o \
- crypto/sha/sha_dgst.o \
- crypto/sha/sha1dgst.o \
- crypto/sha/sha_one.o \
- crypto/sha/sha1_one.o \
- crypto/sha/sha256.o \
- crypto/sha/sha512.o \
- crypto/hmac/hmac.o \
- crypto/hmac/hm_ameth.o \
- crypto/hmac/hm_pmeth.o \
- crypto/rc4/rc4_enc.o \
- crypto/rc4/rc4_skey.o \
- crypto/rc4/rc4_utl.o \
- crypto/aes/aes_misc.o \
- crypto/aes/aes_ecb.o \
- crypto/aes/aes_cfb.o \
- crypto/aes/aes_ofb.o \
- crypto/aes/aes_ctr.o \
- crypto/aes/aes_ige.o \
- crypto/aes/aes_wrap.o \
- crypto/aes/aes_core.o \
- crypto/aes/aes_cbc.o \
- crypto/modes/cbc128.o \
- crypto/modes/ctr128.o \
- crypto/modes/cts128.o \
- crypto/modes/cfb128.o \
- crypto/modes/ofb128.o \
- crypto/modes/gcm128.o \
- crypto/modes/ccm128.o \
- crypto/modes/xts128.o \
- crypto/modes/wrap128.o \
- crypto/bn/bn_add.o \
- crypto/bn/bn_div.o \
- crypto/bn/bn_exp.o \
- crypto/bn/bn_lib.o \
- crypto/bn/bn_ctx.o \
- crypto/bn/bn_mul.o \
- crypto/bn/bn_mod.o \
- crypto/bn/bn_print.o \
- crypto/bn/bn_rand.o \
- crypto/bn/bn_shift.o \
- crypto/bn/bn_word.o \
- crypto/bn/bn_blind.o \
- crypto/bn/bn_kron.o \
- crypto/bn/bn_sqrt.o \
- crypto/bn/bn_gcd.o \
- crypto/bn/bn_prime.o \
- crypto/bn/bn_err.o \
- crypto/bn/bn_sqr.o \
- crypto/bn/bn_asm.o \
- crypto/bn/bn_recp.o \
- crypto/bn/bn_mont.o \
- crypto/bn/bn_mpi.o \
- crypto/bn/bn_exp2.o \
- crypto/bn/bn_gf2m.o \
- crypto/bn/bn_nist.o \
- crypto/bn/bn_depr.o \
- crypto/bn/bn_x931p.o \
- crypto/bn/bn_const.o \
- crypto/rsa/rsa_eay.o \
- crypto/rsa/rsa_gen.o \
- crypto/rsa/rsa_lib.o \
- crypto/rsa/rsa_sign.o \
- crypto/rsa/rsa_saos.o \
- crypto/rsa/rsa_err.o \
- crypto/rsa/rsa_pk1.o \
- crypto/rsa/rsa_ssl.o \
- crypto/rsa/rsa_none.o \
- crypto/rsa/rsa_oaep.o \
- crypto/rsa/rsa_chk.o \
- crypto/rsa/rsa_null.o \
- crypto/rsa/rsa_pss.o \
- crypto/rsa/rsa_x931.o \
- crypto/rsa/rsa_asn1.o \
- crypto/rsa/rsa_depr.o \
- crypto/rsa/rsa_ameth.o \
- crypto/rsa/rsa_prn.o \
- crypto/rsa/rsa_pmeth.o \
- crypto/rsa/rsa_crpt.o \
- crypto/dso/dso_dl.o \
- crypto/dso/dso_dlfcn.o \
- crypto/dso/dso_err.o \
- crypto/dso/dso_lib.o \
- crypto/dso/dso_null.o \
- crypto/dso/dso_openssl.o \
- crypto/dso/dso_win32.o \
- crypto/dso/dso_vms.o \
- crypto/dso/dso_beos.o \
- crypto/dh/dh_asn1.o \
- crypto/dh/dh_gen.o \
- crypto/dh/dh_key.o \
- crypto/dh/dh_lib.o \
- crypto/dh/dh_check.o \
- crypto/dh/dh_err.o \
- crypto/dh/dh_depr.o \
- crypto/dh/dh_ameth.o \
- crypto/dh/dh_pmeth.o \
- crypto/dh/dh_prn.o \
- crypto/dh/dh_rfc5114.o \
- crypto/buffer/buffer.o \
- crypto/buffer/buf_str.o \
- crypto/buffer/buf_err.o \
- crypto/bio/bio_lib.o \
- crypto/bio/bio_cb.o \
- crypto/bio/bio_err.o \
- crypto/bio/bss_mem.o \
- crypto/bio/bss_null.o \
- crypto/bio/bss_fd.o \
- crypto/bio/bss_file.o \
- crypto/bio/bss_sock.o \
- crypto/bio/bss_conn.o \
- crypto/bio/bf_null.o \
- crypto/bio/bf_buff.o \
- crypto/bio/b_dump.o \
- crypto/bio/b_print.o \
- crypto/bio/b_sock.o \
- crypto/bio/bss_acpt.o \
- crypto/bio/bf_nbio.o \
- crypto/bio/bss_log.o \
- crypto/bio/bss_bio.o \
- crypto/bio/bss_dgram.o \
- crypto/stack/stack.o \
- crypto/lhash/lhash.o \
- crypto/lhash/lh_stats.o \
- crypto/rand/md_rand.o \
- crypto/rand/randfile.o \
- crypto/rand/rand_lib.o \
- crypto/rand/rand_err.o \
- crypto/rand/rand_unix.o \
- crypto/err/err.o \
- crypto/err/err_all.o \
- crypto/err/err_prn.o \
- crypto/objects/o_names.o \
- crypto/objects/obj_dat.o \
- crypto/objects/obj_lib.o \
- crypto/objects/obj_err.o \
- crypto/objects/obj_xref.o \
- crypto/evp/encode.o \
- crypto/evp/digest.o \
- crypto/evp/evp_enc.o \
- crypto/evp/evp_key.o \
- crypto/evp/evp_acnf.o \
- crypto/evp/evp_cnf.o \
- crypto/evp/e_des.o \
- crypto/evp/e_bf.o \
- crypto/evp/e_idea.o \
- crypto/evp/e_des3.o \
- crypto/evp/e_camellia.o \
- crypto/evp/e_rc4.o \
- crypto/evp/e_aes.o \
- crypto/evp/names.o \
- crypto/evp/e_seed.o \
- crypto/evp/e_xcbc_d.o \
- crypto/evp/e_rc2.o \
- crypto/evp/e_cast.o \
- crypto/evp/e_rc5.o \
- crypto/evp/m_null.o \
- crypto/evp/m_md2.o \
- crypto/evp/m_md4.o \
- crypto/evp/m_md5.o \
- crypto/evp/m_sha.o \
- crypto/evp/m_sha1.o \
- crypto/evp/m_wp.o \
- crypto/evp/m_dss.o \
- crypto/evp/m_dss1.o \
- crypto/evp/m_mdc2.o \
- crypto/evp/m_ripemd.o \
- crypto/evp/m_ecdsa.o \
- crypto/evp/p_open.o \
- crypto/evp/p_seal.o \
- crypto/evp/p_sign.o \
- crypto/evp/p_verify.o \
- crypto/evp/p_lib.o \
- crypto/evp/p_enc.o \
- crypto/evp/p_dec.o \
- crypto/evp/bio_md.o \
- crypto/evp/bio_b64.o \
- crypto/evp/bio_enc.o \
- crypto/evp/evp_err.o \
- crypto/evp/e_null.o \
- crypto/evp/c_all.o \
- crypto/evp/c_allc.o \
- crypto/evp/c_alld.o \
- crypto/evp/evp_lib.o \
- crypto/evp/bio_ok.o \
- crypto/evp/evp_pkey.o \
- crypto/evp/evp_pbe.o \
- crypto/evp/p5_crpt.o \
- crypto/evp/p5_crpt2.o \
- crypto/evp/e_old.o \
- crypto/evp/pmeth_lib.o \
- crypto/evp/pmeth_fn.o \
- crypto/evp/pmeth_gn.o \
- crypto/evp/m_sigver.o \
- crypto/evp/e_aes_cbc_hmac_sha1.o \
- crypto/evp/e_aes_cbc_hmac_sha256.o \
- crypto/evp/e_rc4_hmac_md5.o \
- crypto/asn1/a_object.o \
- crypto/asn1/a_bitstr.o \
- crypto/asn1/a_utctm.o \
- crypto/asn1/a_gentm.o \
- crypto/asn1/a_time.o \
- crypto/asn1/a_int.o \
- crypto/asn1/a_octet.o \
- crypto/asn1/a_print.o \
- crypto/asn1/a_type.o \
- crypto/asn1/a_set.o \
- crypto/asn1/a_dup.o \
- crypto/asn1/a_d2i_fp.o \
- crypto/asn1/a_i2d_fp.o \
- crypto/asn1/a_enum.o \
- crypto/asn1/a_utf8.o \
- crypto/asn1/a_sign.o \
- crypto/asn1/a_digest.o \
- crypto/asn1/a_verify.o \
- crypto/asn1/a_mbstr.o \
- crypto/asn1/a_strex.o \
- crypto/asn1/x_algor.o \
- crypto/asn1/x_val.o \
- crypto/asn1/x_pubkey.o \
- crypto/asn1/x_sig.o \
- crypto/asn1/x_req.o \
- crypto/asn1/x_attrib.o \
- crypto/asn1/x_bignum.o \
- crypto/asn1/x_long.o \
- crypto/asn1/x_name.o \
- crypto/asn1/x_x509.o \
- crypto/asn1/x_x509a.o \
- crypto/asn1/x_crl.o \
- crypto/asn1/x_info.o \
- crypto/asn1/x_spki.o \
- crypto/asn1/nsseq.o \
- crypto/asn1/x_nx509.o \
- crypto/asn1/d2i_pu.o \
- crypto/asn1/d2i_pr.o \
- crypto/asn1/i2d_pu.o \
- crypto/asn1/i2d_pr.o \
- crypto/asn1/t_req.o \
- crypto/asn1/t_x509.o \
- crypto/asn1/t_x509a.o \
- crypto/asn1/t_crl.o \
- crypto/asn1/t_pkey.o \
- crypto/asn1/t_spki.o \
- crypto/asn1/t_bitst.o \
- crypto/asn1/tasn_new.o \
- crypto/asn1/tasn_fre.o \
- crypto/asn1/tasn_enc.o \
- crypto/asn1/tasn_dec.o \
- crypto/asn1/tasn_utl.o \
- crypto/asn1/tasn_typ.o \
- crypto/asn1/tasn_prn.o \
- crypto/asn1/ameth_lib.o \
- crypto/asn1/f_int.o \
- crypto/asn1/f_string.o \
- crypto/asn1/n_pkey.o \
- crypto/asn1/f_enum.o \
- crypto/asn1/x_pkey.o \
- crypto/asn1/a_bool.o \
- crypto/asn1/x_exten.o \
- crypto/asn1/bio_asn1.o \
- crypto/asn1/bio_ndef.o \
- crypto/asn1/asn_mime.o \
- crypto/asn1/asn1_gen.o \
- crypto/asn1/asn1_par.o \
- crypto/asn1/asn1_lib.o \
- crypto/asn1/asn1_err.o \
- crypto/asn1/a_bytes.o \
- crypto/asn1/a_strnid.o \
- crypto/asn1/evp_asn1.o \
- crypto/asn1/asn_pack.o \
- crypto/asn1/p5_pbe.o \
- crypto/asn1/p5_pbev2.o \
- crypto/asn1/p8_pkey.o \
- crypto/asn1/asn_moid.o \
- crypto/pem/pem_sign.o \
- crypto/pem/pem_seal.o \
- crypto/pem/pem_info.o \
- crypto/pem/pem_lib.o \
- crypto/pem/pem_all.o \
- crypto/pem/pem_err.o \
- crypto/pem/pem_x509.o \
- crypto/pem/pem_xaux.o \
- crypto/pem/pem_oth.o \
- crypto/pem/pem_pk8.o \
- crypto/pem/pem_pkey.o \
- crypto/pem/pvkfmt.o \
- crypto/x509/x509_def.o \
- crypto/x509/x509_d2.o \
- crypto/x509/x509_r2x.o \
- crypto/x509/x509_cmp.o \
- crypto/x509/x509_obj.o \
- crypto/x509/x509_req.o \
- crypto/x509/x509spki.o \
- crypto/x509/x509_vfy.o \
- crypto/x509/x509_set.o \
- crypto/x509/x509cset.o \
- crypto/x509/x509rset.o \
- crypto/x509/x509_err.o \
- crypto/x509/x509name.o \
- crypto/x509/x509_v3.o \
- crypto/x509/x509_ext.o \
- crypto/x509/x509_att.o \
- crypto/x509/x509type.o \
- crypto/x509/x509_lu.o \
- crypto/x509/x_all.o \
- crypto/x509/x509_txt.o \
- crypto/x509/x509_trs.o \
- crypto/x509/x509_vpm.o \
- crypto/x509v3/v3_bcons.o \
- crypto/x509v3/v3_bitst.o \
- crypto/x509v3/v3_conf.o \
- crypto/x509v3/v3_extku.o \
- crypto/x509v3/v3_ia5.o \
- crypto/x509v3/v3_lib.o \
- crypto/x509v3/v3_prn.o \
- crypto/x509v3/v3_utl.o \
- crypto/x509v3/v3err.o \
- crypto/x509v3/v3_genn.o \
- crypto/x509v3/v3_alt.o \
- crypto/x509v3/v3_skey.o \
- crypto/x509v3/v3_akey.o \
- crypto/x509v3/v3_pku.o \
- crypto/x509v3/v3_int.o \
- crypto/x509v3/v3_enum.o \
- crypto/x509v3/v3_sxnet.o \
- crypto/x509v3/v3_cpols.o \
- crypto/x509v3/v3_crld.o \
- crypto/x509v3/v3_purp.o \
- crypto/x509v3/v3_info.o \
- crypto/x509v3/v3_ocsp.o \
- crypto/x509v3/v3_akeya.o \
- crypto/x509v3/v3_pmaps.o \
- crypto/x509v3/v3_pcons.o \
- crypto/x509v3/v3_ncons.o \
- crypto/x509v3/v3_pcia.o \
- crypto/x509v3/v3_pci.o \
- crypto/x509v3/pcy_cache.o \
- crypto/x509v3/pcy_node.o \
- crypto/x509v3/pcy_data.o \
- crypto/x509v3/pcy_map.o \
- crypto/x509v3/pcy_tree.o \
- crypto/x509v3/pcy_lib.o \
- crypto/x509v3/v3_asid.o \
- crypto/x509v3/v3_addr.o \
- crypto/conf/conf_err.o \
- crypto/conf/conf_lib.o \
- crypto/conf/conf_api.o \
- crypto/conf/conf_def.o \
- crypto/conf/conf_mod.o \
- crypto/conf/conf_mall.o \
- crypto/conf/conf_sap.o \
- crypto/txt_db/txt_db.o \
- crypto/pkcs7/pk7_asn1.o \
- crypto/pkcs7/pk7_lib.o \
- crypto/pkcs7/pkcs7err.o \
- crypto/pkcs7/pk7_doit.o \
- crypto/pkcs7/pk7_smime.o \
- crypto/pkcs7/pk7_attr.o \
- crypto/pkcs7/pk7_mime.o \
- crypto/pkcs7/bio_pk7.o \
- crypto/pkcs12/p12_add.o \
- crypto/pkcs12/p12_asn.o \
- crypto/pkcs12/p12_attr.o \
- crypto/pkcs12/p12_crpt.o \
- crypto/pkcs12/p12_crt.o \
- crypto/pkcs12/p12_decr.o \
- crypto/pkcs12/p12_init.o \
- crypto/pkcs12/p12_key.o \
- crypto/pkcs12/p12_kiss.o \
- crypto/pkcs12/p12_mutl.o \
- crypto/pkcs12/p12_utl.o \
- crypto/pkcs12/p12_npas.o \
- crypto/pkcs12/pk12err.o \
- crypto/pkcs12/p12_p8d.o \
- crypto/pkcs12/p12_p8e.o \
- crypto/comp/comp_lib.o \
- crypto/comp/comp_err.o \
- crypto/comp/c_rle.o \
- crypto/comp/c_zlib.o \
- crypto/ocsp/ocsp_asn.o \
- crypto/ocsp/ocsp_ext.o \
- crypto/ocsp/ocsp_ht.o \
- crypto/ocsp/ocsp_lib.o \
- crypto/ocsp/ocsp_cl.o \
- crypto/ocsp/ocsp_srv.o \
- crypto/ocsp/ocsp_prn.o \
- crypto/ocsp/ocsp_vfy.o \
- crypto/ocsp/ocsp_err.o \
- crypto/cmac/cmac.o \
- crypto/cmac/cm_ameth.o \
- crypto/cmac/cm_pmeth.o \
+OBJS = crypto/cryptlib.o \
+ crypto/mem.o \
+ crypto/mem_clr.o \
+ crypto/mem_dbg.o \
+ crypto/cversion.o \
+ crypto/ex_data.o \
+ crypto/cpt_err.o \
+ crypto/ebcdic.o \
+ crypto/uid.o \
+ crypto/o_time.o \
+ crypto/o_str.o \
+ crypto/o_dir.o \
+ crypto/o_fips.o \
+ crypto/o_init.o \
+ crypto/fips_ers.o \
+ crypto/md5/md5_dgst.o \
+ crypto/md5/md5_one.o \
+ crypto/sha/sha_dgst.o \
+ crypto/sha/sha1dgst.o \
+ crypto/sha/sha_one.o \
+ crypto/sha/sha1_one.o \
+ crypto/sha/sha256.o \
+ crypto/sha/sha512.o \
+ crypto/hmac/hmac.o \
+ crypto/hmac/hm_ameth.o \
+ crypto/hmac/hm_pmeth.o \
+ crypto/rc4/rc4_enc.o \
+ crypto/rc4/rc4_skey.o \
+ crypto/rc4/rc4_utl.o \
+ crypto/aes/aes_misc.o \
+ crypto/aes/aes_ecb.o \
+ crypto/aes/aes_cfb.o \
+ crypto/aes/aes_ofb.o \
+ crypto/aes/aes_ctr.o \
+ crypto/aes/aes_ige.o \
+ crypto/aes/aes_wrap.o \
+ crypto/aes/aes_core.o \
+ crypto/aes/aes_cbc.o \
+ crypto/modes/cbc128.o \
+ crypto/modes/ctr128.o \
+ crypto/modes/cts128.o \
+ crypto/modes/cfb128.o \
+ crypto/modes/ofb128.o \
+ crypto/modes/gcm128.o \
+ crypto/modes/ccm128.o \
+ crypto/modes/xts128.o \
+ crypto/modes/wrap128.o \
+ crypto/bn/bn_add.o \
+ crypto/bn/bn_div.o \
+ crypto/bn/bn_exp.o \
+ crypto/bn/bn_lib.o \
+ crypto/bn/bn_ctx.o \
+ crypto/bn/bn_mul.o \
+ crypto/bn/bn_mod.o \
+ crypto/bn/bn_print.o \
+ crypto/bn/bn_rand.o \
+ crypto/bn/bn_shift.o \
+ crypto/bn/bn_word.o \
+ crypto/bn/bn_blind.o \
+ crypto/bn/bn_kron.o \
+ crypto/bn/bn_sqrt.o \
+ crypto/bn/bn_gcd.o \
+ crypto/bn/bn_prime.o \
+ crypto/bn/bn_err.o \
+ crypto/bn/bn_sqr.o \
+ crypto/bn/bn_asm.o \
+ crypto/bn/bn_recp.o \
+ crypto/bn/bn_mont.o \
+ crypto/bn/bn_mpi.o \
+ crypto/bn/bn_exp2.o \
+ crypto/bn/bn_gf2m.o \
+ crypto/bn/bn_nist.o \
+ crypto/bn/bn_depr.o \
+ crypto/bn/bn_x931p.o \
+ crypto/bn/bn_const.o \
+ crypto/rsa/rsa_eay.o \
+ crypto/rsa/rsa_gen.o \
+ crypto/rsa/rsa_lib.o \
+ crypto/rsa/rsa_sign.o \
+ crypto/rsa/rsa_saos.o \
+ crypto/rsa/rsa_err.o \
+ crypto/rsa/rsa_pk1.o \
+ crypto/rsa/rsa_ssl.o \
+ crypto/rsa/rsa_none.o \
+ crypto/rsa/rsa_oaep.o \
+ crypto/rsa/rsa_chk.o \
+ crypto/rsa/rsa_null.o \
+ crypto/rsa/rsa_pss.o \
+ crypto/rsa/rsa_x931.o \
+ crypto/rsa/rsa_asn1.o \
+ crypto/rsa/rsa_depr.o \
+ crypto/rsa/rsa_ameth.o \
+ crypto/rsa/rsa_prn.o \
+ crypto/rsa/rsa_pmeth.o \
+ crypto/rsa/rsa_crpt.o \
+ crypto/dso/dso_dl.o \
+ crypto/dso/dso_dlfcn.o \
+ crypto/dso/dso_err.o \
+ crypto/dso/dso_lib.o \
+ crypto/dso/dso_null.o \
+ crypto/dso/dso_openssl.o \
+ crypto/dso/dso_win32.o \
+ crypto/dso/dso_vms.o \
+ crypto/dso/dso_beos.o \
+ crypto/dh/dh_asn1.o \
+ crypto/dh/dh_gen.o \
+ crypto/dh/dh_key.o \
+ crypto/dh/dh_lib.o \
+ crypto/dh/dh_check.o \
+ crypto/dh/dh_err.o \
+ crypto/dh/dh_depr.o \
+ crypto/dh/dh_ameth.o \
+ crypto/dh/dh_pmeth.o \
+ crypto/dh/dh_prn.o \
+ crypto/dh/dh_rfc5114.o \
+ crypto/buffer/buffer.o \
+ crypto/buffer/buf_str.o \
+ crypto/buffer/buf_err.o \
+ crypto/bio/bio_lib.o \
+ crypto/bio/bio_cb.o \
+ crypto/bio/bio_err.o \
+ crypto/bio/bss_mem.o \
+ crypto/bio/bss_null.o \
+ crypto/bio/bss_fd.o \
+ crypto/bio/bss_file.o \
+ crypto/bio/bss_sock.o \
+ crypto/bio/bss_conn.o \
+ crypto/bio/bf_null.o \
+ crypto/bio/bf_buff.o \
+ crypto/bio/b_dump.o \
+ crypto/bio/b_print.o \
+ crypto/bio/b_sock.o \
+ crypto/bio/bss_acpt.o \
+ crypto/bio/bf_nbio.o \
+ crypto/bio/bss_log.o \
+ crypto/bio/bss_bio.o \
+ crypto/bio/bss_dgram.o \
+ crypto/stack/stack.o \
+ crypto/lhash/lhash.o \
+ crypto/lhash/lh_stats.o \
+ crypto/rand/md_rand.o \
+ crypto/rand/randfile.o \
+ crypto/rand/rand_lib.o \
+ crypto/rand/rand_err.o \
+ crypto/rand/rand_unix.o \
+ crypto/err/err.o \
+ crypto/err/err_all.o \
+ crypto/err/err_prn.o \
+ crypto/objects/o_names.o \
+ crypto/objects/obj_dat.o \
+ crypto/objects/obj_lib.o \
+ crypto/objects/obj_err.o \
+ crypto/objects/obj_xref.o \
+ crypto/evp/encode.o \
+ crypto/evp/digest.o \
+ crypto/evp/evp_enc.o \
+ crypto/evp/evp_key.o \
+ crypto/evp/evp_acnf.o \
+ crypto/evp/evp_cnf.o \
+ crypto/evp/e_des.o \
+ crypto/evp/e_bf.o \
+ crypto/evp/e_idea.o \
+ crypto/evp/e_des3.o \
+ crypto/evp/e_camellia.o \
+ crypto/evp/e_rc4.o \
+ crypto/evp/e_aes.o \
+ crypto/evp/names.o \
+ crypto/evp/e_seed.o \
+ crypto/evp/e_xcbc_d.o \
+ crypto/evp/e_rc2.o \
+ crypto/evp/e_cast.o \
+ crypto/evp/e_rc5.o \
+ crypto/evp/m_null.o \
+ crypto/evp/m_md2.o \
+ crypto/evp/m_md4.o \
+ crypto/evp/m_md5.o \
+ crypto/evp/m_sha.o \
+ crypto/evp/m_sha1.o \
+ crypto/evp/m_wp.o \
+ crypto/evp/m_dss.o \
+ crypto/evp/m_dss1.o \
+ crypto/evp/m_mdc2.o \
+ crypto/evp/m_ripemd.o \
+ crypto/evp/m_ecdsa.o \
+ crypto/evp/p_open.o \
+ crypto/evp/p_seal.o \
+ crypto/evp/p_sign.o \
+ crypto/evp/p_verify.o \
+ crypto/evp/p_lib.o \
+ crypto/evp/p_enc.o \
+ crypto/evp/p_dec.o \
+ crypto/evp/bio_md.o \
+ crypto/evp/bio_b64.o \
+ crypto/evp/bio_enc.o \
+ crypto/evp/evp_err.o \
+ crypto/evp/e_null.o \
+ crypto/evp/c_all.o \
+ crypto/evp/c_allc.o \
+ crypto/evp/c_alld.o \
+ crypto/evp/evp_lib.o \
+ crypto/evp/bio_ok.o \
+ crypto/evp/evp_pkey.o \
+ crypto/evp/evp_pbe.o \
+ crypto/evp/p5_crpt.o \
+ crypto/evp/p5_crpt2.o \
+ crypto/evp/e_old.o \
+ crypto/evp/pmeth_lib.o \
+ crypto/evp/pmeth_fn.o \
+ crypto/evp/pmeth_gn.o \
+ crypto/evp/m_sigver.o \
+ crypto/evp/e_aes_cbc_hmac_sha1.o \
+ crypto/evp/e_aes_cbc_hmac_sha256.o \
+ crypto/evp/e_rc4_hmac_md5.o \
+ crypto/asn1/a_object.o \
+ crypto/asn1/a_bitstr.o \
+ crypto/asn1/a_utctm.o \
+ crypto/asn1/a_gentm.o \
+ crypto/asn1/a_time.o \
+ crypto/asn1/a_int.o \
+ crypto/asn1/a_octet.o \
+ crypto/asn1/a_print.o \
+ crypto/asn1/a_type.o \
+ crypto/asn1/a_set.o \
+ crypto/asn1/a_dup.o \
+ crypto/asn1/a_d2i_fp.o \
+ crypto/asn1/a_i2d_fp.o \
+ crypto/asn1/a_enum.o \
+ crypto/asn1/a_utf8.o \
+ crypto/asn1/a_sign.o \
+ crypto/asn1/a_digest.o \
+ crypto/asn1/a_verify.o \
+ crypto/asn1/a_mbstr.o \
+ crypto/asn1/a_strex.o \
+ crypto/asn1/x_algor.o \
+ crypto/asn1/x_val.o \
+ crypto/asn1/x_pubkey.o \
+ crypto/asn1/x_sig.o \
+ crypto/asn1/x_req.o \
+ crypto/asn1/x_attrib.o \
+ crypto/asn1/x_bignum.o \
+ crypto/asn1/x_long.o \
+ crypto/asn1/x_name.o \
+ crypto/asn1/x_x509.o \
+ crypto/asn1/x_x509a.o \
+ crypto/asn1/x_crl.o \
+ crypto/asn1/x_info.o \
+ crypto/asn1/x_spki.o \
+ crypto/asn1/nsseq.o \
+ crypto/asn1/x_nx509.o \
+ crypto/asn1/d2i_pu.o \
+ crypto/asn1/d2i_pr.o \
+ crypto/asn1/i2d_pu.o \
+ crypto/asn1/i2d_pr.o \
+ crypto/asn1/t_req.o \
+ crypto/asn1/t_x509.o \
+ crypto/asn1/t_x509a.o \
+ crypto/asn1/t_crl.o \
+ crypto/asn1/t_pkey.o \
+ crypto/asn1/t_spki.o \
+ crypto/asn1/t_bitst.o \
+ crypto/asn1/tasn_new.o \
+ crypto/asn1/tasn_fre.o \
+ crypto/asn1/tasn_enc.o \
+ crypto/asn1/tasn_dec.o \
+ crypto/asn1/tasn_utl.o \
+ crypto/asn1/tasn_typ.o \
+ crypto/asn1/tasn_prn.o \
+ crypto/asn1/ameth_lib.o \
+ crypto/asn1/f_int.o \
+ crypto/asn1/f_string.o \
+ crypto/asn1/n_pkey.o \
+ crypto/asn1/f_enum.o \
+ crypto/asn1/x_pkey.o \
+ crypto/asn1/a_bool.o \
+ crypto/asn1/x_exten.o \
+ crypto/asn1/bio_asn1.o \
+ crypto/asn1/bio_ndef.o \
+ crypto/asn1/asn_mime.o \
+ crypto/asn1/asn1_gen.o \
+ crypto/asn1/asn1_par.o \
+ crypto/asn1/asn1_lib.o \
+ crypto/asn1/asn1_err.o \
+ crypto/asn1/a_bytes.o \
+ crypto/asn1/a_strnid.o \
+ crypto/asn1/evp_asn1.o \
+ crypto/asn1/asn_pack.o \
+ crypto/asn1/p5_pbe.o \
+ crypto/asn1/p5_pbev2.o \
+ crypto/asn1/p8_pkey.o \
+ crypto/asn1/asn_moid.o \
+ crypto/pem/pem_sign.o \
+ crypto/pem/pem_seal.o \
+ crypto/pem/pem_info.o \
+ crypto/pem/pem_lib.o \
+ crypto/pem/pem_all.o \
+ crypto/pem/pem_err.o \
+ crypto/pem/pem_x509.o \
+ crypto/pem/pem_xaux.o \
+ crypto/pem/pem_oth.o \
+ crypto/pem/pem_pk8.o \
+ crypto/pem/pem_pkey.o \
+ crypto/pem/pvkfmt.o \
+ crypto/x509/x509_def.o \
+ crypto/x509/x509_d2.o \
+ crypto/x509/x509_r2x.o \
+ crypto/x509/x509_cmp.o \
+ crypto/x509/x509_obj.o \
+ crypto/x509/x509_req.o \
+ crypto/x509/x509spki.o \
+ crypto/x509/x509_vfy.o \
+ crypto/x509/x509_set.o \
+ crypto/x509/x509cset.o \
+ crypto/x509/x509rset.o \
+ crypto/x509/x509_err.o \
+ crypto/x509/x509name.o \
+ crypto/x509/x509_v3.o \
+ crypto/x509/x509_ext.o \
+ crypto/x509/x509_att.o \
+ crypto/x509/x509type.o \
+ crypto/x509/x509_lu.o \
+ crypto/x509/x_all.o \
+ crypto/x509/x509_txt.o \
+ crypto/x509/x509_trs.o \
+ crypto/x509/x509_vpm.o \
+ crypto/x509v3/v3_bcons.o \
+ crypto/x509v3/v3_bitst.o \
+ crypto/x509v3/v3_conf.o \
+ crypto/x509v3/v3_extku.o \
+ crypto/x509v3/v3_ia5.o \
+ crypto/x509v3/v3_lib.o \
+ crypto/x509v3/v3_prn.o \
+ crypto/x509v3/v3_utl.o \
+ crypto/x509v3/v3err.o \
+ crypto/x509v3/v3_genn.o \
+ crypto/x509v3/v3_alt.o \
+ crypto/x509v3/v3_skey.o \
+ crypto/x509v3/v3_akey.o \
+ crypto/x509v3/v3_pku.o \
+ crypto/x509v3/v3_int.o \
+ crypto/x509v3/v3_enum.o \
+ crypto/x509v3/v3_sxnet.o \
+ crypto/x509v3/v3_cpols.o \
+ crypto/x509v3/v3_crld.o \
+ crypto/x509v3/v3_purp.o \
+ crypto/x509v3/v3_info.o \
+ crypto/x509v3/v3_ocsp.o \
+ crypto/x509v3/v3_akeya.o \
+ crypto/x509v3/v3_pmaps.o \
+ crypto/x509v3/v3_pcons.o \
+ crypto/x509v3/v3_ncons.o \
+ crypto/x509v3/v3_pcia.o \
+ crypto/x509v3/v3_pci.o \
+ crypto/x509v3/pcy_cache.o \
+ crypto/x509v3/pcy_node.o \
+ crypto/x509v3/pcy_data.o \
+ crypto/x509v3/pcy_map.o \
+ crypto/x509v3/pcy_tree.o \
+ crypto/x509v3/pcy_lib.o \
+ crypto/x509v3/v3_asid.o \
+ crypto/x509v3/v3_addr.o \
+ crypto/conf/conf_err.o \
+ crypto/conf/conf_lib.o \
+ crypto/conf/conf_api.o \
+ crypto/conf/conf_def.o \
+ crypto/conf/conf_mod.o \
+ crypto/conf/conf_mall.o \
+ crypto/conf/conf_sap.o \
+ crypto/txt_db/txt_db.o \
+ crypto/pkcs7/pk7_asn1.o \
+ crypto/pkcs7/pk7_lib.o \
+ crypto/pkcs7/pkcs7err.o \
+ crypto/pkcs7/pk7_doit.o \
+ crypto/pkcs7/pk7_smime.o \
+ crypto/pkcs7/pk7_attr.o \
+ crypto/pkcs7/pk7_mime.o \
+ crypto/pkcs7/bio_pk7.o \
+ crypto/pkcs12/p12_add.o \
+ crypto/pkcs12/p12_asn.o \
+ crypto/pkcs12/p12_attr.o \
+ crypto/pkcs12/p12_crpt.o \
+ crypto/pkcs12/p12_crt.o \
+ crypto/pkcs12/p12_decr.o \
+ crypto/pkcs12/p12_init.o \
+ crypto/pkcs12/p12_key.o \
+ crypto/pkcs12/p12_kiss.o \
+ crypto/pkcs12/p12_mutl.o \
+ crypto/pkcs12/p12_utl.o \
+ crypto/pkcs12/p12_npas.o \
+ crypto/pkcs12/pk12err.o \
+ crypto/pkcs12/p12_p8d.o \
+ crypto/pkcs12/p12_p8e.o \
+ crypto/comp/comp_lib.o \
+ crypto/comp/comp_err.o \
+ crypto/comp/c_rle.o \
+ crypto/comp/c_zlib.o \
+ crypto/ocsp/ocsp_asn.o \
+ crypto/ocsp/ocsp_ext.o \
+ crypto/ocsp/ocsp_ht.o \
+ crypto/ocsp/ocsp_lib.o \
+ crypto/ocsp/ocsp_cl.o \
+ crypto/ocsp/ocsp_srv.o \
+ crypto/ocsp/ocsp_prn.o \
+ crypto/ocsp/ocsp_vfy.o \
+ crypto/ocsp/ocsp_err.o \
+ crypto/cmac/cmac.o \
+ crypto/cmac/cm_ameth.o \
+ crypto/cmac/cm_pmeth.o \
all: $(TARGET)
diff --git a/Cryptlib/OpenSSL/crypto/asn1/asn_mime.c b/Cryptlib/OpenSSL/crypto/asn1/asn_mime.c
index 5170906c..017be9d9 100644
--- a/Cryptlib/OpenSSL/crypto/asn1/asn_mime.c
+++ b/Cryptlib/OpenSSL/crypto/asn1/asn_mime.c
@@ -843,6 +843,10 @@ static int mime_hdr_addparam(MIME_HEADER *mhdr, char *name, char *value)
char *tmpname, *tmpval, *p;
int c;
MIME_PARAM *mparam;
+
+ if (!mhdr)
+ return 0;
+
if (name) {
tmpname = BUF_strdup(name);
if (!tmpname)
diff --git a/Cryptlib/OpenSSL/crypto/asn1/t_req.c b/Cryptlib/OpenSSL/crypto/asn1/t_req.c
index 70aba4cc..c32241c2 100644
--- a/Cryptlib/OpenSSL/crypto/asn1/t_req.c
+++ b/Cryptlib/OpenSSL/crypto/asn1/t_req.c
@@ -195,10 +195,11 @@ int X509_REQ_print_ex(BIO *bp, X509_REQ *x, unsigned long nmflags,
goto err;
if (BIO_puts(bp, ":") <= 0)
goto err;
- if ((type == V_ASN1_PRINTABLESTRING) ||
+ if (bs != NULL && (
+ (type == V_ASN1_PRINTABLESTRING) ||
(type == V_ASN1_UTF8STRING) ||
(type == V_ASN1_T61STRING) ||
- (type == V_ASN1_IA5STRING)) {
+ (type == V_ASN1_IA5STRING))) {
if (BIO_write(bp, (char *)bs->data, bs->length)
!= bs->length)
goto err;
diff --git a/Cryptlib/OpenSSL/crypto/bio/b_print.c b/Cryptlib/OpenSSL/crypto/bio/b_print.c
index fea73864..29da9036 100644
--- a/Cryptlib/OpenSSL/crypto/bio/b_print.c
+++ b/Cryptlib/OpenSSL/crypto/bio/b_print.c
@@ -134,9 +134,9 @@ static int fmtfp(char **, char **, size_t *, size_t *,
LDOUBLE, int, int, int);
#endif
static int doapr_outch(char **, char **, size_t *, size_t *, int);
-static int _dopr(char **sbuffer, char **buffer,
- size_t *maxlen, size_t *retlen, int *truncated,
- const char *format, va_list args);
+static int EFIAPI _dopr(char **sbuffer, char **buffer,
+ size_t *maxlen, size_t *retlen, int *truncated,
+ const char *format, ms_va_list args);
/* format read states */
#define DP_S_DEFAULT 0
@@ -167,11 +167,11 @@ static int _dopr(char **sbuffer, char **buffer,
#define char_to_int(p) (p - '0')
#define OSSL_MAX(p,q) ((p >= q) ? p : q)
-static int
+static int EFIAPI
_dopr(char **sbuffer,
char **buffer,
size_t *maxlen,
- size_t *retlen, int *truncated, const char *format, va_list args)
+ size_t *retlen, int *truncated, const char *format, ms_va_list args)
{
char ch;
LLONG value;
@@ -236,7 +236,7 @@ _dopr(char **sbuffer,
min = 10 * min + char_to_int(ch);
ch = *format++;
} else if (ch == '*') {
- min = va_arg(args, int);
+ min = ms_va_arg(args, int);
ch = *format++;
state = DP_S_DOT;
} else
@@ -256,7 +256,7 @@ _dopr(char **sbuffer,
max = 10 * max + char_to_int(ch);
ch = *format++;
} else if (ch == '*') {
- max = va_arg(args, int);
+ max = ms_va_arg(args, int);
ch = *format++;
state = DP_S_MOD;
} else
@@ -297,16 +297,16 @@ _dopr(char **sbuffer,
case 'i':
switch (cflags) {
case DP_C_SHORT:
- value = (short int)va_arg(args, int);
+ value = (short int)ms_va_arg(args, int);
break;
case DP_C_LONG:
- value = va_arg(args, long int);
+ value = ms_va_arg(args, long int);
break;
case DP_C_LLONG:
- value = va_arg(args, LLONG);
+ value = ms_va_arg(args, LLONG);
break;
default:
- value = va_arg(args, int);
+ value = ms_va_arg(args, int);
break;
}
if (!fmtint(sbuffer, buffer, &currlen, maxlen, value, 10, min,
@@ -322,16 +322,16 @@ _dopr(char **sbuffer,
flags |= DP_F_UNSIGNED;
switch (cflags) {
case DP_C_SHORT:
- value = (unsigned short int)va_arg(args, unsigned int);
+ value = (unsigned short int)ms_va_arg(args, unsigned int);
break;
case DP_C_LONG:
- value = (LLONG) va_arg(args, unsigned long int);
+ value = (LLONG) ms_va_arg(args, unsigned long int);
break;
case DP_C_LLONG:
- value = va_arg(args, unsigned LLONG);
+ value = ms_va_arg(args, unsigned LLONG);
break;
default:
- value = (LLONG) va_arg(args, unsigned int);
+ value = (LLONG) ms_va_arg(args, unsigned int);
break;
}
if (!fmtint(sbuffer, buffer, &currlen, maxlen, value,
@@ -342,9 +342,9 @@ _dopr(char **sbuffer,
#ifndef OPENSSL_SYS_UEFI
case 'f':
if (cflags == DP_C_LDOUBLE)
- fvalue = va_arg(args, LDOUBLE);
+ fvalue = ms_va_arg(args, LDOUBLE);
else
- fvalue = va_arg(args, double);
+ fvalue = ms_va_arg(args, double);
if (!fmtfp(sbuffer, buffer, &currlen, maxlen, fvalue, min, max,
flags))
return 0;
@@ -353,26 +353,26 @@ _dopr(char **sbuffer,
flags |= DP_F_UP;
case 'e':
if (cflags == DP_C_LDOUBLE)
- fvalue = va_arg(args, LDOUBLE);
+ fvalue = ms_va_arg(args, LDOUBLE);
else
- fvalue = va_arg(args, double);
+ fvalue = ms_va_arg(args, double);
break;
case 'G':
flags |= DP_F_UP;
case 'g':
if (cflags == DP_C_LDOUBLE)
- fvalue = va_arg(args, LDOUBLE);
+ fvalue = ms_va_arg(args, LDOUBLE);
else
- fvalue = va_arg(args, double);
+ fvalue = ms_va_arg(args, double);
break;
#endif
case 'c':
if(!doapr_outch(sbuffer, buffer, &currlen, maxlen,
- va_arg(args, int)))
+ ms_va_arg(args, int)))
return 0;
break;
case 's':
- strvalue = va_arg(args, char *);
+ strvalue = ms_va_arg(args, char *);
if (max < 0) {
if (buffer)
max = INT_MAX;
@@ -384,7 +384,7 @@ _dopr(char **sbuffer,
return 0;
break;
case 'p':
- value = (long)va_arg(args, void *);
+ value = (long)ms_va_arg(args, void *);
if (!fmtint(sbuffer, buffer, &currlen, maxlen,
value, 16, min, max, flags | DP_F_NUM))
return 0;
@@ -392,19 +392,19 @@ _dopr(char **sbuffer,
case 'n': /* XXX */
if (cflags == DP_C_SHORT) {
short int *num;
- num = va_arg(args, short int *);
+ num = ms_va_arg(args, short int *);
*num = currlen;
} else if (cflags == DP_C_LONG) { /* XXX */
long int *num;
- num = va_arg(args, long int *);
+ num = ms_va_arg(args, long int *);
*num = (long int)currlen;
} else if (cflags == DP_C_LLONG) { /* XXX */
LLONG *num;
- num = va_arg(args, LLONG *);
+ num = ms_va_arg(args, LLONG *);
*num = (LLONG) currlen;
} else {
int *num;
- num = va_arg(args, int *);
+ num = ms_va_arg(args, int *);
*num = currlen;
}
break;
@@ -797,20 +797,20 @@ doapr_outch(char **sbuffer,
/***************************************************************************/
-int BIO_printf(BIO *bio, const char *format, ...)
+int EFIAPI BIO_printf(BIO *bio, const char *format, ...)
{
- va_list args;
+ ms_va_list args;
int ret;
- va_start(args, format);
+ ms_va_start(args, format);
ret = BIO_vprintf(bio, format, args);
- va_end(args);
+ ms_va_end(args);
return (ret);
}
-int BIO_vprintf(BIO *bio, const char *format, va_list args)
+int EFIAPI BIO_vprintf(BIO *bio, const char *format, ms_va_list args)
{
int ret;
size_t retlen;
@@ -845,20 +845,20 @@ int BIO_vprintf(BIO *bio, const char *format, va_list args)
* closely related to BIO_printf, and we need *some* name prefix ... (XXX the
* function should be renamed, but to what?)
*/
-int BIO_snprintf(char *buf, size_t n, const char *format, ...)
+int EFIAPI BIO_snprintf(char *buf, size_t n, const char *format, ...)
{
- va_list args;
+ ms_va_list args;
int ret;
- va_start(args, format);
+ ms_va_start(args, format);
ret = BIO_vsnprintf(buf, n, format, args);
- va_end(args);
+ ms_va_end(args);
return (ret);
}
-int BIO_vsnprintf(char *buf, size_t n, const char *format, va_list args)
+int EFIAPI BIO_vsnprintf(char *buf, size_t n, const char *format, ms_va_list args)
{
size_t retlen;
int truncated;
diff --git a/Cryptlib/OpenSSL/crypto/bn/bn_lib.c b/Cryptlib/OpenSSL/crypto/bn/bn_lib.c
index 10b78f51..2671f35c 100644
--- a/Cryptlib/OpenSSL/crypto/bn/bn_lib.c
+++ b/Cryptlib/OpenSSL/crypto/bn/bn_lib.c
@@ -496,6 +496,9 @@ BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)
if (bn_wexpand(a, b->top) == NULL)
return (NULL);
+ if (!a || !b || !a->d || !b->d)
+ return (NULL);
+
#if 1
A = a->d;
B = b->d;
diff --git a/Cryptlib/OpenSSL/crypto/conf/conf_lib.c b/Cryptlib/OpenSSL/crypto/conf/conf_lib.c
index 952b5452..b3b29adb 100644
--- a/Cryptlib/OpenSSL/crypto/conf/conf_lib.c
+++ b/Cryptlib/OpenSSL/crypto/conf/conf_lib.c
@@ -340,6 +340,9 @@ int NCONF_get_number_e(const CONF *conf, const char *group, const char *name,
return 0;
}
+ if (conf == NULL)
+ return 0;
+
str = NCONF_get_string(conf, group, name);
if (str == NULL)
diff --git a/Cryptlib/OpenSSL/crypto/cryptlib.c b/Cryptlib/OpenSSL/crypto/cryptlib.c
index da4b34dc..23f58fa9 100644
--- a/Cryptlib/OpenSSL/crypto/cryptlib.c
+++ b/Cryptlib/OpenSSL/crypto/cryptlib.c
@@ -866,7 +866,7 @@ int OPENSSL_isservice(void)
}
# endif
-void OPENSSL_showfatal(const char *fmta, ...)
+void EFIAPI OPENSSL_showfatal(const char *fmta, ...)
{
va_list ap;
TCHAR buf[256];
@@ -979,7 +979,7 @@ void OPENSSL_showfatal(const char *fmta, ...)
MessageBox(NULL, buf, _T("OpenSSL: FATAL"), MB_OK | MB_ICONERROR);
}
#else
-void OPENSSL_showfatal(const char *fmta, ...)
+void EFIAPI OPENSSL_showfatal(const char *fmta, ...)
{
#ifndef OPENSSL_NO_STDIO
va_list ap;
diff --git a/Cryptlib/OpenSSL/crypto/cryptlib.h b/Cryptlib/OpenSSL/crypto/cryptlib.h
index 3e3ea5e3..2bce19ff 100644
--- a/Cryptlib/OpenSSL/crypto/cryptlib.h
+++ b/Cryptlib/OpenSSL/crypto/cryptlib.h
@@ -100,7 +100,7 @@ extern "C" {
void OPENSSL_cpuid_setup(void);
extern unsigned int OPENSSL_ia32cap_P[];
-void OPENSSL_showfatal(const char *fmta, ...);
+void EFIAPI OPENSSL_showfatal(const char *fmta, ...);
#ifndef OPENSSL_NO_STDIO
void *OPENSSL_stderr(void);
#endif
diff --git a/Cryptlib/OpenSSL/crypto/err/err.c b/Cryptlib/OpenSSL/crypto/err/err.c
index 52dc9a5d..e2251454 100644
--- a/Cryptlib/OpenSSL/crypto/err/err.c
+++ b/Cryptlib/OpenSSL/crypto/err/err.c
@@ -1075,15 +1075,15 @@ void ERR_set_error_data(char *data, int flags)
es->err_data_flags[i] = flags;
}
-void ERR_add_error_data(int num, ...)
+void EFIAPI ERR_add_error_data(int num, ...)
{
- va_list args;
- va_start(args, num);
+ ms_va_list args;
+ ms_va_start(args, num);
ERR_add_error_vdata(num, args);
- va_end(args);
+ ms_va_end(args);
}
-void ERR_add_error_vdata(int num, va_list args)
+void EFIAPI ERR_add_error_vdata(int num, ms_va_list args)
{
int i, n, s;
char *str, *p, *a;
@@ -1096,7 +1096,7 @@ void ERR_add_error_vdata(int num, va_list args)
n = 0;
for (i = 0; i < num; i++) {
- a = va_arg(args, char *);
+ a = ms_va_arg(args, char *);
/* ignore NULLs, thanks to Bob Beck <beck@obtuse.com> */
if (a != NULL) {
n += strlen(a);
diff --git a/Cryptlib/OpenSSL/crypto/mem_dbg.c b/Cryptlib/OpenSSL/crypto/mem_dbg.c
index 8525ded7..c98c1b88 100644
--- a/Cryptlib/OpenSSL/crypto/mem_dbg.c
+++ b/Cryptlib/OpenSSL/crypto/mem_dbg.c
@@ -640,8 +640,13 @@ static void print_leak_doall_arg(const MEM *m, MEM_LEAK *l)
if (m->addr == (char *)l->bio)
return;
+ if (!bufp)
+ return;
+
if (options & V_CRYPTO_MDEBUG_TIME) {
lcl = localtime(&m->time);
+ if (!lcl)
+ return;
BIO_snprintf(bufp, BUF_REMAIN, "[%02d:%02d:%02d] ",
lcl->tm_hour, lcl->tm_min, lcl->tm_sec);
diff --git a/Cryptlib/OpenSSL/crypto/pkcs7/pk7_doit.c b/Cryptlib/OpenSSL/crypto/pkcs7/pk7_doit.c
index 6cf8253b..e6a44f40 100644
--- a/Cryptlib/OpenSSL/crypto/pkcs7/pk7_doit.c
+++ b/Cryptlib/OpenSSL/crypto/pkcs7/pk7_doit.c
@@ -654,7 +654,7 @@ BIO *PKCS7_dataDecode(PKCS7 *p7, EVP_PKEY *pkey, BIO *in_bio, X509 *pcert)
if (data_body->length > 0)
BIO_write(bio, (char *)data_body->data, data_body->length);
# else
- if (data_body->length > 0)
+ if (data_body != NULL && data_body->length > 0)
bio = BIO_new_mem_buf(data_body->data, data_body->length);
else {
bio = BIO_new(BIO_s_mem());
diff --git a/Cryptlib/OpenSSL/crypto/pkcs7/pk7_smime.c b/Cryptlib/OpenSSL/crypto/pkcs7/pk7_smime.c
index 1269a146..b27b0f68 100644
--- a/Cryptlib/OpenSSL/crypto/pkcs7/pk7_smime.c
+++ b/Cryptlib/OpenSSL/crypto/pkcs7/pk7_smime.c
@@ -530,7 +530,8 @@ PKCS7 *PKCS7_encrypt(STACK_OF(X509) *certs, BIO *in, const EVP_CIPHER *cipher,
int PKCS7_decrypt(PKCS7 *p7, EVP_PKEY *pkey, X509 *cert, BIO *data, int flags)
{
BIO *tmpmem;
- int ret, i;
+ int ret = 0; /* current openssl sets 'ret' to zero here */
+ int i;
char *buf = NULL;
if (!p7) {
diff --git a/Cryptlib/OpenSSL/crypto/rsa/rsa_ameth.c b/Cryptlib/OpenSSL/crypto/rsa/rsa_ameth.c
index 951e1d5c..ddead3d7 100644
--- a/Cryptlib/OpenSSL/crypto/rsa/rsa_ameth.c
+++ b/Cryptlib/OpenSSL/crypto/rsa/rsa_ameth.c
@@ -768,6 +768,7 @@ static int rsa_item_sign(EVP_MD_CTX *ctx, const ASN1_ITEM *it, void *asn,
return 2;
}
+#ifndef OPENSSL_NO_CMS
static RSA_OAEP_PARAMS *rsa_oaep_decode(const X509_ALGOR *alg,
X509_ALGOR **pmaskHash)
{
@@ -791,7 +792,6 @@ static RSA_OAEP_PARAMS *rsa_oaep_decode(const X509_ALGOR *alg,
return pss;
}
-#ifndef OPENSSL_NO_CMS
static int rsa_cms_decrypt(CMS_RecipientInfo *ri)
{
EVP_PKEY_CTX *pkctx;
diff --git a/Cryptlib/OpenSSL/crypto/x509/x509_trs.c b/Cryptlib/OpenSSL/crypto/x509/x509_trs.c
index 11e07634..2fa33823 100644
--- a/Cryptlib/OpenSSL/crypto/x509/x509_trs.c
+++ b/Cryptlib/OpenSSL/crypto/x509/x509_trs.c
@@ -131,6 +131,8 @@ int X509_check_trust(X509 *x, int id, int flags)
if (idx == -1)
return default_trust(id, x, flags);
pt = X509_TRUST_get0(idx);
+ if (!pt)
+ return default_trust(id, x, flags);
return pt->check_trust(pt, x, flags);
}
@@ -195,8 +197,10 @@ int X509_TRUST_add(int id, int flags, int (*ck) (X509_TRUST *, X509 *, int),
return 0;
}
trtmp->flags = X509_TRUST_DYNAMIC;
- } else
- trtmp = X509_TRUST_get0(idx);
+ } else if (!(trtmp = X509_TRUST_get0(idx))) {
+ X509err(X509_F_X509_TRUST_ADD, ERR_R_MALLOC_FAILURE);
+ return 0;
+ }
/* OPENSSL_free existing name if dynamic */
if (trtmp->flags & X509_TRUST_DYNAMIC_NAME)
diff --git a/Cryptlib/OpenSSL/crypto/x509/x509_vfy.c b/Cryptlib/OpenSSL/crypto/x509/x509_vfy.c
index 5bf3f07a..96f306b2 100644
--- a/Cryptlib/OpenSSL/crypto/x509/x509_vfy.c
+++ b/Cryptlib/OpenSSL/crypto/x509/x509_vfy.c
@@ -984,7 +984,8 @@ static int check_cert(X509_STORE_CTX *ctx)
{
X509_CRL *crl = NULL, *dcrl = NULL;
X509 *x;
- int ok, cnum;
+ int ok = 0; /* current openssl sets 'ok' to zero here */
+ int cnum;
unsigned int last_reasons;
cnum = ctx->error_depth;
x = sk_X509_value(ctx->chain, cnum);