summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto')
-rw-r--r--src/lib/libcrypto/Attic/Makefile34
-rw-r--r--src/lib/libcrypto/aes/Makefile29
-rw-r--r--src/lib/libcrypto/asn1/Makefile2
-rw-r--r--src/lib/libcrypto/bf/Makefile7
-rw-r--r--src/lib/libcrypto/bn/Makefile34
-rw-r--r--src/lib/libcrypto/bn/bntest.c8
-rw-r--r--src/lib/libcrypto/buffer/Makefile11
-rw-r--r--src/lib/libcrypto/cast/Makefile5
-rw-r--r--src/lib/libcrypto/crypto-lib.com37
-rw-r--r--src/lib/libcrypto/des/Makefile5
-rw-r--r--src/lib/libcrypto/dsa/Makefile7
-rw-r--r--src/lib/libcrypto/ec/Makefile36
-rw-r--r--src/lib/libcrypto/ec/ectest.c341
-rw-r--r--src/lib/libcrypto/engine/Makefile34
-rw-r--r--src/lib/libcrypto/engine/eng_cryptodev.c71
-rw-r--r--src/lib/libcrypto/evp/Makefile70
-rw-r--r--src/lib/libcrypto/evp/bio_ok.c103
-rw-r--r--src/lib/libcrypto/evp/c_allc.c18
-rw-r--r--src/lib/libcrypto/evp/evptests.txt13
-rw-r--r--src/lib/libcrypto/evp/m_mdc2.c2
-rw-r--r--src/lib/libcrypto/evp/m_sha.c1
-rw-r--r--src/lib/libcrypto/idea/Makefile5
-rw-r--r--src/lib/libcrypto/md2/md2.h3
-rw-r--r--src/lib/libcrypto/md2/md2_dgst.c2
-rw-r--r--src/lib/libcrypto/md4/Makefile8
-rw-r--r--src/lib/libcrypto/md5/Makefile8
-rw-r--r--src/lib/libcrypto/mdc2/Makefile14
-rw-r--r--src/lib/libcrypto/mdc2/mdc2.h3
-rw-r--r--src/lib/libcrypto/mem.c6
-rw-r--r--src/lib/libcrypto/objects/obj_dat.h136
-rw-r--r--src/lib/libcrypto/objects/obj_mac.h142
-rw-r--r--src/lib/libcrypto/opensslconf.h12
-rw-r--r--src/lib/libcrypto/perlasm/x86nasm.pl15
-rw-r--r--src/lib/libcrypto/rand/md_rand.c31
-rw-r--r--src/lib/libcrypto/rc2/Makefile6
-rw-r--r--src/lib/libcrypto/rc4/Makefile18
-rw-r--r--src/lib/libcrypto/rc4/rc4test.c6
-rw-r--r--src/lib/libcrypto/ripemd/Makefile7
-rw-r--r--src/lib/libcrypto/rsa/Makefile39
-rw-r--r--src/lib/libcrypto/sha/Makefile39
-rw-r--r--src/lib/libcrypto/sha/sha_dgst.c1
-rw-r--r--src/lib/libcrypto/symhacks.h30
-rw-r--r--src/lib/libcrypto/util/cygwin.sh12
-rw-r--r--src/lib/libcrypto/util/libeay.num216
-rw-r--r--src/lib/libcrypto/util/mk1mf.pl85
-rw-r--r--src/lib/libcrypto/util/mkdef.pl40
-rw-r--r--src/lib/libcrypto/util/mkfiles.pl2
-rw-r--r--src/lib/libcrypto/util/pl/VC-32.pl79
-rw-r--r--src/lib/libcrypto/util/ssleay.num61
49 files changed, 1531 insertions, 363 deletions
diff --git a/src/lib/libcrypto/Attic/Makefile b/src/lib/libcrypto/Attic/Makefile
index 85d9f249c5..947dd5d44e 100644
--- a/src/lib/libcrypto/Attic/Makefile
+++ b/src/lib/libcrypto/Attic/Makefile
@@ -7,7 +7,7 @@ TOP= ..
7CC= cc 7CC= cc
8INCLUDE= -I. -I$(TOP) -I../include $(ZLIB_INCLUDE) 8INCLUDE= -I. -I$(TOP) -I../include $(ZLIB_INCLUDE)
9# INCLUDES targets sudbirs! 9# INCLUDES targets sudbirs!
10INCLUDES= -I.. -I../.. -I../asn1 -I../evp -I../../include $(ZLIB_INCLUDE) 10INCLUDES= -I.. -I../.. -I../modes -I../asn1 -I../evp -I../../include $(ZLIB_INCLUDE)
11CFLAG= -g 11CFLAG= -g
12MAKEDEPPROG= makedepend 12MAKEDEPPROG= makedepend
13MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) 13MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
@@ -34,8 +34,10 @@ GENERAL=Makefile README crypto-lib.com install.com
34 34
35LIB= $(TOP)/libcrypto.a 35LIB= $(TOP)/libcrypto.a
36SHARED_LIB= libcrypto$(SHLIB_EXT) 36SHARED_LIB= libcrypto$(SHLIB_EXT)
37LIBSRC= cryptlib.c mem.c mem_clr.c mem_dbg.c cversion.c ex_data.c cpt_err.c ebcdic.c uid.c o_time.c o_str.c o_dir.c 37LIBSRC= cryptlib.c mem.c mem_clr.c mem_dbg.c cversion.c ex_data.c cpt_err.c \
38LIBOBJ= cryptlib.o mem.o mem_dbg.o cversion.o ex_data.o cpt_err.o ebcdic.o uid.o o_time.o o_str.o o_dir.o $(CPUID_OBJ) 38 ebcdic.c uid.c o_time.c o_str.c o_dir.c o_fips.c o_init.c fips_ers.c
39LIBOBJ= cryptlib.o mem.o mem_dbg.o cversion.o ex_data.o cpt_err.o ebcdic.o \
40 uid.o o_time.o o_str.o o_dir.o o_fips.o o_init.o fips_ers.o $(CPUID_OBJ)
39 41
40SRC= $(LIBSRC) 42SRC= $(LIBSRC)
41 43
@@ -67,14 +69,13 @@ applink.o: $(TOP)/ms/applink.c
67uplink.o: $(TOP)/ms/uplink.c applink.o 69uplink.o: $(TOP)/ms/uplink.c applink.o
68 $(CC) $(CFLAGS) -c -o $@ $(TOP)/ms/uplink.c 70 $(CC) $(CFLAGS) -c -o $@ $(TOP)/ms/uplink.c
69 71
70uplink-cof.s: $(TOP)/ms/uplink.pl 72uplink-x86.s: $(TOP)/ms/uplink-x86.pl
71 $(PERL) $(TOP)/ms/uplink.pl coff > $@ 73 $(PERL) $(TOP)/ms/uplink-x86.pl $(PERLASM_SCHEME) > $@
72 74
73x86_64cpuid.s: x86_64cpuid.pl 75x86_64cpuid.s: x86_64cpuid.pl; $(PERL) x86_64cpuid.pl $(PERLASM_SCHEME) > $@
74 $(PERL) x86_64cpuid.pl $(PERLASM_SCHEME) > $@ 76ia64cpuid.s: ia64cpuid.S; $(CC) $(CFLAGS) -E ia64cpuid.S > $@
75ia64cpuid.s: ia64cpuid.S
76 $(CC) $(CFLAGS) -E ia64cpuid.S > $@
77ppccpuid.s: ppccpuid.pl; $(PERL) ppccpuid.pl $(PERLASM_SCHEME) $@ 77ppccpuid.s: ppccpuid.pl; $(PERL) ppccpuid.pl $(PERLASM_SCHEME) $@
78pariscid.s: pariscid.pl; $(PERL) pariscid.pl $(PERLASM_SCHEME) $@
78alphacpuid.s: alphacpuid.pl 79alphacpuid.s: alphacpuid.pl
79 $(PERL) $< | $(CC) -E - | tee $@ > /dev/null 80 $(PERL) $< | $(CC) -E - | tee $@ > /dev/null
80 81
@@ -102,6 +103,7 @@ lib: $(LIB)
102 @touch lib 103 @touch lib
103$(LIB): $(LIBOBJ) 104$(LIB): $(LIBOBJ)
104 $(AR) $(LIB) $(LIBOBJ) 105 $(AR) $(LIB) $(LIBOBJ)
106 [ -z "$(FIPSLIBDIR)" ] || $(AR) $(LIB) $(FIPSLIBDIR)fipscanister.o
105 $(RANLIB) $(LIB) || echo Never mind. 107 $(RANLIB) $(LIB) || echo Never mind.
106 108
107shared: buildinf.h lib subdirs 109shared: buildinf.h lib subdirs
@@ -171,6 +173,7 @@ ex_data.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
171ex_data.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h 173ex_data.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h
172ex_data.o: ../include/openssl/stack.h ../include/openssl/symhacks.h cryptlib.h 174ex_data.o: ../include/openssl/stack.h ../include/openssl/symhacks.h cryptlib.h
173ex_data.o: ex_data.c 175ex_data.o: ex_data.c
176fips_ers.o: ../include/openssl/opensslconf.h fips_ers.c
174mem.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h 177mem.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h
175mem.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h 178mem.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
176mem.o: ../include/openssl/err.h ../include/openssl/lhash.h 179mem.o: ../include/openssl/err.h ../include/openssl/lhash.h
@@ -191,6 +194,19 @@ mem_dbg.o: ../include/openssl/stack.h ../include/openssl/symhacks.h cryptlib.h
191mem_dbg.o: mem_dbg.c 194mem_dbg.o: mem_dbg.c
192o_dir.o: ../e_os.h ../include/openssl/e_os2.h ../include/openssl/opensslconf.h 195o_dir.o: ../e_os.h ../include/openssl/e_os2.h ../include/openssl/opensslconf.h
193o_dir.o: LPdir_unix.c o_dir.c o_dir.h 196o_dir.o: LPdir_unix.c o_dir.c o_dir.h
197o_fips.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/buffer.h
198o_fips.o: ../include/openssl/crypto.h ../include/openssl/e_os2.h
199o_fips.o: ../include/openssl/err.h ../include/openssl/lhash.h
200o_fips.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
201o_fips.o: ../include/openssl/ossl_typ.h ../include/openssl/safestack.h
202o_fips.o: ../include/openssl/stack.h ../include/openssl/symhacks.h cryptlib.h
203o_fips.o: o_fips.c
204o_init.o: ../e_os.h ../include/openssl/bio.h ../include/openssl/crypto.h
205o_init.o: ../include/openssl/e_os2.h ../include/openssl/err.h
206o_init.o: ../include/openssl/lhash.h ../include/openssl/opensslconf.h
207o_init.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
208o_init.o: ../include/openssl/safestack.h ../include/openssl/stack.h
209o_init.o: ../include/openssl/symhacks.h o_init.c
194o_str.o: ../e_os.h ../include/openssl/e_os2.h ../include/openssl/opensslconf.h 210o_str.o: ../e_os.h ../include/openssl/e_os2.h ../include/openssl/opensslconf.h
195o_str.o: o_str.c o_str.h 211o_str.o: o_str.c o_str.h
196o_time.o: ../include/openssl/e_os2.h ../include/openssl/opensslconf.h o_time.c 212o_time.o: ../include/openssl/e_os2.h ../include/openssl/opensslconf.h o_time.c
diff --git a/src/lib/libcrypto/aes/Makefile b/src/lib/libcrypto/aes/Makefile
index c501a43a8f..45ede0a0b4 100644
--- a/src/lib/libcrypto/aes/Makefile
+++ b/src/lib/libcrypto/aes/Makefile
@@ -50,9 +50,21 @@ aes-ia64.s: asm/aes-ia64.S
50 50
51aes-586.s: asm/aes-586.pl ../perlasm/x86asm.pl 51aes-586.s: asm/aes-586.pl ../perlasm/x86asm.pl
52 $(PERL) asm/aes-586.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@ 52 $(PERL) asm/aes-586.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@
53vpaes-x86.s: asm/vpaes-x86.pl ../perlasm/x86asm.pl
54 $(PERL) asm/vpaes-x86.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@
55aesni-x86.s: asm/aesni-x86.pl ../perlasm/x86asm.pl
56 $(PERL) asm/aesni-x86.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@
53 57
54aes-x86_64.s: asm/aes-x86_64.pl 58aes-x86_64.s: asm/aes-x86_64.pl
55 $(PERL) asm/aes-x86_64.pl $(PERLASM_SCHEME) > $@ 59 $(PERL) asm/aes-x86_64.pl $(PERLASM_SCHEME) > $@
60vpaes-x86_64.s: asm/vpaes-x86_64.pl
61 $(PERL) asm/vpaes-x86_64.pl $(PERLASM_SCHEME) > $@
62bsaes-x86_64.s: asm/bsaes-x86_64.pl
63 $(PERL) asm/bsaes-x86_64.pl $(PERLASM_SCHEME) > $@
64aesni-x86_64.s: asm/aesni-x86_64.pl
65 $(PERL) asm/aesni-x86_64.pl $(PERLASM_SCHEME) > $@
66aesni-sha1-x86_64.s: asm/aesni-sha1-x86_64.pl
67 $(PERL) asm/aesni-sha1-x86_64.pl $(PERLASM_SCHEME) > $@
56 68
57aes-sparcv9.s: asm/aes-sparcv9.pl 69aes-sparcv9.s: asm/aes-sparcv9.pl
58 $(PERL) asm/aes-sparcv9.pl $(CFLAGS) > $@ 70 $(PERL) asm/aes-sparcv9.pl $(CFLAGS) > $@
@@ -60,8 +72,15 @@ aes-sparcv9.s: asm/aes-sparcv9.pl
60aes-ppc.s: asm/aes-ppc.pl 72aes-ppc.s: asm/aes-ppc.pl
61 $(PERL) asm/aes-ppc.pl $(PERLASM_SCHEME) $@ 73 $(PERL) asm/aes-ppc.pl $(PERLASM_SCHEME) $@
62 74
75aes-parisc.s: asm/aes-parisc.pl
76 $(PERL) asm/aes-parisc.pl $(PERLASM_SCHEME) $@
77
78aes-mips.S: asm/aes-mips.pl
79 $(PERL) asm/aes-mips.pl $(PERLASM_SCHEME) $@
80
63# GNU make "catch all" 81# GNU make "catch all"
64aes-%.s: asm/aes-%.pl; $(PERL) $< $(CFLAGS) > $@ 82aes-%.S: asm/aes-%.pl; $(PERL) $< $(PERLASM_SCHEME) > $@
83aes-armv4.o: aes-armv4.S
65 84
66files: 85files:
67 $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO 86 $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
@@ -117,9 +136,11 @@ aes_ige.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
117aes_ige.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 136aes_ige.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
118aes_ige.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h 137aes_ige.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
119aes_ige.o: ../../include/openssl/symhacks.h ../cryptlib.h aes_ige.c aes_locl.h 138aes_ige.o: ../../include/openssl/symhacks.h ../cryptlib.h aes_ige.c aes_locl.h
120aes_misc.o: ../../include/openssl/aes.h ../../include/openssl/e_os2.h 139aes_misc.o: ../../include/openssl/aes.h ../../include/openssl/crypto.h
121aes_misc.o: ../../include/openssl/opensslconf.h 140aes_misc.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
122aes_misc.o: ../../include/openssl/opensslv.h aes_locl.h aes_misc.c 141aes_misc.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
142aes_misc.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
143aes_misc.o: ../../include/openssl/symhacks.h aes_locl.h aes_misc.c
123aes_ofb.o: ../../include/openssl/aes.h ../../include/openssl/modes.h 144aes_ofb.o: ../../include/openssl/aes.h ../../include/openssl/modes.h
124aes_ofb.o: ../../include/openssl/opensslconf.h aes_ofb.c 145aes_ofb.o: ../../include/openssl/opensslconf.h aes_ofb.c
125aes_wrap.o: ../../e_os.h ../../include/openssl/aes.h 146aes_wrap.o: ../../e_os.h ../../include/openssl/aes.h
diff --git a/src/lib/libcrypto/asn1/Makefile b/src/lib/libcrypto/asn1/Makefile
index 160544eede..f7787005d4 100644
--- a/src/lib/libcrypto/asn1/Makefile
+++ b/src/lib/libcrypto/asn1/Makefile
@@ -639,7 +639,7 @@ t_x509.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
639t_x509.o: ../../include/openssl/sha.h ../../include/openssl/stack.h 639t_x509.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
640t_x509.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h 640t_x509.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
641t_x509.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h 641t_x509.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h
642t_x509.o: ../cryptlib.h t_x509.c 642t_x509.o: ../cryptlib.h asn1_locl.h t_x509.c
643t_x509a.o: ../../e_os.h ../../include/openssl/asn1.h 643t_x509a.o: ../../e_os.h ../../include/openssl/asn1.h
644t_x509a.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h 644t_x509a.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
645t_x509a.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h 645t_x509a.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
diff --git a/src/lib/libcrypto/bf/Makefile b/src/lib/libcrypto/bf/Makefile
index dd2c2c708e..d01bfaa315 100644
--- a/src/lib/libcrypto/bf/Makefile
+++ b/src/lib/libcrypto/bf/Makefile
@@ -94,5 +94,8 @@ bf_enc.o: ../../include/openssl/blowfish.h ../../include/openssl/e_os2.h
94bf_enc.o: ../../include/openssl/opensslconf.h bf_enc.c bf_locl.h 94bf_enc.o: ../../include/openssl/opensslconf.h bf_enc.c bf_locl.h
95bf_ofb64.o: ../../include/openssl/blowfish.h ../../include/openssl/e_os2.h 95bf_ofb64.o: ../../include/openssl/blowfish.h ../../include/openssl/e_os2.h
96bf_ofb64.o: ../../include/openssl/opensslconf.h bf_locl.h bf_ofb64.c 96bf_ofb64.o: ../../include/openssl/opensslconf.h bf_locl.h bf_ofb64.c
97bf_skey.o: ../../include/openssl/blowfish.h ../../include/openssl/e_os2.h 97bf_skey.o: ../../include/openssl/blowfish.h ../../include/openssl/crypto.h
98bf_skey.o: ../../include/openssl/opensslconf.h bf_locl.h bf_pi.h bf_skey.c 98bf_skey.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
99bf_skey.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
100bf_skey.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
101bf_skey.o: ../../include/openssl/symhacks.h bf_locl.h bf_pi.h bf_skey.c
diff --git a/src/lib/libcrypto/bn/Makefile b/src/lib/libcrypto/bn/Makefile
index aabc4f56b8..672773454c 100644
--- a/src/lib/libcrypto/bn/Makefile
+++ b/src/lib/libcrypto/bn/Makefile
@@ -26,13 +26,13 @@ LIBSRC= bn_add.c bn_div.c bn_exp.c bn_lib.c bn_ctx.c bn_mul.c bn_mod.c \
26 bn_print.c bn_rand.c bn_shift.c bn_word.c bn_blind.c \ 26 bn_print.c bn_rand.c bn_shift.c bn_word.c bn_blind.c \
27 bn_kron.c bn_sqrt.c bn_gcd.c bn_prime.c bn_err.c bn_sqr.c bn_asm.c \ 27 bn_kron.c bn_sqrt.c bn_gcd.c bn_prime.c bn_err.c bn_sqr.c bn_asm.c \
28 bn_recp.c bn_mont.c bn_mpi.c bn_exp2.c bn_gf2m.c bn_nist.c \ 28 bn_recp.c bn_mont.c bn_mpi.c bn_exp2.c bn_gf2m.c bn_nist.c \
29 bn_depr.c bn_const.c 29 bn_depr.c bn_const.c bn_x931p.c
30 30
31LIBOBJ= bn_add.o bn_div.o bn_exp.o bn_lib.o bn_ctx.o bn_mul.o bn_mod.o \ 31LIBOBJ= bn_add.o bn_div.o bn_exp.o bn_lib.o bn_ctx.o bn_mul.o bn_mod.o \
32 bn_print.o bn_rand.o bn_shift.o bn_word.o bn_blind.o \ 32 bn_print.o bn_rand.o bn_shift.o bn_word.o bn_blind.o \
33 bn_kron.o bn_sqrt.o bn_gcd.o bn_prime.o bn_err.o bn_sqr.o $(BN_ASM) \ 33 bn_kron.o bn_sqrt.o bn_gcd.o bn_prime.o bn_err.o bn_sqr.o $(BN_ASM) \
34 bn_recp.o bn_mont.o bn_mpi.o bn_exp2.o bn_gf2m.o bn_nist.o \ 34 bn_recp.o bn_mont.o bn_mpi.o bn_exp2.o bn_gf2m.o bn_nist.o \
35 bn_depr.o bn_const.o 35 bn_depr.o bn_const.o bn_x931p.o
36 36
37SRC= $(LIBSRC) 37SRC= $(LIBSRC)
38 38
@@ -66,6 +66,8 @@ co-586.s: asm/co-586.pl ../perlasm/x86asm.pl
66 $(PERL) asm/co-586.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@ 66 $(PERL) asm/co-586.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@
67x86-mont.s: asm/x86-mont.pl ../perlasm/x86asm.pl 67x86-mont.s: asm/x86-mont.pl ../perlasm/x86asm.pl
68 $(PERL) asm/x86-mont.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@ 68 $(PERL) asm/x86-mont.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@
69x86-gf2m.s: asm/x86-gf2m.pl ../perlasm/x86asm.pl
70 $(PERL) asm/x86-gf2m.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@
69 71
70sparcv8.o: asm/sparcv8.S 72sparcv8.o: asm/sparcv8.S
71 $(CC) $(CFLAGS) -c asm/sparcv8.S 73 $(CC) $(CFLAGS) -c asm/sparcv8.S
@@ -82,16 +84,31 @@ bn-mips3.o: asm/mips3.s
82 as -$$ABI -O -o $@ asm/mips3.s; \ 84 as -$$ABI -O -o $@ asm/mips3.s; \
83 else $(CC) -c $(CFLAGS) -o $@ asm/mips3.s; fi 85 else $(CC) -c $(CFLAGS) -o $@ asm/mips3.s; fi
84 86
87bn-mips.s: asm/mips.pl
88 $(PERL) asm/mips.pl $(PERLASM_SCHEME) $@
89mips-mont.s: asm/mips-mont.pl
90 $(PERL) asm/mips-mont.pl $(PERLASM_SCHEME) $@
91
85bn-s390x.o: asm/s390x.S 92bn-s390x.o: asm/s390x.S
86 $(CC) $(CFLAGS) -c -o $@ asm/s390x.S 93 $(CC) $(CFLAGS) -c -o $@ asm/s390x.S
94s390x-gf2m.s: asm/s390x-gf2m.pl
95 $(PERL) asm/s390x-gf2m.pl $(PERLASM_SCHEME) $@
87 96
88x86_64-gcc.o: asm/x86_64-gcc.c 97x86_64-gcc.o: asm/x86_64-gcc.c
89 $(CC) $(CFLAGS) -c -o $@ asm/x86_64-gcc.c 98 $(CC) $(CFLAGS) -c -o $@ asm/x86_64-gcc.c
90x86_64-mont.s: asm/x86_64-mont.pl 99x86_64-mont.s: asm/x86_64-mont.pl
91 $(PERL) asm/x86_64-mont.pl $(PERLASM_SCHEME) > $@ 100 $(PERL) asm/x86_64-mont.pl $(PERLASM_SCHEME) > $@
101x86_64-mont5.s: asm/x86_64-mont5.pl
102 $(PERL) asm/x86_64-mont5.pl $(PERLASM_SCHEME) > $@
103x86_64-gf2m.s: asm/x86_64-gf2m.pl
104 $(PERL) asm/x86_64-gf2m.pl $(PERLASM_SCHEME) > $@
105modexp512-x86_64.s: asm/modexp512-x86_64.pl
106 $(PERL) asm/modexp512-x86_64.pl $(PERLASM_SCHEME) > $@
92 107
93bn-ia64.s: asm/ia64.S 108bn-ia64.s: asm/ia64.S
94 $(CC) $(CFLAGS) -E asm/ia64.S > $@ 109 $(CC) $(CFLAGS) -E asm/ia64.S > $@
110ia64-mont.s: asm/ia64-mont.pl
111 $(PERL) asm/ia64-mont.pl $@ $(CFLAGS)
95 112
96# GNU assembler fails to compile PA-RISC2 modules, insist on calling 113# GNU assembler fails to compile PA-RISC2 modules, insist on calling
97# vendor assembler... 114# vendor assembler...
@@ -99,16 +116,22 @@ pa-risc2W.o: asm/pa-risc2W.s
99 /usr/ccs/bin/as -o pa-risc2W.o asm/pa-risc2W.s 116 /usr/ccs/bin/as -o pa-risc2W.o asm/pa-risc2W.s
100pa-risc2.o: asm/pa-risc2.s 117pa-risc2.o: asm/pa-risc2.s
101 /usr/ccs/bin/as -o pa-risc2.o asm/pa-risc2.s 118 /usr/ccs/bin/as -o pa-risc2.o asm/pa-risc2.s
119parisc-mont.s: asm/parisc-mont.pl
120 $(PERL) asm/parisc-mont.pl $(PERLASM_SCHEME) $@
102 121
103# ppc - AIX, Linux, MacOS X... 122# ppc - AIX, Linux, MacOS X...
104bn-ppc.s: asm/ppc.pl; $(PERL) asm/ppc.pl $(PERLASM_SCHEME) $@ 123bn-ppc.s: asm/ppc.pl; $(PERL) asm/ppc.pl $(PERLASM_SCHEME) $@
105ppc-mont.s: asm/ppc-mont.pl;$(PERL) asm/ppc-mont.pl $(PERLASM_SCHEME) $@ 124ppc-mont.s: asm/ppc-mont.pl;$(PERL) asm/ppc-mont.pl $(PERLASM_SCHEME) $@
125ppc64-mont.s: asm/ppc64-mont.pl;$(PERL) asm/ppc64-mont.pl $(PERLASM_SCHEME) $@
106 126
107alpha-mont.s: asm/alpha-mont.pl 127alpha-mont.s: asm/alpha-mont.pl
108 $(PERL) $< | $(CC) -E - | tee $@ > /dev/null 128 $(PERL) $< | $(CC) -E - | tee $@ > /dev/null
109 129
110# GNU make "catch all" 130# GNU make "catch all"
111%-mont.s: asm/%-mont.pl; $(PERL) $< $(CFLAGS) > $@ 131%-mont.s: asm/%-mont.pl; $(PERL) $< $(PERLASM_SCHEME) $@
132%-gf2m.S: asm/%-gf2m.pl; $(PERL) $< $(PERLASM_SCHEME) $@
133
134armv4-gf2m.o: armv4-gf2m.S
112 135
113files: 136files:
114 $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO 137 $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
@@ -345,3 +368,8 @@ bn_word.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
345bn_word.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 368bn_word.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
346bn_word.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h 369bn_word.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
347bn_word.o: ../../include/openssl/symhacks.h ../cryptlib.h bn_lcl.h bn_word.c 370bn_word.o: ../../include/openssl/symhacks.h ../cryptlib.h bn_lcl.h bn_word.c
371bn_x931p.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h
372bn_x931p.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
373bn_x931p.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
374bn_x931p.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
375bn_x931p.o: ../../include/openssl/symhacks.h bn_x931p.c
diff --git a/src/lib/libcrypto/bn/bntest.c b/src/lib/libcrypto/bn/bntest.c
index 0cd99c5b4b..06f5954acc 100644
--- a/src/lib/libcrypto/bn/bntest.c
+++ b/src/lib/libcrypto/bn/bntest.c
@@ -262,7 +262,7 @@ int main(int argc, char *argv[])
262 message(out,"BN_mod_sqrt"); 262 message(out,"BN_mod_sqrt");
263 if (!test_sqrt(out,ctx)) goto err; 263 if (!test_sqrt(out,ctx)) goto err;
264 (void)BIO_flush(out); 264 (void)BIO_flush(out);
265 265#ifndef OPENSSL_NO_EC2M
266 message(out,"BN_GF2m_add"); 266 message(out,"BN_GF2m_add");
267 if (!test_gf2m_add(out)) goto err; 267 if (!test_gf2m_add(out)) goto err;
268 (void)BIO_flush(out); 268 (void)BIO_flush(out);
@@ -298,7 +298,7 @@ int main(int argc, char *argv[])
298 message(out,"BN_GF2m_mod_solve_quad"); 298 message(out,"BN_GF2m_mod_solve_quad");
299 if (!test_gf2m_mod_solve_quad(out,ctx)) goto err; 299 if (!test_gf2m_mod_solve_quad(out,ctx)) goto err;
300 (void)BIO_flush(out); 300 (void)BIO_flush(out);
301 301#endif
302 BN_CTX_free(ctx); 302 BN_CTX_free(ctx);
303 BIO_free(out); 303 BIO_free(out);
304 304
@@ -1061,7 +1061,7 @@ int test_exp(BIO *bp, BN_CTX *ctx)
1061 BN_free(one); 1061 BN_free(one);
1062 return(1); 1062 return(1);
1063 } 1063 }
1064 1064#ifndef OPENSSL_NO_EC2M
1065int test_gf2m_add(BIO *bp) 1065int test_gf2m_add(BIO *bp)
1066 { 1066 {
1067 BIGNUM a,b,c; 1067 BIGNUM a,b,c;
@@ -1636,7 +1636,7 @@ int test_gf2m_mod_solve_quad(BIO *bp,BN_CTX *ctx)
1636 BN_free(e); 1636 BN_free(e);
1637 return ret; 1637 return ret;
1638 } 1638 }
1639 1639#endif
1640static int genprime_cb(int p, int n, BN_GENCB *arg) 1640static int genprime_cb(int p, int n, BN_GENCB *arg)
1641 { 1641 {
1642 char c='*'; 1642 char c='*';
diff --git a/src/lib/libcrypto/buffer/Makefile b/src/lib/libcrypto/buffer/Makefile
index 9f3a88d2d6..2efba47f07 100644
--- a/src/lib/libcrypto/buffer/Makefile
+++ b/src/lib/libcrypto/buffer/Makefile
@@ -17,8 +17,8 @@ TEST=
17APPS= 17APPS=
18 18
19LIB=$(TOP)/libcrypto.a 19LIB=$(TOP)/libcrypto.a
20LIBSRC= buffer.c buf_err.c 20LIBSRC= buffer.c buf_str.c buf_err.c
21LIBOBJ= buffer.o buf_err.o 21LIBOBJ= buffer.o buf_str.o buf_err.o
22 22
23SRC= $(LIBSRC) 23SRC= $(LIBSRC)
24 24
@@ -81,6 +81,13 @@ buf_err.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
81buf_err.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h 81buf_err.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
82buf_err.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h 82buf_err.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
83buf_err.o: buf_err.c 83buf_err.o: buf_err.c
84buf_str.o: ../../e_os.h ../../include/openssl/bio.h
85buf_str.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
86buf_str.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
87buf_str.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
88buf_str.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
89buf_str.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
90buf_str.o: ../../include/openssl/symhacks.h ../cryptlib.h buf_str.c
84buffer.o: ../../e_os.h ../../include/openssl/bio.h 91buffer.o: ../../e_os.h ../../include/openssl/bio.h
85buffer.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 92buffer.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
86buffer.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h 93buffer.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
diff --git a/src/lib/libcrypto/cast/Makefile b/src/lib/libcrypto/cast/Makefile
index 0acc38f28d..f3f4859886 100644
--- a/src/lib/libcrypto/cast/Makefile
+++ b/src/lib/libcrypto/cast/Makefile
@@ -95,5 +95,8 @@ c_ofb64.o: ../../e_os.h ../../include/openssl/cast.h
95c_ofb64.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h 95c_ofb64.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
96c_ofb64.o: c_ofb64.c cast_lcl.h 96c_ofb64.o: c_ofb64.c cast_lcl.h
97c_skey.o: ../../e_os.h ../../include/openssl/cast.h 97c_skey.o: ../../e_os.h ../../include/openssl/cast.h
98c_skey.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h 98c_skey.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
99c_skey.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
100c_skey.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
101c_skey.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
99c_skey.o: c_skey.c cast_lcl.h cast_s.h 102c_skey.o: c_skey.c cast_lcl.h cast_s.h
diff --git a/src/lib/libcrypto/crypto-lib.com b/src/lib/libcrypto/crypto-lib.com
index a29c0afd93..c280aa03a8 100644
--- a/src/lib/libcrypto/crypto-lib.com
+++ b/src/lib/libcrypto/crypto-lib.com
@@ -117,7 +117,7 @@ $ ENCRYPT_TYPES = "Basic,"+ -
117 "BUFFER,BIO,STACK,LHASH,RAND,ERR,"+ - 117 "BUFFER,BIO,STACK,LHASH,RAND,ERR,"+ -
118 "EVP,EVP_2,EVP_3,ASN1,ASN1_2,PEM,X509,X509V3,"+ - 118 "EVP,EVP_2,EVP_3,ASN1,ASN1_2,PEM,X509,X509V3,"+ -
119 "CONF,TXT_DB,PKCS7,PKCS12,COMP,OCSP,UI,KRB5,"+ - 119 "CONF,TXT_DB,PKCS7,PKCS12,COMP,OCSP,UI,KRB5,"+ -
120 "STORE,CMS,PQUEUE,TS,JPAKE" 120 "CMS,PQUEUE,TS,JPAKE,SRP,STORE,CMAC"
121$! 121$!
122$! Check To Make Sure We Have Valid Command Line Parameters. 122$! Check To Make Sure We Have Valid Command Line Parameters.
123$! 123$!
@@ -207,7 +207,8 @@ $!
207$ APPS_DES = "DES/DES,CBC3_ENC" 207$ APPS_DES = "DES/DES,CBC3_ENC"
208$ APPS_PKCS7 = "ENC/ENC;DEC/DEC;SIGN/SIGN;VERIFY/VERIFY,EXAMPLE" 208$ APPS_PKCS7 = "ENC/ENC;DEC/DEC;SIGN/SIGN;VERIFY/VERIFY,EXAMPLE"
209$ 209$
210$ LIB_ = "cryptlib,mem,mem_clr,mem_dbg,cversion,ex_data,cpt_err,ebcdic,uid,o_time,o_str,o_dir" 210$ LIB_ = "cryptlib,mem,mem_clr,mem_dbg,cversion,ex_data,cpt_err,"+ -
211 "ebcdic,uid,o_time,o_str,o_dir,o_fips.c,o_init,fips_ers"
211$ LIB_MD2 = "md2_dgst,md2_one" 212$ LIB_MD2 = "md2_dgst,md2_one"
212$ LIB_MD4 = "md4_dgst,md4_one" 213$ LIB_MD4 = "md4_dgst,md4_one"
213$ LIB_MD5 = "md5_dgst,md5_one" 214$ LIB_MD5 = "md5_dgst,md5_one"
@@ -224,15 +225,16 @@ $ LIB_DES = "set_key,ecb_enc,cbc_enc,"+ -
224 "fcrypt,xcbc_enc,rpc_enc,cbc_cksm,"+ - 225 "fcrypt,xcbc_enc,rpc_enc,cbc_cksm,"+ -
225 "ede_cbcm_enc,des_old,des_old2,read2pwd" 226 "ede_cbcm_enc,des_old,des_old2,read2pwd"
226$ LIB_RC2 = "rc2_ecb,rc2_skey,rc2_cbc,rc2cfb64,rc2ofb64" 227$ LIB_RC2 = "rc2_ecb,rc2_skey,rc2_cbc,rc2cfb64,rc2ofb64"
227$ LIB_RC4 = "rc4_skey,rc4_enc" 228$ LIB_RC4 = "rc4_skey,rc4_enc,rc4_utl"
228$ LIB_RC5 = "rc5_skey,rc5_ecb,rc5_enc,rc5cfb64,rc5ofb64" 229$ LIB_RC5 = "rc5_skey,rc5_ecb,rc5_enc,rc5cfb64,rc5ofb64"
229$ LIB_IDEA = "i_cbc,i_cfb64,i_ofb64,i_ecb,i_skey" 230$ LIB_IDEA = "i_cbc,i_cfb64,i_ofb64,i_ecb,i_skey"
230$ LIB_BF = "bf_skey,bf_ecb,bf_enc,bf_cfb64,bf_ofb64" 231$ LIB_BF = "bf_skey,bf_ecb,bf_enc,bf_cfb64,bf_ofb64"
231$ LIB_CAST = "c_skey,c_ecb,c_enc,c_cfb64,c_ofb64" 232$ LIB_CAST = "c_skey,c_ecb,c_enc,c_cfb64,c_ofb64"
232$ LIB_CAMELLIA = "camellia,cmll_misc,cmll_ecb,cmll_cbc,cmll_ofb,"+ - 233$ LIB_CAMELLIA = "camellia,cmll_misc,cmll_ecb,cmll_cbc,cmll_ofb,"+ -
233 "cmll_cfb,cmll_ctr" 234 "cmll_cfb,cmll_ctr,cmll_utl"
234$ LIB_SEED = "seed,seed_ecb,seed_cbc,seed_cfb,seed_ofb" 235$ LIB_SEED = "seed,seed_ecb,seed_cbc,seed_cfb,seed_ofb"
235$ LIB_MODES = "cbc128,ctr128,cts128,cfb128,ofb128" 236$ LIB_MODES = "cbc128,ctr128,cts128,cfb128,ofb128,gcm128,"+ -
237 "ccm128,xts128"
236$ LIB_BN_ASM = "[.asm]vms.mar,vms-helper" 238$ LIB_BN_ASM = "[.asm]vms.mar,vms-helper"
237$ IF F$TRNLNM("OPENSSL_NO_ASM") .OR. ARCH .NES. "VAX" THEN - 239$ IF F$TRNLNM("OPENSSL_NO_ASM") .OR. ARCH .NES. "VAX" THEN -
238 LIB_BN_ASM = "bn_asm" 240 LIB_BN_ASM = "bn_asm"
@@ -240,14 +242,16 @@ $ LIB_BN = "bn_add,bn_div,bn_exp,bn_lib,bn_ctx,bn_mul,bn_mod,"+ -
240 "bn_print,bn_rand,bn_shift,bn_word,bn_blind,"+ - 242 "bn_print,bn_rand,bn_shift,bn_word,bn_blind,"+ -
241 "bn_kron,bn_sqrt,bn_gcd,bn_prime,bn_err,bn_sqr,"+LIB_BN_ASM+","+ - 243 "bn_kron,bn_sqrt,bn_gcd,bn_prime,bn_err,bn_sqr,"+LIB_BN_ASM+","+ -
242 "bn_recp,bn_mont,bn_mpi,bn_exp2,bn_gf2m,bn_nist,"+ - 244 "bn_recp,bn_mont,bn_mpi,bn_exp2,bn_gf2m,bn_nist,"+ -
243 "bn_depr,bn_const" 245 "bn_depr,bn_const,bn_x931p"
244$ LIB_EC = "ec_lib,ecp_smpl,ecp_mont,ecp_nist,ec_cvt,ec_mult,"+ - 246$ LIB_EC = "ec_lib,ecp_smpl,ecp_mont,ecp_nist,ec_cvt,ec_mult,"+ -
245 "ec_err,ec_curve,ec_check,ec_print,ec_asn1,ec_key,"+ - 247 "ec_err,ec_curve,ec_check,ec_print,ec_asn1,ec_key,"+ -
246 "ec2_smpl,ec2_mult,ec_ameth,ec_pmeth,eck_prn" 248 "ec2_smpl,ec2_mult,ec_ameth,ec_pmeth,eck_prn,"+ -
249 "ecp_nistp224,ecp_nistp256,ecp_nistp521,ecp_nistputil,"+ -
250 "ecp_oct,ec2_oct,ec_oct"
247$ LIB_RSA = "rsa_eay,rsa_gen,rsa_lib,rsa_sign,rsa_saos,rsa_err,"+ - 251$ LIB_RSA = "rsa_eay,rsa_gen,rsa_lib,rsa_sign,rsa_saos,rsa_err,"+ -
248 "rsa_pk1,rsa_ssl,rsa_none,rsa_oaep,rsa_chk,rsa_null,"+ - 252 "rsa_pk1,rsa_ssl,rsa_none,rsa_oaep,rsa_chk,rsa_null,"+ -
249 "rsa_pss,rsa_x931,rsa_asn1,rsa_depr,rsa_ameth,rsa_prn,"+ - 253 "rsa_pss,rsa_x931,rsa_asn1,rsa_depr,rsa_ameth,rsa_prn,"+ -
250 "rsa_pmeth" 254 "rsa_pmeth,rsa_crpt"
251$ LIB_DSA = "dsa_gen,dsa_key,dsa_lib,dsa_asn1,dsa_vrf,dsa_sign,"+ - 255$ LIB_DSA = "dsa_gen,dsa_key,dsa_lib,dsa_asn1,dsa_vrf,dsa_sign,"+ -
252 "dsa_err,dsa_ossl,dsa_depr,dsa_ameth,dsa_pmeth,dsa_prn" 256 "dsa_err,dsa_ossl,dsa_depr,dsa_ameth,dsa_pmeth,dsa_prn"
253$ LIB_ECDSA = "ecs_lib,ecs_asn1,ecs_ossl,ecs_sign,ecs_vrf,ecs_err" 257$ LIB_ECDSA = "ecs_lib,ecs_asn1,ecs_ossl,ecs_sign,ecs_vrf,ecs_err"
@@ -260,10 +264,11 @@ $ LIB_ENGINE = "eng_err,eng_lib,eng_list,eng_init,eng_ctrl,"+ -
260 "eng_table,eng_pkey,eng_fat,eng_all,"+ - 264 "eng_table,eng_pkey,eng_fat,eng_all,"+ -
261 "tb_rsa,tb_dsa,tb_ecdsa,tb_dh,tb_ecdh,tb_rand,tb_store,"+ - 265 "tb_rsa,tb_dsa,tb_ecdsa,tb_dh,tb_ecdh,tb_rand,tb_store,"+ -
262 "tb_cipher,tb_digest,tb_pkmeth,tb_asnmth,"+ - 266 "tb_cipher,tb_digest,tb_pkmeth,tb_asnmth,"+ -
263 "eng_openssl,eng_dyn,eng_cnf,eng_cryptodev" 267 "eng_openssl,eng_dyn,eng_cnf,eng_cryptodev,"+ -
268 "eng_rsax,eng_rdrand"
264$ LIB_AES = "aes_core,aes_misc,aes_ecb,aes_cbc,aes_cfb,aes_ofb,aes_ctr,"+ - 269$ LIB_AES = "aes_core,aes_misc,aes_ecb,aes_cbc,aes_cfb,aes_ofb,aes_ctr,"+ -
265 "aes_ige,aes_wrap" 270 "aes_ige,aes_wrap"
266$ LIB_BUFFER = "buffer,buf_err" 271$ LIB_BUFFER = "buffer,buf_str,buf_err"
267$ LIB_BIO = "bio_lib,bio_cb,bio_err,"+ - 272$ LIB_BIO = "bio_lib,bio_cb,bio_err,"+ -
268 "bss_mem,bss_null,bss_fd,"+ - 273 "bss_mem,bss_null,bss_fd,"+ -
269 "bss_file,bss_sock,bss_conn,"+ - 274 "bss_file,bss_sock,bss_conn,"+ -
@@ -287,7 +292,8 @@ $ LIB_EVP_2 = "m_null,m_md2,m_md4,m_md5,m_sha,m_sha1,m_wp," + -
287 "bio_md,bio_b64,bio_enc,evp_err,e_null,"+ - 292 "bio_md,bio_b64,bio_enc,evp_err,e_null,"+ -
288 "c_all,c_allc,c_alld,evp_lib,bio_ok,"+- 293 "c_all,c_allc,c_alld,evp_lib,bio_ok,"+-
289 "evp_pkey,evp_pbe,p5_crpt,p5_crpt2" 294 "evp_pkey,evp_pbe,p5_crpt,p5_crpt2"
290$ LIB_EVP_3 = "e_old,pmeth_lib,pmeth_fn,pmeth_gn,m_sigver" 295$ LIB_EVP_3 = "e_old,pmeth_lib,pmeth_fn,pmeth_gn,m_sigver,evp_fips,"+ -
296 "e_aes_cbc_hmac_sha1,e_rc4_hmac_md5"
291$ LIB_ASN1 = "a_object,a_bitstr,a_utctm,a_gentm,a_time,a_int,a_octet,"+ - 297$ LIB_ASN1 = "a_object,a_bitstr,a_utctm,a_gentm,a_time,a_int,a_octet,"+ -
292 "a_print,a_type,a_set,a_dup,a_d2i_fp,a_i2d_fp,"+ - 298 "a_print,a_type,a_set,a_dup,a_d2i_fp,a_i2d_fp,"+ -
293 "a_enum,a_utf8,a_sign,a_digest,a_verify,a_mbstr,a_strex,"+ - 299 "a_enum,a_utf8,a_sign,a_digest,a_verify,a_mbstr,a_strex,"+ -
@@ -329,14 +335,17 @@ $ LIB_OCSP = "ocsp_asn,ocsp_ext,ocsp_ht,ocsp_lib,ocsp_cl,"+ -
329$ LIB_UI_COMPAT = ",ui_compat" 335$ LIB_UI_COMPAT = ",ui_compat"
330$ LIB_UI = "ui_err,ui_lib,ui_openssl,ui_util"+LIB_UI_COMPAT 336$ LIB_UI = "ui_err,ui_lib,ui_openssl,ui_util"+LIB_UI_COMPAT
331$ LIB_KRB5 = "krb5_asn" 337$ LIB_KRB5 = "krb5_asn"
332$ LIB_STORE = "str_err,str_lib,str_meth,str_mem"
333$ LIB_CMS = "cms_lib,cms_asn1,cms_att,cms_io,cms_smime,cms_err,"+ - 338$ LIB_CMS = "cms_lib,cms_asn1,cms_att,cms_io,cms_smime,cms_err,"+ -
334 "cms_sd,cms_dd,cms_cd,cms_env,cms_enc,cms_ess" 339 "cms_sd,cms_dd,cms_cd,cms_env,cms_enc,cms_ess,"+ -
340 "cms_pwri"
335$ LIB_PQUEUE = "pqueue" 341$ LIB_PQUEUE = "pqueue"
336$ LIB_TS = "ts_err,ts_req_utils,ts_req_print,ts_rsp_utils,ts_rsp_print,"+ - 342$ LIB_TS = "ts_err,ts_req_utils,ts_req_print,ts_rsp_utils,ts_rsp_print,"+ -
337 "ts_rsp_sign,ts_rsp_verify,ts_verify_ctx,ts_lib,ts_conf,"+ - 343 "ts_rsp_sign,ts_rsp_verify,ts_verify_ctx,ts_lib,ts_conf,"+ -
338 "ts_asn1" 344 "ts_asn1"
339$ LIB_JPAKE = "jpake,jpake_err" 345$ LIB_JPAKE = "jpake,jpake_err"
346$ LIB_SRP = "srp_lib,srp_vfy"
347$ LIB_STORE = "str_err,str_lib,str_meth,str_mem"
348$ LIB_CMAC = "cmac,cm_ameth.c,cm_pmeth"
340$! 349$!
341$! Setup exceptional compilations 350$! Setup exceptional compilations
342$! 351$!
@@ -1021,7 +1030,7 @@ $!
1021$! Set basic C compiler /INCLUDE directories. 1030$! Set basic C compiler /INCLUDE directories.
1022$! 1031$!
1023$ CC_INCLUDES = "SYS$DISK:[.''ARCHD'],SYS$DISK:[],SYS$DISK:[-],"+ - 1032$ CC_INCLUDES = "SYS$DISK:[.''ARCHD'],SYS$DISK:[],SYS$DISK:[-],"+ -
1024 "SYS$DISK:[.ENGINE.VENDOR_DEFNS],SYS$DISK:[.EVP],SYS$DISK:[.ASN1]" 1033 "SYS$DISK:[.ENGINE.VENDOR_DEFNS],SYS$DISK:[.MODES],SYS$DISK:[.ASN1],SYS$DISK:[.EVP]"
1025$! 1034$!
1026$! Check To See If P3 Is Blank. 1035$! Check To See If P3 Is Blank.
1027$! 1036$!
diff --git a/src/lib/libcrypto/des/Makefile b/src/lib/libcrypto/des/Makefile
index ae982265fd..a6e1001329 100644
--- a/src/lib/libcrypto/des/Makefile
+++ b/src/lib/libcrypto/des/Makefile
@@ -257,8 +257,9 @@ rpc_enc.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
257rpc_enc.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h 257rpc_enc.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
258rpc_enc.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h 258rpc_enc.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
259rpc_enc.o: des_locl.h des_ver.h rpc_des.h rpc_enc.c 259rpc_enc.o: des_locl.h des_ver.h rpc_des.h rpc_enc.c
260set_key.o: ../../include/openssl/des.h ../../include/openssl/des_old.h 260set_key.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
261set_key.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h 261set_key.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h
262set_key.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
262set_key.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h 263set_key.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
263set_key.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h 264set_key.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
264set_key.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h 265set_key.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h
diff --git a/src/lib/libcrypto/dsa/Makefile b/src/lib/libcrypto/dsa/Makefile
index 8073c4ecfe..5fef4ca5ad 100644
--- a/src/lib/libcrypto/dsa/Makefile
+++ b/src/lib/libcrypto/dsa/Makefile
@@ -99,8 +99,9 @@ dsa_asn1.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
99dsa_asn1.o: ../../include/openssl/err.h ../../include/openssl/lhash.h 99dsa_asn1.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
100dsa_asn1.o: ../../include/openssl/opensslconf.h 100dsa_asn1.o: ../../include/openssl/opensslconf.h
101dsa_asn1.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 101dsa_asn1.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
102dsa_asn1.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h 102dsa_asn1.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h
103dsa_asn1.o: ../../include/openssl/symhacks.h ../cryptlib.h dsa_asn1.c 103dsa_asn1.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
104dsa_asn1.o: ../cryptlib.h dsa_asn1.c
104dsa_depr.o: ../../e_os.h ../../include/openssl/asn1.h 105dsa_depr.o: ../../e_os.h ../../include/openssl/asn1.h
105dsa_depr.o: ../../include/openssl/bio.h ../../include/openssl/bn.h 106dsa_depr.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
106dsa_depr.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 107dsa_depr.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
@@ -189,7 +190,7 @@ dsa_prn.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
189dsa_prn.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h 190dsa_prn.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
190dsa_prn.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h 191dsa_prn.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
191dsa_prn.o: ../cryptlib.h dsa_prn.c 192dsa_prn.o: ../cryptlib.h dsa_prn.c
192dsa_sign.o: ../../e_os.h ../../include/openssl/bio.h 193dsa_sign.o: ../../e_os.h ../../include/openssl/bio.h ../../include/openssl/bn.h
193dsa_sign.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 194dsa_sign.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
194dsa_sign.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h 195dsa_sign.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
195dsa_sign.o: ../../include/openssl/err.h ../../include/openssl/lhash.h 196dsa_sign.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
diff --git a/src/lib/libcrypto/ec/Makefile b/src/lib/libcrypto/ec/Makefile
index db380ed16f..f85fc845ca 100644
--- a/src/lib/libcrypto/ec/Makefile
+++ b/src/lib/libcrypto/ec/Makefile
@@ -19,11 +19,15 @@ APPS=
19LIB=$(TOP)/libcrypto.a 19LIB=$(TOP)/libcrypto.a
20LIBSRC= ec_lib.c ecp_smpl.c ecp_mont.c ecp_nist.c ec_cvt.c ec_mult.c\ 20LIBSRC= ec_lib.c ecp_smpl.c ecp_mont.c ecp_nist.c ec_cvt.c ec_mult.c\
21 ec_err.c ec_curve.c ec_check.c ec_print.c ec_asn1.c ec_key.c\ 21 ec_err.c ec_curve.c ec_check.c ec_print.c ec_asn1.c ec_key.c\
22 ec2_smpl.c ec2_mult.c ec_ameth.c ec_pmeth.c eck_prn.c 22 ec2_smpl.c ec2_mult.c ec_ameth.c ec_pmeth.c eck_prn.c \
23 ecp_nistp224.c ecp_nistp256.c ecp_nistp521.c ecp_nistputil.c \
24 ecp_oct.c ec2_oct.c ec_oct.c
23 25
24LIBOBJ= ec_lib.o ecp_smpl.o ecp_mont.o ecp_nist.o ec_cvt.o ec_mult.o\ 26LIBOBJ= ec_lib.o ecp_smpl.o ecp_mont.o ecp_nist.o ec_cvt.o ec_mult.o\
25 ec_err.o ec_curve.o ec_check.o ec_print.o ec_asn1.o ec_key.o\ 27 ec_err.o ec_curve.o ec_check.o ec_print.o ec_asn1.o ec_key.o\
26 ec2_smpl.o ec2_mult.o ec_ameth.o ec_pmeth.o eck_prn.o 28 ec2_smpl.o ec2_mult.o ec_ameth.o ec_pmeth.o eck_prn.o \
29 ecp_nistp224.o ecp_nistp256.o ecp_nistp521.o ecp_nistputil.o \
30 ecp_oct.o ec2_oct.o ec_oct.o
27 31
28SRC= $(LIBSRC) 32SRC= $(LIBSRC)
29 33
@@ -87,6 +91,14 @@ ec2_mult.o: ../../include/openssl/obj_mac.h ../../include/openssl/opensslconf.h
87ec2_mult.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 91ec2_mult.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
88ec2_mult.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h 92ec2_mult.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
89ec2_mult.o: ../../include/openssl/symhacks.h ec2_mult.c ec_lcl.h 93ec2_mult.o: ../../include/openssl/symhacks.h ec2_mult.c ec_lcl.h
94ec2_oct.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
95ec2_oct.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h
96ec2_oct.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
97ec2_oct.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
98ec2_oct.o: ../../include/openssl/obj_mac.h ../../include/openssl/opensslconf.h
99ec2_oct.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
100ec2_oct.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
101ec2_oct.o: ../../include/openssl/symhacks.h ec2_oct.c ec_lcl.h
90ec2_smpl.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h 102ec2_smpl.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
91ec2_smpl.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h 103ec2_smpl.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h
92ec2_smpl.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h 104ec2_smpl.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
@@ -174,6 +186,14 @@ ec_mult.o: ../../include/openssl/obj_mac.h ../../include/openssl/opensslconf.h
174ec_mult.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 186ec_mult.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
175ec_mult.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h 187ec_mult.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
176ec_mult.o: ../../include/openssl/symhacks.h ec_lcl.h ec_mult.c 188ec_mult.o: ../../include/openssl/symhacks.h ec_lcl.h ec_mult.c
189ec_oct.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
190ec_oct.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h
191ec_oct.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
192ec_oct.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
193ec_oct.o: ../../include/openssl/obj_mac.h ../../include/openssl/opensslconf.h
194ec_oct.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
195ec_oct.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
196ec_oct.o: ../../include/openssl/symhacks.h ec_lcl.h ec_oct.c
177ec_pmeth.o: ../../e_os.h ../../include/openssl/asn1.h 197ec_pmeth.o: ../../e_os.h ../../include/openssl/asn1.h
178ec_pmeth.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h 198ec_pmeth.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
179ec_pmeth.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 199ec_pmeth.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
@@ -221,6 +241,18 @@ ecp_nist.o: ../../include/openssl/obj_mac.h ../../include/openssl/opensslconf.h
221ecp_nist.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 241ecp_nist.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
222ecp_nist.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h 242ecp_nist.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
223ecp_nist.o: ../../include/openssl/symhacks.h ec_lcl.h ecp_nist.c 243ecp_nist.o: ../../include/openssl/symhacks.h ec_lcl.h ecp_nist.c
244ecp_nistp224.o: ../../include/openssl/opensslconf.h ecp_nistp224.c
245ecp_nistp256.o: ../../include/openssl/opensslconf.h ecp_nistp256.c
246ecp_nistp521.o: ../../include/openssl/opensslconf.h ecp_nistp521.c
247ecp_nistputil.o: ../../include/openssl/opensslconf.h ecp_nistputil.c
248ecp_oct.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
249ecp_oct.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h
250ecp_oct.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
251ecp_oct.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
252ecp_oct.o: ../../include/openssl/obj_mac.h ../../include/openssl/opensslconf.h
253ecp_oct.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
254ecp_oct.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
255ecp_oct.o: ../../include/openssl/symhacks.h ec_lcl.h ecp_oct.c
224ecp_smpl.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h 256ecp_smpl.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
225ecp_smpl.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h 257ecp_smpl.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h
226ecp_smpl.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h 258ecp_smpl.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
diff --git a/src/lib/libcrypto/ec/ectest.c b/src/lib/libcrypto/ec/ectest.c
index 7509cb9c7c..f107782de0 100644
--- a/src/lib/libcrypto/ec/ectest.c
+++ b/src/lib/libcrypto/ec/ectest.c
@@ -94,6 +94,7 @@ int main(int argc, char * argv[]) { puts("Elliptic curves are disabled."); retur
94#include <openssl/objects.h> 94#include <openssl/objects.h>
95#include <openssl/rand.h> 95#include <openssl/rand.h>
96#include <openssl/bn.h> 96#include <openssl/bn.h>
97#include <openssl/opensslconf.h>
97 98
98#if defined(_MSC_VER) && defined(_MIPS_) && (_MSC_VER/100==12) 99#if defined(_MSC_VER) && defined(_MIPS_) && (_MSC_VER/100==12)
99/* suppress "too big too optimize" warning */ 100/* suppress "too big too optimize" warning */
@@ -107,10 +108,6 @@ int main(int argc, char * argv[]) { puts("Elliptic curves are disabled."); retur
107 EXIT(1); \ 108 EXIT(1); \
108} while (0) 109} while (0)
109 110
110void prime_field_tests(void);
111void char2_field_tests(void);
112void internal_curve_test(void);
113
114#define TIMING_BASE_PT 0 111#define TIMING_BASE_PT 0
115#define TIMING_RAND_PT 1 112#define TIMING_RAND_PT 1
116#define TIMING_SIMUL 2 113#define TIMING_SIMUL 2
@@ -195,7 +192,50 @@ static void timings(EC_GROUP *group, int type, BN_CTX *ctx)
195 } 192 }
196#endif 193#endif
197 194
198void prime_field_tests() 195/* test multiplication with group order, long and negative scalars */
196static void group_order_tests(EC_GROUP *group)
197 {
198 BIGNUM *n1, *n2, *order;
199 EC_POINT *P = EC_POINT_new(group);
200 EC_POINT *Q = EC_POINT_new(group);
201 BN_CTX *ctx = BN_CTX_new();
202
203 n1 = BN_new(); n2 = BN_new(); order = BN_new();
204 fprintf(stdout, "verify group order ...");
205 fflush(stdout);
206 if (!EC_GROUP_get_order(group, order, ctx)) ABORT;
207 if (!EC_POINT_mul(group, Q, order, NULL, NULL, ctx)) ABORT;
208 if (!EC_POINT_is_at_infinity(group, Q)) ABORT;
209 fprintf(stdout, ".");
210 fflush(stdout);
211 if (!EC_GROUP_precompute_mult(group, ctx)) ABORT;
212 if (!EC_POINT_mul(group, Q, order, NULL, NULL, ctx)) ABORT;
213 if (!EC_POINT_is_at_infinity(group, Q)) ABORT;
214 fprintf(stdout, " ok\n");
215 fprintf(stdout, "long/negative scalar tests ... ");
216 if (!BN_one(n1)) ABORT;
217 /* n1 = 1 - order */
218 if (!BN_sub(n1, n1, order)) ABORT;
219 if(!EC_POINT_mul(group, Q, NULL, P, n1, ctx)) ABORT;
220 if (0 != EC_POINT_cmp(group, Q, P, ctx)) ABORT;
221 /* n2 = 1 + order */
222 if (!BN_add(n2, order, BN_value_one())) ABORT;
223 if(!EC_POINT_mul(group, Q, NULL, P, n2, ctx)) ABORT;
224 if (0 != EC_POINT_cmp(group, Q, P, ctx)) ABORT;
225 /* n2 = (1 - order) * (1 + order) */
226 if (!BN_mul(n2, n1, n2, ctx)) ABORT;
227 if(!EC_POINT_mul(group, Q, NULL, P, n2, ctx)) ABORT;
228 if (0 != EC_POINT_cmp(group, Q, P, ctx)) ABORT;
229 fprintf(stdout, "ok\n");
230 EC_POINT_free(P);
231 EC_POINT_free(Q);
232 BN_free(n1);
233 BN_free(n2);
234 BN_free(order);
235 BN_CTX_free(ctx);
236 }
237
238static void prime_field_tests(void)
199 { 239 {
200 BN_CTX *ctx = NULL; 240 BN_CTX *ctx = NULL;
201 BIGNUM *p, *a, *b; 241 BIGNUM *p, *a, *b;
@@ -321,21 +361,21 @@ void prime_field_tests()
321 if (len == 0) ABORT; 361 if (len == 0) ABORT;
322 if (!EC_POINT_oct2point(group, P, buf, len, ctx)) ABORT; 362 if (!EC_POINT_oct2point(group, P, buf, len, ctx)) ABORT;
323 if (0 != EC_POINT_cmp(group, P, Q, ctx)) ABORT; 363 if (0 != EC_POINT_cmp(group, P, Q, ctx)) ABORT;
324 fprintf(stdout, "Generator as octect string, compressed form:\n "); 364 fprintf(stdout, "Generator as octet string, compressed form:\n ");
325 for (i = 0; i < len; i++) fprintf(stdout, "%02X", buf[i]); 365 for (i = 0; i < len; i++) fprintf(stdout, "%02X", buf[i]);
326 366
327 len = EC_POINT_point2oct(group, Q, POINT_CONVERSION_UNCOMPRESSED, buf, sizeof buf, ctx); 367 len = EC_POINT_point2oct(group, Q, POINT_CONVERSION_UNCOMPRESSED, buf, sizeof buf, ctx);
328 if (len == 0) ABORT; 368 if (len == 0) ABORT;
329 if (!EC_POINT_oct2point(group, P, buf, len, ctx)) ABORT; 369 if (!EC_POINT_oct2point(group, P, buf, len, ctx)) ABORT;
330 if (0 != EC_POINT_cmp(group, P, Q, ctx)) ABORT; 370 if (0 != EC_POINT_cmp(group, P, Q, ctx)) ABORT;
331 fprintf(stdout, "\nGenerator as octect string, uncompressed form:\n "); 371 fprintf(stdout, "\nGenerator as octet string, uncompressed form:\n ");
332 for (i = 0; i < len; i++) fprintf(stdout, "%02X", buf[i]); 372 for (i = 0; i < len; i++) fprintf(stdout, "%02X", buf[i]);
333 373
334 len = EC_POINT_point2oct(group, Q, POINT_CONVERSION_HYBRID, buf, sizeof buf, ctx); 374 len = EC_POINT_point2oct(group, Q, POINT_CONVERSION_HYBRID, buf, sizeof buf, ctx);
335 if (len == 0) ABORT; 375 if (len == 0) ABORT;
336 if (!EC_POINT_oct2point(group, P, buf, len, ctx)) ABORT; 376 if (!EC_POINT_oct2point(group, P, buf, len, ctx)) ABORT;
337 if (0 != EC_POINT_cmp(group, P, Q, ctx)) ABORT; 377 if (0 != EC_POINT_cmp(group, P, Q, ctx)) ABORT;
338 fprintf(stdout, "\nGenerator as octect string, hybrid form:\n "); 378 fprintf(stdout, "\nGenerator as octet string, hybrid form:\n ");
339 for (i = 0; i < len; i++) fprintf(stdout, "%02X", buf[i]); 379 for (i = 0; i < len; i++) fprintf(stdout, "%02X", buf[i]);
340 380
341 if (!EC_POINT_get_Jprojective_coordinates_GFp(group, R, x, y, z, ctx)) ABORT; 381 if (!EC_POINT_get_Jprojective_coordinates_GFp(group, R, x, y, z, ctx)) ABORT;
@@ -381,17 +421,7 @@ void prime_field_tests()
381 if (EC_GROUP_get_degree(group) != 160) ABORT; 421 if (EC_GROUP_get_degree(group) != 160) ABORT;
382 fprintf(stdout, " ok\n"); 422 fprintf(stdout, " ok\n");
383 423
384 fprintf(stdout, "verify group order ..."); 424 group_order_tests(group);
385 fflush(stdout);
386 if (!EC_GROUP_get_order(group, z, ctx)) ABORT;
387 if (!EC_POINT_mul(group, Q, z, NULL, NULL, ctx)) ABORT;
388 if (!EC_POINT_is_at_infinity(group, Q)) ABORT;
389 fprintf(stdout, ".");
390 fflush(stdout);
391 if (!EC_GROUP_precompute_mult(group, ctx)) ABORT;
392 if (!EC_POINT_mul(group, Q, z, NULL, NULL, ctx)) ABORT;
393 if (!EC_POINT_is_at_infinity(group, Q)) ABORT;
394 fprintf(stdout, " ok\n");
395 425
396 if (!(P_160 = EC_GROUP_new(EC_GROUP_method_of(group)))) ABORT; 426 if (!(P_160 = EC_GROUP_new(EC_GROUP_method_of(group)))) ABORT;
397 if (!EC_GROUP_copy(P_160, group)) ABORT; 427 if (!EC_GROUP_copy(P_160, group)) ABORT;
@@ -425,17 +455,7 @@ void prime_field_tests()
425 if (EC_GROUP_get_degree(group) != 192) ABORT; 455 if (EC_GROUP_get_degree(group) != 192) ABORT;
426 fprintf(stdout, " ok\n"); 456 fprintf(stdout, " ok\n");
427 457
428 fprintf(stdout, "verify group order ..."); 458 group_order_tests(group);
429 fflush(stdout);
430 if (!EC_GROUP_get_order(group, z, ctx)) ABORT;
431 if (!EC_POINT_mul(group, Q, z, NULL, NULL, ctx)) ABORT;
432 if (!EC_POINT_is_at_infinity(group, Q)) ABORT;
433 fprintf(stdout, ".");
434 fflush(stdout);
435 if (!EC_GROUP_precompute_mult(group, ctx)) ABORT;
436 if (!EC_POINT_mul(group, Q, z, NULL, NULL, ctx)) ABORT;
437 if (!EC_POINT_is_at_infinity(group, Q)) ABORT;
438 fprintf(stdout, " ok\n");
439 459
440 if (!(P_192 = EC_GROUP_new(EC_GROUP_method_of(group)))) ABORT; 460 if (!(P_192 = EC_GROUP_new(EC_GROUP_method_of(group)))) ABORT;
441 if (!EC_GROUP_copy(P_192, group)) ABORT; 461 if (!EC_GROUP_copy(P_192, group)) ABORT;
@@ -469,17 +489,7 @@ void prime_field_tests()
469 if (EC_GROUP_get_degree(group) != 224) ABORT; 489 if (EC_GROUP_get_degree(group) != 224) ABORT;
470 fprintf(stdout, " ok\n"); 490 fprintf(stdout, " ok\n");
471 491
472 fprintf(stdout, "verify group order ..."); 492 group_order_tests(group);
473 fflush(stdout);
474 if (!EC_GROUP_get_order(group, z, ctx)) ABORT;
475 if (!EC_POINT_mul(group, Q, z, NULL, NULL, ctx)) ABORT;
476 if (!EC_POINT_is_at_infinity(group, Q)) ABORT;
477 fprintf(stdout, ".");
478 fflush(stdout);
479 if (!EC_GROUP_precompute_mult(group, ctx)) ABORT;
480 if (!EC_POINT_mul(group, Q, z, NULL, NULL, ctx)) ABORT;
481 if (!EC_POINT_is_at_infinity(group, Q)) ABORT;
482 fprintf(stdout, " ok\n");
483 493
484 if (!(P_224 = EC_GROUP_new(EC_GROUP_method_of(group)))) ABORT; 494 if (!(P_224 = EC_GROUP_new(EC_GROUP_method_of(group)))) ABORT;
485 if (!EC_GROUP_copy(P_224, group)) ABORT; 495 if (!EC_GROUP_copy(P_224, group)) ABORT;
@@ -514,17 +524,7 @@ void prime_field_tests()
514 if (EC_GROUP_get_degree(group) != 256) ABORT; 524 if (EC_GROUP_get_degree(group) != 256) ABORT;
515 fprintf(stdout, " ok\n"); 525 fprintf(stdout, " ok\n");
516 526
517 fprintf(stdout, "verify group order ..."); 527 group_order_tests(group);
518 fflush(stdout);
519 if (!EC_GROUP_get_order(group, z, ctx)) ABORT;
520 if (!EC_POINT_mul(group, Q, z, NULL, NULL, ctx)) ABORT;
521 if (!EC_POINT_is_at_infinity(group, Q)) ABORT;
522 fprintf(stdout, ".");
523 fflush(stdout);
524 if (!EC_GROUP_precompute_mult(group, ctx)) ABORT;
525 if (!EC_POINT_mul(group, Q, z, NULL, NULL, ctx)) ABORT;
526 if (!EC_POINT_is_at_infinity(group, Q)) ABORT;
527 fprintf(stdout, " ok\n");
528 528
529 if (!(P_256 = EC_GROUP_new(EC_GROUP_method_of(group)))) ABORT; 529 if (!(P_256 = EC_GROUP_new(EC_GROUP_method_of(group)))) ABORT;
530 if (!EC_GROUP_copy(P_256, group)) ABORT; 530 if (!EC_GROUP_copy(P_256, group)) ABORT;
@@ -563,18 +563,8 @@ void prime_field_tests()
563 fprintf(stdout, "verify degree ..."); 563 fprintf(stdout, "verify degree ...");
564 if (EC_GROUP_get_degree(group) != 384) ABORT; 564 if (EC_GROUP_get_degree(group) != 384) ABORT;
565 fprintf(stdout, " ok\n"); 565 fprintf(stdout, " ok\n");
566 566
567 fprintf(stdout, "verify group order ..."); 567 group_order_tests(group);
568 fflush(stdout);
569 if (!EC_GROUP_get_order(group, z, ctx)) ABORT;
570 if (!EC_POINT_mul(group, Q, z, NULL, NULL, ctx)) ABORT;
571 if (!EC_POINT_is_at_infinity(group, Q)) ABORT;
572 fprintf(stdout, ".");
573 fflush(stdout);
574 if (!EC_GROUP_precompute_mult(group, ctx)) ABORT;
575 if (!EC_POINT_mul(group, Q, z, NULL, NULL, ctx)) ABORT;
576 if (!EC_POINT_is_at_infinity(group, Q)) ABORT;
577 fprintf(stdout, " ok\n");
578 568
579 if (!(P_384 = EC_GROUP_new(EC_GROUP_method_of(group)))) ABORT; 569 if (!(P_384 = EC_GROUP_new(EC_GROUP_method_of(group)))) ABORT;
580 if (!EC_GROUP_copy(P_384, group)) ABORT; 570 if (!EC_GROUP_copy(P_384, group)) ABORT;
@@ -619,18 +609,8 @@ void prime_field_tests()
619 fprintf(stdout, "verify degree ..."); 609 fprintf(stdout, "verify degree ...");
620 if (EC_GROUP_get_degree(group) != 521) ABORT; 610 if (EC_GROUP_get_degree(group) != 521) ABORT;
621 fprintf(stdout, " ok\n"); 611 fprintf(stdout, " ok\n");
622 612
623 fprintf(stdout, "verify group order ..."); 613 group_order_tests(group);
624 fflush(stdout);
625 if (!EC_GROUP_get_order(group, z, ctx)) ABORT;
626 if (!EC_POINT_mul(group, Q, z, NULL, NULL, ctx)) ABORT;
627 if (!EC_POINT_is_at_infinity(group, Q)) ABORT;
628 fprintf(stdout, ".");
629 fflush(stdout);
630 if (!EC_GROUP_precompute_mult(group, ctx)) ABORT;
631 if (!EC_POINT_mul(group, Q, z, NULL, NULL, ctx)) ABORT;
632 if (!EC_POINT_is_at_infinity(group, Q)) ABORT;
633 fprintf(stdout, " ok\n");
634 614
635 if (!(P_521 = EC_GROUP_new(EC_GROUP_method_of(group)))) ABORT; 615 if (!(P_521 = EC_GROUP_new(EC_GROUP_method_of(group)))) ABORT;
636 if (!EC_GROUP_copy(P_521, group)) ABORT; 616 if (!EC_GROUP_copy(P_521, group)) ABORT;
@@ -659,6 +639,7 @@ void prime_field_tests()
659 points[2] = Q; 639 points[2] = Q;
660 points[3] = Q; 640 points[3] = Q;
661 641
642 if (!EC_GROUP_get_order(group, z, ctx)) ABORT;
662 if (!BN_add(y, z, BN_value_one())) ABORT; 643 if (!BN_add(y, z, BN_value_one())) ABORT;
663 if (BN_is_odd(y)) ABORT; 644 if (BN_is_odd(y)) ABORT;
664 if (!BN_rshift1(y, y)) ABORT; 645 if (!BN_rshift1(y, y)) ABORT;
@@ -792,22 +773,14 @@ void prime_field_tests()
792 fprintf(stdout, "verify degree ..."); \ 773 fprintf(stdout, "verify degree ..."); \
793 if (EC_GROUP_get_degree(group) != _degree) ABORT; \ 774 if (EC_GROUP_get_degree(group) != _degree) ABORT; \
794 fprintf(stdout, " ok\n"); \ 775 fprintf(stdout, " ok\n"); \
795 fprintf(stdout, "verify group order ..."); \ 776 group_order_tests(group); \
796 fflush(stdout); \
797 if (!EC_GROUP_get_order(group, z, ctx)) ABORT; \
798 if (!EC_POINT_mul(group, Q, z, NULL, NULL, ctx)) ABORT; \
799 if (!EC_POINT_is_at_infinity(group, Q)) ABORT; \
800 fprintf(stdout, "."); \
801 fflush(stdout); \
802 if (!EC_GROUP_precompute_mult(group, ctx)) ABORT; \
803 if (!EC_POINT_mul(group, Q, z, NULL, NULL, ctx)) ABORT; \
804 if (!EC_POINT_is_at_infinity(group, Q)) ABORT; \
805 fprintf(stdout, " ok\n"); \
806 if (!(_variable = EC_GROUP_new(EC_GROUP_method_of(group)))) ABORT; \ 777 if (!(_variable = EC_GROUP_new(EC_GROUP_method_of(group)))) ABORT; \
807 if (!EC_GROUP_copy(_variable, group)) ABORT; 778 if (!EC_GROUP_copy(_variable, group)) ABORT; \
808 779
809void char2_field_tests() 780#ifndef OPENSSL_NO_EC2M
810 { 781
782static void char2_field_tests(void)
783 {
811 BN_CTX *ctx = NULL; 784 BN_CTX *ctx = NULL;
812 BIGNUM *p, *a, *b; 785 BIGNUM *p, *a, *b;
813 EC_GROUP *group; 786 EC_GROUP *group;
@@ -1239,8 +1212,9 @@ void char2_field_tests()
1239 if (C2_B571) EC_GROUP_free(C2_B571); 1212 if (C2_B571) EC_GROUP_free(C2_B571);
1240 1213
1241 } 1214 }
1215#endif
1242 1216
1243void internal_curve_test(void) 1217static void internal_curve_test(void)
1244 { 1218 {
1245 EC_builtin_curve *curves = NULL; 1219 EC_builtin_curve *curves = NULL;
1246 size_t crv_len = 0, n = 0; 1220 size_t crv_len = 0, n = 0;
@@ -1287,13 +1261,189 @@ void internal_curve_test(void)
1287 EC_GROUP_free(group); 1261 EC_GROUP_free(group);
1288 } 1262 }
1289 if (ok) 1263 if (ok)
1290 fprintf(stdout, " ok\n"); 1264 fprintf(stdout, " ok\n\n");
1291 else 1265 else
1292 fprintf(stdout, " failed\n"); 1266 {
1267 fprintf(stdout, " failed\n\n");
1268 ABORT;
1269 }
1293 OPENSSL_free(curves); 1270 OPENSSL_free(curves);
1294 return; 1271 return;
1295 } 1272 }
1296 1273
1274#ifndef OPENSSL_NO_EC_NISTP_64_GCC_128
1275/* nistp_test_params contains magic numbers for testing our optimized
1276 * implementations of several NIST curves with characteristic > 3. */
1277struct nistp_test_params
1278 {
1279 const EC_METHOD* (*meth) ();
1280 int degree;
1281 /* Qx, Qy and D are taken from
1282 * http://csrc.nist.gov/groups/ST/toolkit/documents/Examples/ECDSA_Prime.pdf
1283 * Otherwise, values are standard curve parameters from FIPS 180-3 */
1284 const char *p, *a, *b, *Qx, *Qy, *Gx, *Gy, *order, *d;
1285 };
1286
1287static const struct nistp_test_params nistp_tests_params[] =
1288 {
1289 {
1290 /* P-224 */
1291 EC_GFp_nistp224_method,
1292 224,
1293 "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000001", /* p */
1294 "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFE", /* a */
1295 "B4050A850C04B3ABF54132565044B0B7D7BFD8BA270B39432355FFB4", /* b */
1296 "E84FB0B8E7000CB657D7973CF6B42ED78B301674276DF744AF130B3E", /* Qx */
1297 "4376675C6FC5612C21A0FF2D2A89D2987DF7A2BC52183B5982298555", /* Qy */
1298 "B70E0CBD6BB4BF7F321390B94A03C1D356C21122343280D6115C1D21", /* Gx */
1299 "BD376388B5F723FB4C22DFE6CD4375A05A07476444D5819985007E34", /* Gy */
1300 "FFFFFFFFFFFFFFFFFFFFFFFFFFFF16A2E0B8F03E13DD29455C5C2A3D", /* order */
1301 "3F0C488E987C80BE0FEE521F8D90BE6034EC69AE11CA72AA777481E8", /* d */
1302 },
1303 {
1304 /* P-256 */
1305 EC_GFp_nistp256_method,
1306 256,
1307 "ffffffff00000001000000000000000000000000ffffffffffffffffffffffff", /* p */
1308 "ffffffff00000001000000000000000000000000fffffffffffffffffffffffc", /* a */
1309 "5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b", /* b */
1310 "b7e08afdfe94bad3f1dc8c734798ba1c62b3a0ad1e9ea2a38201cd0889bc7a19", /* Qx */
1311 "3603f747959dbf7a4bb226e41928729063adc7ae43529e61b563bbc606cc5e09", /* Qy */
1312 "6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296", /* Gx */
1313 "4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5", /* Gy */
1314 "ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551", /* order */
1315 "c477f9f65c22cce20657faa5b2d1d8122336f851a508a1ed04e479c34985bf96", /* d */
1316 },
1317 {
1318 /* P-521 */
1319 EC_GFp_nistp521_method,
1320 521,
1321 "1ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", /* p */
1322 "1fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc", /* a */
1323 "051953eb9618e1c9a1f929a21a0b68540eea2da725b99b315f3b8b489918ef109e156193951ec7e937b1652c0bd3bb1bf073573df883d2c34f1ef451fd46b503f00", /* b */
1324 "0098e91eef9a68452822309c52fab453f5f117c1da8ed796b255e9ab8f6410cca16e59df403a6bdc6ca467a37056b1e54b3005d8ac030decfeb68df18b171885d5c4", /* Qx */
1325 "0164350c321aecfc1cca1ba4364c9b15656150b4b78d6a48d7d28e7f31985ef17be8554376b72900712c4b83ad668327231526e313f5f092999a4632fd50d946bc2e", /* Qy */
1326 "c6858e06b70404e9cd9e3ecb662395b4429c648139053fb521f828af606b4d3dbaa14b5e77efe75928fe1dc127a2ffa8de3348b3c1856a429bf97e7e31c2e5bd66", /* Gx */
1327 "11839296a789a3bc0045c8a5fb42c7d1bd998f54449579b446817afbd17273e662c97ee72995ef42640c550b9013fad0761353c7086a272c24088be94769fd16650", /* Gy */
1328 "1fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa51868783bf2f966b7fcc0148f709a5d03bb5c9b8899c47aebb6fb71e91386409", /* order */
1329 "0100085f47b8e1b8b11b7eb33028c0b2888e304bfc98501955b45bba1478dc184eeedf09b86a5f7c21994406072787205e69a63709fe35aa93ba333514b24f961722", /* d */
1330 },
1331 };
1332
1333void nistp_single_test(const struct nistp_test_params *test)
1334 {
1335 BN_CTX *ctx;
1336 BIGNUM *p, *a, *b, *x, *y, *n, *m, *order;
1337 EC_GROUP *NISTP;
1338 EC_POINT *G, *P, *Q, *Q_CHECK;
1339
1340 fprintf(stdout, "\nNIST curve P-%d (optimised implementation):\n", test->degree);
1341 ctx = BN_CTX_new();
1342 p = BN_new();
1343 a = BN_new();
1344 b = BN_new();
1345 x = BN_new(); y = BN_new();
1346 m = BN_new(); n = BN_new(); order = BN_new();
1347
1348 NISTP = EC_GROUP_new(test->meth());
1349 if(!NISTP) ABORT;
1350 if (!BN_hex2bn(&p, test->p)) ABORT;
1351 if (1 != BN_is_prime_ex(p, BN_prime_checks, ctx, NULL)) ABORT;
1352 if (!BN_hex2bn(&a, test->a)) ABORT;
1353 if (!BN_hex2bn(&b, test->b)) ABORT;
1354 if (!EC_GROUP_set_curve_GFp(NISTP, p, a, b, ctx)) ABORT;
1355 G = EC_POINT_new(NISTP);
1356 P = EC_POINT_new(NISTP);
1357 Q = EC_POINT_new(NISTP);
1358 Q_CHECK = EC_POINT_new(NISTP);
1359 if(!BN_hex2bn(&x, test->Qx)) ABORT;
1360 if(!BN_hex2bn(&y, test->Qy)) ABORT;
1361 if(!EC_POINT_set_affine_coordinates_GFp(NISTP, Q_CHECK, x, y, ctx)) ABORT;
1362 if (!BN_hex2bn(&x, test->Gx)) ABORT;
1363 if (!BN_hex2bn(&y, test->Gy)) ABORT;
1364 if (!EC_POINT_set_affine_coordinates_GFp(NISTP, G, x, y, ctx)) ABORT;
1365 if (!BN_hex2bn(&order, test->order)) ABORT;
1366 if (!EC_GROUP_set_generator(NISTP, G, order, BN_value_one())) ABORT;
1367
1368 fprintf(stdout, "verify degree ... ");
1369 if (EC_GROUP_get_degree(NISTP) != test->degree) ABORT;
1370 fprintf(stdout, "ok\n");
1371
1372 fprintf(stdout, "NIST test vectors ... ");
1373 if (!BN_hex2bn(&n, test->d)) ABORT;
1374 /* fixed point multiplication */
1375 EC_POINT_mul(NISTP, Q, n, NULL, NULL, ctx);
1376 if (0 != EC_POINT_cmp(NISTP, Q, Q_CHECK, ctx)) ABORT;
1377 /* random point multiplication */
1378 EC_POINT_mul(NISTP, Q, NULL, G, n, ctx);
1379 if (0 != EC_POINT_cmp(NISTP, Q, Q_CHECK, ctx)) ABORT;
1380
1381 /* set generator to P = 2*G, where G is the standard generator */
1382 if (!EC_POINT_dbl(NISTP, P, G, ctx)) ABORT;
1383 if (!EC_GROUP_set_generator(NISTP, P, order, BN_value_one())) ABORT;
1384 /* set the scalar to m=n/2, where n is the NIST test scalar */
1385 if (!BN_rshift(m, n, 1)) ABORT;
1386
1387 /* test the non-standard generator */
1388 /* fixed point multiplication */
1389 EC_POINT_mul(NISTP, Q, m, NULL, NULL, ctx);
1390 if (0 != EC_POINT_cmp(NISTP, Q, Q_CHECK, ctx)) ABORT;
1391 /* random point multiplication */
1392 EC_POINT_mul(NISTP, Q, NULL, P, m, ctx);
1393 if (0 != EC_POINT_cmp(NISTP, Q, Q_CHECK, ctx)) ABORT;
1394
1395 /* now repeat all tests with precomputation */
1396 if (!EC_GROUP_precompute_mult(NISTP, ctx)) ABORT;
1397
1398 /* fixed point multiplication */
1399 EC_POINT_mul(NISTP, Q, m, NULL, NULL, ctx);
1400 if (0 != EC_POINT_cmp(NISTP, Q, Q_CHECK, ctx)) ABORT;
1401 /* random point multiplication */
1402 EC_POINT_mul(NISTP, Q, NULL, P, m, ctx);
1403 if (0 != EC_POINT_cmp(NISTP, Q, Q_CHECK, ctx)) ABORT;
1404
1405 /* reset generator */
1406 if (!EC_GROUP_set_generator(NISTP, G, order, BN_value_one())) ABORT;
1407 /* fixed point multiplication */
1408 EC_POINT_mul(NISTP, Q, n, NULL, NULL, ctx);
1409 if (0 != EC_POINT_cmp(NISTP, Q, Q_CHECK, ctx)) ABORT;
1410 /* random point multiplication */
1411 EC_POINT_mul(NISTP, Q, NULL, G, n, ctx);
1412 if (0 != EC_POINT_cmp(NISTP, Q, Q_CHECK, ctx)) ABORT;
1413
1414 fprintf(stdout, "ok\n");
1415 group_order_tests(NISTP);
1416#if 0
1417 timings(NISTP, TIMING_BASE_PT, ctx);
1418 timings(NISTP, TIMING_RAND_PT, ctx);
1419#endif
1420 EC_GROUP_free(NISTP);
1421 EC_POINT_free(G);
1422 EC_POINT_free(P);
1423 EC_POINT_free(Q);
1424 EC_POINT_free(Q_CHECK);
1425 BN_free(n);
1426 BN_free(m);
1427 BN_free(p);
1428 BN_free(a);
1429 BN_free(b);
1430 BN_free(x);
1431 BN_free(y);
1432 BN_free(order);
1433 BN_CTX_free(ctx);
1434 }
1435
1436void nistp_tests()
1437 {
1438 unsigned i;
1439
1440 for (i = 0; i < sizeof(nistp_tests_params) / sizeof(struct nistp_test_params); i++)
1441 {
1442 nistp_single_test(&nistp_tests_params[i]);
1443 }
1444 }
1445#endif
1446
1297static const char rnd_seed[] = "string to make the random number generator think it has entropy"; 1447static const char rnd_seed[] = "string to make the random number generator think it has entropy";
1298 1448
1299int main(int argc, char *argv[]) 1449int main(int argc, char *argv[])
@@ -1317,7 +1467,12 @@ int main(int argc, char *argv[])
1317 1467
1318 prime_field_tests(); 1468 prime_field_tests();
1319 puts(""); 1469 puts("");
1470#ifndef OPENSSL_NO_EC2M
1320 char2_field_tests(); 1471 char2_field_tests();
1472#endif
1473#ifndef OPENSSL_NO_EC_NISTP_64_GCC_128
1474 nistp_tests();
1475#endif
1321 /* test the internal curves */ 1476 /* test the internal curves */
1322 internal_curve_test(); 1477 internal_curve_test();
1323 1478
diff --git a/src/lib/libcrypto/engine/Makefile b/src/lib/libcrypto/engine/Makefile
index 9c214824eb..d29bdd09a0 100644
--- a/src/lib/libcrypto/engine/Makefile
+++ b/src/lib/libcrypto/engine/Makefile
@@ -21,12 +21,14 @@ LIBSRC= eng_err.c eng_lib.c eng_list.c eng_init.c eng_ctrl.c \
21 eng_table.c eng_pkey.c eng_fat.c eng_all.c \ 21 eng_table.c eng_pkey.c eng_fat.c eng_all.c \
22 tb_rsa.c tb_dsa.c tb_ecdsa.c tb_dh.c tb_ecdh.c tb_rand.c tb_store.c \ 22 tb_rsa.c tb_dsa.c tb_ecdsa.c tb_dh.c tb_ecdh.c tb_rand.c tb_store.c \
23 tb_cipher.c tb_digest.c tb_pkmeth.c tb_asnmth.c \ 23 tb_cipher.c tb_digest.c tb_pkmeth.c tb_asnmth.c \
24 eng_openssl.c eng_cnf.c eng_dyn.c eng_cryptodev.c 24 eng_openssl.c eng_cnf.c eng_dyn.c eng_cryptodev.c \
25 eng_rsax.c eng_rdrand.c
25LIBOBJ= eng_err.o eng_lib.o eng_list.o eng_init.o eng_ctrl.o \ 26LIBOBJ= eng_err.o eng_lib.o eng_list.o eng_init.o eng_ctrl.o \
26 eng_table.o eng_pkey.o eng_fat.o eng_all.o \ 27 eng_table.o eng_pkey.o eng_fat.o eng_all.o \
27 tb_rsa.o tb_dsa.o tb_ecdsa.o tb_dh.o tb_ecdh.o tb_rand.o tb_store.o \ 28 tb_rsa.o tb_dsa.o tb_ecdsa.o tb_dh.o tb_ecdh.o tb_rand.o tb_store.o \
28 tb_cipher.o tb_digest.o tb_pkmeth.o tb_asnmth.o \ 29 tb_cipher.o tb_digest.o tb_pkmeth.o tb_asnmth.o \
29 eng_openssl.o eng_cnf.o eng_dyn.o eng_cryptodev.o 30 eng_openssl.o eng_cnf.o eng_dyn.o eng_cryptodev.o \
31 eng_rsax.o eng_rdrand.o
30 32
31SRC= $(LIBSRC) 33SRC= $(LIBSRC)
32 34
@@ -249,6 +251,34 @@ eng_pkey.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
249eng_pkey.o: ../../include/openssl/sha.h ../../include/openssl/stack.h 251eng_pkey.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
250eng_pkey.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h 252eng_pkey.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
251eng_pkey.o: ../../include/openssl/x509_vfy.h ../cryptlib.h eng_int.h eng_pkey.c 253eng_pkey.o: ../../include/openssl/x509_vfy.h ../cryptlib.h eng_int.h eng_pkey.c
254eng_rdrand.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
255eng_rdrand.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
256eng_rdrand.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
257eng_rdrand.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
258eng_rdrand.o: ../../include/openssl/engine.h ../../include/openssl/err.h
259eng_rdrand.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h
260eng_rdrand.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
261eng_rdrand.o: ../../include/openssl/opensslconf.h
262eng_rdrand.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
263eng_rdrand.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h
264eng_rdrand.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
265eng_rdrand.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
266eng_rdrand.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
267eng_rdrand.o: eng_rdrand.c
268eng_rsax.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
269eng_rsax.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
270eng_rsax.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
271eng_rsax.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
272eng_rsax.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h
273eng_rsax.o: ../../include/openssl/err.h ../../include/openssl/evp.h
274eng_rsax.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
275eng_rsax.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
276eng_rsax.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
277eng_rsax.o: ../../include/openssl/pkcs7.h ../../include/openssl/rsa.h
278eng_rsax.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
279eng_rsax.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
280eng_rsax.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
281eng_rsax.o: eng_rsax.c
252eng_table.o: ../../e_os.h ../../include/openssl/asn1.h 282eng_table.o: ../../e_os.h ../../include/openssl/asn1.h
253eng_table.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h 283eng_table.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
254eng_table.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h 284eng_table.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
diff --git a/src/lib/libcrypto/engine/eng_cryptodev.c b/src/lib/libcrypto/engine/eng_cryptodev.c
index 52f4ca3901..5a715aca4f 100644
--- a/src/lib/libcrypto/engine/eng_cryptodev.c
+++ b/src/lib/libcrypto/engine/eng_cryptodev.c
@@ -79,8 +79,6 @@ struct dev_crypto_state {
79 unsigned char digest_res[HASH_MAX_LEN]; 79 unsigned char digest_res[HASH_MAX_LEN];
80 char *mac_data; 80 char *mac_data;
81 int mac_len; 81 int mac_len;
82
83 int copy;
84#endif 82#endif
85}; 83};
86 84
@@ -200,6 +198,7 @@ get_dev_crypto(void)
200 198
201 if ((fd = open_dev_crypto()) == -1) 199 if ((fd = open_dev_crypto()) == -1)
202 return (-1); 200 return (-1);
201#ifndef CRIOGET_NOT_NEEDED
203 if (ioctl(fd, CRIOGET, &retfd) == -1) 202 if (ioctl(fd, CRIOGET, &retfd) == -1)
204 return (-1); 203 return (-1);
205 204
@@ -208,9 +207,19 @@ get_dev_crypto(void)
208 close(retfd); 207 close(retfd);
209 return (-1); 208 return (-1);
210 } 209 }
210#else
211 retfd = fd;
212#endif
211 return (retfd); 213 return (retfd);
212} 214}
213 215
216static void put_dev_crypto(int fd)
217{
218#ifndef CRIOGET_NOT_NEEDED
219 close(fd);
220#endif
221}
222
214/* Caching version for asym operations */ 223/* Caching version for asym operations */
215static int 224static int
216get_asym_dev_crypto(void) 225get_asym_dev_crypto(void)
@@ -252,7 +261,7 @@ get_cryptodev_ciphers(const int **cnids)
252 ioctl(fd, CIOCFSESSION, &sess.ses) != -1) 261 ioctl(fd, CIOCFSESSION, &sess.ses) != -1)
253 nids[count++] = ciphers[i].nid; 262 nids[count++] = ciphers[i].nid;
254 } 263 }
255 close(fd); 264 put_dev_crypto(fd);
256 265
257 if (count > 0) 266 if (count > 0)
258 *cnids = nids; 267 *cnids = nids;
@@ -291,7 +300,7 @@ get_cryptodev_digests(const int **cnids)
291 ioctl(fd, CIOCFSESSION, &sess.ses) != -1) 300 ioctl(fd, CIOCFSESSION, &sess.ses) != -1)
292 nids[count++] = digests[i].nid; 301 nids[count++] = digests[i].nid;
293 } 302 }
294 close(fd); 303 put_dev_crypto(fd);
295 304
296 if (count > 0) 305 if (count > 0)
297 *cnids = nids; 306 *cnids = nids;
@@ -436,7 +445,7 @@ cryptodev_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
436 sess->cipher = cipher; 445 sess->cipher = cipher;
437 446
438 if (ioctl(state->d_fd, CIOCGSESSION, sess) == -1) { 447 if (ioctl(state->d_fd, CIOCGSESSION, sess) == -1) {
439 close(state->d_fd); 448 put_dev_crypto(state->d_fd);
440 state->d_fd = -1; 449 state->d_fd = -1;
441 return (0); 450 return (0);
442 } 451 }
@@ -473,7 +482,7 @@ cryptodev_cleanup(EVP_CIPHER_CTX *ctx)
473 } else { 482 } else {
474 ret = 1; 483 ret = 1;
475 } 484 }
476 close(state->d_fd); 485 put_dev_crypto(state->d_fd);
477 state->d_fd = -1; 486 state->d_fd = -1;
478 487
479 return (ret); 488 return (ret);
@@ -686,7 +695,7 @@ static int cryptodev_digest_init(EVP_MD_CTX *ctx)
686 sess->mac = digest; 695 sess->mac = digest;
687 696
688 if (ioctl(state->d_fd, CIOCGSESSION, sess) < 0) { 697 if (ioctl(state->d_fd, CIOCGSESSION, sess) < 0) {
689 close(state->d_fd); 698 put_dev_crypto(state->d_fd);
690 state->d_fd = -1; 699 state->d_fd = -1;
691 printf("cryptodev_digest_init: Open session failed\n"); 700 printf("cryptodev_digest_init: Open session failed\n");
692 return (0); 701 return (0);
@@ -758,14 +767,12 @@ static int cryptodev_digest_final(EVP_MD_CTX *ctx, unsigned char *md)
758 if (! (ctx->flags & EVP_MD_CTX_FLAG_ONESHOT) ) { 767 if (! (ctx->flags & EVP_MD_CTX_FLAG_ONESHOT) ) {
759 /* if application doesn't support one buffer */ 768 /* if application doesn't support one buffer */
760 memset(&cryp, 0, sizeof(cryp)); 769 memset(&cryp, 0, sizeof(cryp));
761
762 cryp.ses = sess->ses; 770 cryp.ses = sess->ses;
763 cryp.flags = 0; 771 cryp.flags = 0;
764 cryp.len = state->mac_len; 772 cryp.len = state->mac_len;
765 cryp.src = state->mac_data; 773 cryp.src = state->mac_data;
766 cryp.dst = NULL; 774 cryp.dst = NULL;
767 cryp.mac = (caddr_t)md; 775 cryp.mac = (caddr_t)md;
768
769 if (ioctl(state->d_fd, CIOCCRYPT, &cryp) < 0) { 776 if (ioctl(state->d_fd, CIOCCRYPT, &cryp) < 0) {
770 printf("cryptodev_digest_final: digest failed\n"); 777 printf("cryptodev_digest_final: digest failed\n");
771 return (0); 778 return (0);
@@ -786,6 +793,9 @@ static int cryptodev_digest_cleanup(EVP_MD_CTX *ctx)
786 struct dev_crypto_state *state = ctx->md_data; 793 struct dev_crypto_state *state = ctx->md_data;
787 struct session_op *sess = &state->d_sess; 794 struct session_op *sess = &state->d_sess;
788 795
796 if (state == NULL)
797 return 0;
798
789 if (state->d_fd < 0) { 799 if (state->d_fd < 0) {
790 printf("cryptodev_digest_cleanup: illegal input\n"); 800 printf("cryptodev_digest_cleanup: illegal input\n");
791 return (0); 801 return (0);
@@ -797,16 +807,13 @@ static int cryptodev_digest_cleanup(EVP_MD_CTX *ctx)
797 state->mac_len = 0; 807 state->mac_len = 0;
798 } 808 }
799 809
800 if (state->copy)
801 return 1;
802
803 if (ioctl(state->d_fd, CIOCFSESSION, &sess->ses) < 0) { 810 if (ioctl(state->d_fd, CIOCFSESSION, &sess->ses) < 0) {
804 printf("cryptodev_digest_cleanup: failed to close session\n"); 811 printf("cryptodev_digest_cleanup: failed to close session\n");
805 ret = 0; 812 ret = 0;
806 } else { 813 } else {
807 ret = 1; 814 ret = 1;
808 } 815 }
809 close(state->d_fd); 816 put_dev_crypto(state->d_fd);
810 state->d_fd = -1; 817 state->d_fd = -1;
811 818
812 return (ret); 819 return (ret);
@@ -816,15 +823,39 @@ static int cryptodev_digest_copy(EVP_MD_CTX *to,const EVP_MD_CTX *from)
816{ 823{
817 struct dev_crypto_state *fstate = from->md_data; 824 struct dev_crypto_state *fstate = from->md_data;
818 struct dev_crypto_state *dstate = to->md_data; 825 struct dev_crypto_state *dstate = to->md_data;
826 struct session_op *sess;
827 int digest;
819 828
820 memcpy(dstate, fstate, sizeof(struct dev_crypto_state)); 829 if (dstate == NULL || fstate == NULL)
830 return 1;
821 831
822 if (fstate->mac_len != 0) { 832 memcpy(dstate, fstate, sizeof(struct dev_crypto_state));
823 dstate->mac_data = OPENSSL_malloc(fstate->mac_len); 833
824 memcpy(dstate->mac_data, fstate->mac_data, fstate->mac_len); 834 sess = &dstate->d_sess;
835
836 digest = digest_nid_to_cryptodev(to->digest->type);
837
838 sess->mackey = dstate->dummy_mac_key;
839 sess->mackeylen = digest_key_length(to->digest->type);
840 sess->mac = digest;
841
842 dstate->d_fd = get_dev_crypto();
843
844 if (ioctl(dstate->d_fd, CIOCGSESSION, sess) < 0) {
845 put_dev_crypto(dstate->d_fd);
846 dstate->d_fd = -1;
847 printf("cryptodev_digest_init: Open session failed\n");
848 return (0);
825 } 849 }
826 850
827 dstate->copy = 1; 851 if (fstate->mac_len != 0) {
852 if (fstate->mac_data != NULL)
853 {
854 dstate->mac_data = OPENSSL_malloc(fstate->mac_len);
855 memcpy(dstate->mac_data, fstate->mac_data, fstate->mac_len);
856 dstate->mac_len = fstate->mac_len;
857 }
858 }
828 859
829 return 1; 860 return 1;
830} 861}
@@ -1347,11 +1378,11 @@ ENGINE_load_cryptodev(void)
1347 * find out what asymmetric crypto algorithms we support 1378 * find out what asymmetric crypto algorithms we support
1348 */ 1379 */
1349 if (ioctl(fd, CIOCASYMFEAT, &cryptodev_asymfeat) == -1) { 1380 if (ioctl(fd, CIOCASYMFEAT, &cryptodev_asymfeat) == -1) {
1350 close(fd); 1381 put_dev_crypto(fd);
1351 ENGINE_free(engine); 1382 ENGINE_free(engine);
1352 return; 1383 return;
1353 } 1384 }
1354 close(fd); 1385 put_dev_crypto(fd);
1355 1386
1356 if (!ENGINE_set_id(engine, "cryptodev") || 1387 if (!ENGINE_set_id(engine, "cryptodev") ||
1357 !ENGINE_set_name(engine, "BSD cryptodev engine") || 1388 !ENGINE_set_name(engine, "BSD cryptodev engine") ||
diff --git a/src/lib/libcrypto/evp/Makefile b/src/lib/libcrypto/evp/Makefile
index 82825e5299..0fe1b96bff 100644
--- a/src/lib/libcrypto/evp/Makefile
+++ b/src/lib/libcrypto/evp/Makefile
@@ -28,7 +28,8 @@ LIBSRC= encode.c digest.c evp_enc.c evp_key.c evp_acnf.c \
28 bio_md.c bio_b64.c bio_enc.c evp_err.c e_null.c \ 28 bio_md.c bio_b64.c bio_enc.c evp_err.c e_null.c \
29 c_all.c c_allc.c c_alld.c evp_lib.c bio_ok.c \ 29 c_all.c c_allc.c c_alld.c evp_lib.c bio_ok.c \
30 evp_pkey.c evp_pbe.c p5_crpt.c p5_crpt2.c \ 30 evp_pkey.c evp_pbe.c p5_crpt.c p5_crpt2.c \
31 e_old.c pmeth_lib.c pmeth_fn.c pmeth_gn.c m_sigver.c 31 e_old.c pmeth_lib.c pmeth_fn.c pmeth_gn.c m_sigver.c evp_fips.c \
32 e_aes_cbc_hmac_sha1.c e_rc4_hmac_md5.c
32 33
33LIBOBJ= encode.o digest.o evp_enc.o evp_key.o evp_acnf.o \ 34LIBOBJ= encode.o digest.o evp_enc.o evp_key.o evp_acnf.o \
34 e_des.o e_bf.o e_idea.o e_des3.o e_camellia.o\ 35 e_des.o e_bf.o e_idea.o e_des3.o e_camellia.o\
@@ -40,7 +41,8 @@ LIBOBJ= encode.o digest.o evp_enc.o evp_key.o evp_acnf.o \
40 bio_md.o bio_b64.o bio_enc.o evp_err.o e_null.o \ 41 bio_md.o bio_b64.o bio_enc.o evp_err.o e_null.o \
41 c_all.o c_allc.o c_alld.o evp_lib.o bio_ok.o \ 42 c_all.o c_allc.o c_alld.o evp_lib.o bio_ok.o \
42 evp_pkey.o evp_pbe.o p5_crpt.o p5_crpt2.o \ 43 evp_pkey.o evp_pbe.o p5_crpt.o p5_crpt2.o \
43 e_old.o pmeth_lib.o pmeth_fn.o pmeth_gn.o m_sigver.o 44 e_old.o pmeth_lib.o pmeth_fn.o pmeth_gn.o m_sigver.o evp_fips.o \
45 e_aes_cbc_hmac_sha1.o e_rc4_hmac_md5.o
44 46
45SRC= $(LIBSRC) 47SRC= $(LIBSRC)
46 48
@@ -189,11 +191,27 @@ e_aes.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h
189e_aes.o: ../../include/openssl/bio.h ../../include/openssl/crypto.h 191e_aes.o: ../../include/openssl/bio.h ../../include/openssl/crypto.h
190e_aes.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h 192e_aes.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
191e_aes.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h 193e_aes.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h
192e_aes.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h 194e_aes.o: ../../include/openssl/modes.h ../../include/openssl/obj_mac.h
193e_aes.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h 195e_aes.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
194e_aes.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h 196e_aes.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
195e_aes.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h e_aes.c 197e_aes.o: ../../include/openssl/rand.h ../../include/openssl/safestack.h
196e_aes.o: evp_locl.h 198e_aes.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
199e_aes.o: ../modes/modes_lcl.h e_aes.c evp_locl.h
200e_aes_cbc_hmac_sha1.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h
201e_aes_cbc_hmac_sha1.o: ../../include/openssl/bio.h
202e_aes_cbc_hmac_sha1.o: ../../include/openssl/crypto.h
203e_aes_cbc_hmac_sha1.o: ../../include/openssl/e_os2.h
204e_aes_cbc_hmac_sha1.o: ../../include/openssl/evp.h
205e_aes_cbc_hmac_sha1.o: ../../include/openssl/obj_mac.h
206e_aes_cbc_hmac_sha1.o: ../../include/openssl/objects.h
207e_aes_cbc_hmac_sha1.o: ../../include/openssl/opensslconf.h
208e_aes_cbc_hmac_sha1.o: ../../include/openssl/opensslv.h
209e_aes_cbc_hmac_sha1.o: ../../include/openssl/ossl_typ.h
210e_aes_cbc_hmac_sha1.o: ../../include/openssl/safestack.h
211e_aes_cbc_hmac_sha1.o: ../../include/openssl/sha.h
212e_aes_cbc_hmac_sha1.o: ../../include/openssl/stack.h
213e_aes_cbc_hmac_sha1.o: ../../include/openssl/symhacks.h e_aes_cbc_hmac_sha1.c
214e_aes_cbc_hmac_sha1.o: evp_locl.h
197e_bf.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h 215e_bf.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
198e_bf.o: ../../include/openssl/blowfish.h ../../include/openssl/buffer.h 216e_bf.o: ../../include/openssl/blowfish.h ../../include/openssl/buffer.h
199e_bf.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h 217e_bf.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
@@ -279,7 +297,18 @@ e_rc4.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
279e_rc4.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h 297e_rc4.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
280e_rc4.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rc4.h 298e_rc4.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rc4.h
281e_rc4.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h 299e_rc4.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
282e_rc4.o: ../../include/openssl/symhacks.h ../cryptlib.h e_rc4.c 300e_rc4.o: ../../include/openssl/symhacks.h ../cryptlib.h e_rc4.c evp_locl.h
301e_rc4_hmac_md5.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
302e_rc4_hmac_md5.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
303e_rc4_hmac_md5.o: ../../include/openssl/evp.h ../../include/openssl/md5.h
304e_rc4_hmac_md5.o: ../../include/openssl/obj_mac.h
305e_rc4_hmac_md5.o: ../../include/openssl/objects.h
306e_rc4_hmac_md5.o: ../../include/openssl/opensslconf.h
307e_rc4_hmac_md5.o: ../../include/openssl/opensslv.h
308e_rc4_hmac_md5.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rc4.h
309e_rc4_hmac_md5.o: ../../include/openssl/safestack.h
310e_rc4_hmac_md5.o: ../../include/openssl/stack.h
311e_rc4_hmac_md5.o: ../../include/openssl/symhacks.h e_rc4_hmac_md5.c
283e_rc5.o: ../../e_os.h ../../include/openssl/bio.h 312e_rc5.o: ../../e_os.h ../../include/openssl/bio.h
284e_rc5.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 313e_rc5.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
285e_rc5.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h 314e_rc5.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
@@ -349,6 +378,13 @@ evp_err.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
349evp_err.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 378evp_err.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
350evp_err.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h 379evp_err.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
351evp_err.o: ../../include/openssl/symhacks.h evp_err.c 380evp_err.o: ../../include/openssl/symhacks.h evp_err.c
381evp_fips.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
382evp_fips.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
383evp_fips.o: ../../include/openssl/evp.h ../../include/openssl/obj_mac.h
384evp_fips.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
385evp_fips.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
386evp_fips.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
387evp_fips.o: ../../include/openssl/symhacks.h evp_fips.c
352evp_key.o: ../../e_os.h ../../include/openssl/asn1.h 388evp_key.o: ../../e_os.h ../../include/openssl/asn1.h
353evp_key.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h 389evp_key.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
354evp_key.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h 390evp_key.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
@@ -383,7 +419,7 @@ evp_pbe.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs12.h
383evp_pbe.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h 419evp_pbe.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
384evp_pbe.o: ../../include/openssl/sha.h ../../include/openssl/stack.h 420evp_pbe.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
385evp_pbe.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h 421evp_pbe.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
386evp_pbe.o: ../../include/openssl/x509_vfy.h ../cryptlib.h evp_pbe.c 422evp_pbe.o: ../../include/openssl/x509_vfy.h ../cryptlib.h evp_locl.h evp_pbe.c
387evp_pkey.o: ../../e_os.h ../../include/openssl/asn1.h 423evp_pkey.o: ../../e_os.h ../../include/openssl/asn1.h
388evp_pkey.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h 424evp_pkey.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
389evp_pkey.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h 425evp_pkey.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
@@ -456,7 +492,7 @@ m_md4.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
456m_md4.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h 492m_md4.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
457m_md4.o: ../../include/openssl/sha.h ../../include/openssl/stack.h 493m_md4.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
458m_md4.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h 494m_md4.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
459m_md4.o: ../../include/openssl/x509_vfy.h ../cryptlib.h m_md4.c 495m_md4.o: ../../include/openssl/x509_vfy.h ../cryptlib.h evp_locl.h m_md4.c
460m_md5.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h 496m_md5.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
461m_md5.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 497m_md5.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
462m_md5.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h 498m_md5.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
@@ -469,7 +505,7 @@ m_md5.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
469m_md5.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h 505m_md5.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
470m_md5.o: ../../include/openssl/sha.h ../../include/openssl/stack.h 506m_md5.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
471m_md5.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h 507m_md5.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
472m_md5.o: ../../include/openssl/x509_vfy.h ../cryptlib.h m_md5.c 508m_md5.o: ../../include/openssl/x509_vfy.h ../cryptlib.h evp_locl.h m_md5.c
473m_mdc2.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h 509m_mdc2.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
474m_mdc2.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 510m_mdc2.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
475m_mdc2.o: ../../include/openssl/des.h ../../include/openssl/des_old.h 511m_mdc2.o: ../../include/openssl/des.h ../../include/openssl/des_old.h
@@ -484,7 +520,7 @@ m_mdc2.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
484m_mdc2.o: ../../include/openssl/sha.h ../../include/openssl/stack.h 520m_mdc2.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
485m_mdc2.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h 521m_mdc2.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
486m_mdc2.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h 522m_mdc2.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h
487m_mdc2.o: ../../include/openssl/x509_vfy.h ../cryptlib.h m_mdc2.c 523m_mdc2.o: ../../include/openssl/x509_vfy.h ../cryptlib.h evp_locl.h m_mdc2.c
488m_null.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h 524m_null.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
489m_null.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 525m_null.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
490m_null.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h 526m_null.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
@@ -510,7 +546,8 @@ m_ripemd.o: ../../include/openssl/pkcs7.h ../../include/openssl/ripemd.h
510m_ripemd.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h 546m_ripemd.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
511m_ripemd.o: ../../include/openssl/sha.h ../../include/openssl/stack.h 547m_ripemd.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
512m_ripemd.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h 548m_ripemd.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
513m_ripemd.o: ../../include/openssl/x509_vfy.h ../cryptlib.h m_ripemd.c 549m_ripemd.o: ../../include/openssl/x509_vfy.h ../cryptlib.h evp_locl.h
550m_ripemd.o: m_ripemd.c
514m_sha.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h 551m_sha.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
515m_sha.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 552m_sha.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
516m_sha.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h 553m_sha.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
@@ -523,7 +560,7 @@ m_sha.o: ../../include/openssl/pkcs7.h ../../include/openssl/rsa.h
523m_sha.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h 560m_sha.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
524m_sha.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h 561m_sha.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
525m_sha.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h 562m_sha.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
526m_sha.o: ../cryptlib.h m_sha.c 563m_sha.o: ../cryptlib.h evp_locl.h m_sha.c
527m_sha1.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h 564m_sha1.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
528m_sha1.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 565m_sha1.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
529m_sha1.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h 566m_sha1.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
@@ -563,7 +600,7 @@ m_wp.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
563m_wp.o: ../../include/openssl/sha.h ../../include/openssl/stack.h 600m_wp.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
564m_wp.o: ../../include/openssl/symhacks.h ../../include/openssl/whrlpool.h 601m_wp.o: ../../include/openssl/symhacks.h ../../include/openssl/whrlpool.h
565m_wp.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h 602m_wp.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
566m_wp.o: ../cryptlib.h m_wp.c 603m_wp.o: ../cryptlib.h evp_locl.h m_wp.c
567names.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h 604names.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
568names.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 605names.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
569names.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h 606names.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
@@ -601,7 +638,8 @@ p5_crpt2.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
601p5_crpt2.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h 638p5_crpt2.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
602p5_crpt2.o: ../../include/openssl/sha.h ../../include/openssl/stack.h 639p5_crpt2.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
603p5_crpt2.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h 640p5_crpt2.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
604p5_crpt2.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p5_crpt2.c 641p5_crpt2.o: ../../include/openssl/x509_vfy.h ../cryptlib.h evp_locl.h
642p5_crpt2.o: p5_crpt2.c
605p_dec.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h 643p_dec.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
606p_dec.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 644p_dec.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
607p_dec.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h 645p_dec.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
diff --git a/src/lib/libcrypto/evp/bio_ok.c b/src/lib/libcrypto/evp/bio_ok.c
index 98bc1ab409..e64335353f 100644
--- a/src/lib/libcrypto/evp/bio_ok.c
+++ b/src/lib/libcrypto/evp/bio_ok.c
@@ -133,10 +133,10 @@ static int ok_new(BIO *h);
133static int ok_free(BIO *data); 133static int ok_free(BIO *data);
134static long ok_callback_ctrl(BIO *h, int cmd, bio_info_cb *fp); 134static long ok_callback_ctrl(BIO *h, int cmd, bio_info_cb *fp);
135 135
136static void sig_out(BIO* b); 136static int sig_out(BIO* b);
137static void sig_in(BIO* b); 137static int sig_in(BIO* b);
138static void block_out(BIO* b); 138static int block_out(BIO* b);
139static void block_in(BIO* b); 139static int block_in(BIO* b);
140#define OK_BLOCK_SIZE (1024*4) 140#define OK_BLOCK_SIZE (1024*4)
141#define OK_BLOCK_BLOCK 4 141#define OK_BLOCK_BLOCK 4
142#define IOBS (OK_BLOCK_SIZE+ OK_BLOCK_BLOCK+ 3*EVP_MAX_MD_SIZE) 142#define IOBS (OK_BLOCK_SIZE+ OK_BLOCK_BLOCK+ 3*EVP_MAX_MD_SIZE)
@@ -266,10 +266,24 @@ static int ok_read(BIO *b, char *out, int outl)
266 ctx->buf_len+= i; 266 ctx->buf_len+= i;
267 267
268 /* no signature yet -- check if we got one */ 268 /* no signature yet -- check if we got one */
269 if (ctx->sigio == 1) sig_in(b); 269 if (ctx->sigio == 1)
270 {
271 if (!sig_in(b))
272 {
273 BIO_clear_retry_flags(b);
274 return 0;
275 }
276 }
270 277
271 /* signature ok -- check if we got block */ 278 /* signature ok -- check if we got block */
272 if (ctx->sigio == 0) block_in(b); 279 if (ctx->sigio == 0)
280 {
281 if (!block_in(b))
282 {
283 BIO_clear_retry_flags(b);
284 return 0;
285 }
286 }
273 287
274 /* invalid block -- cancel */ 288 /* invalid block -- cancel */
275 if (ctx->cont <= 0) break; 289 if (ctx->cont <= 0) break;
@@ -293,7 +307,8 @@ static int ok_write(BIO *b, const char *in, int inl)
293 307
294 if ((ctx == NULL) || (b->next_bio == NULL) || (b->init == 0)) return(0); 308 if ((ctx == NULL) || (b->next_bio == NULL) || (b->init == 0)) return(0);
295 309
296 if(ctx->sigio) sig_out(b); 310 if(ctx->sigio && !sig_out(b))
311 return 0;
297 312
298 do{ 313 do{
299 BIO_clear_retry_flags(b); 314 BIO_clear_retry_flags(b);
@@ -332,7 +347,11 @@ static int ok_write(BIO *b, const char *in, int inl)
332 347
333 if(ctx->buf_len >= OK_BLOCK_SIZE+ OK_BLOCK_BLOCK) 348 if(ctx->buf_len >= OK_BLOCK_SIZE+ OK_BLOCK_BLOCK)
334 { 349 {
335 block_out(b); 350 if (!block_out(b))
351 {
352 BIO_clear_retry_flags(b);
353 return 0;
354 }
336 } 355 }
337 }while(inl > 0); 356 }while(inl > 0);
338 357
@@ -379,7 +398,8 @@ static long ok_ctrl(BIO *b, int cmd, long num, void *ptr)
379 case BIO_CTRL_FLUSH: 398 case BIO_CTRL_FLUSH:
380 /* do a final write */ 399 /* do a final write */
381 if(ctx->blockout == 0) 400 if(ctx->blockout == 0)
382 block_out(b); 401 if (!block_out(b))
402 return 0;
383 403
384 while (ctx->blockout) 404 while (ctx->blockout)
385 { 405 {
@@ -408,7 +428,8 @@ static long ok_ctrl(BIO *b, int cmd, long num, void *ptr)
408 break; 428 break;
409 case BIO_C_SET_MD: 429 case BIO_C_SET_MD:
410 md=ptr; 430 md=ptr;
411 EVP_DigestInit_ex(&ctx->md, md, NULL); 431 if (!EVP_DigestInit_ex(&ctx->md, md, NULL))
432 return 0;
412 b->init=1; 433 b->init=1;
413 break; 434 break;
414 case BIO_C_GET_MD: 435 case BIO_C_GET_MD:
@@ -455,7 +476,7 @@ static void longswap(void *_ptr, size_t len)
455 } 476 }
456} 477}
457 478
458static void sig_out(BIO* b) 479static int sig_out(BIO* b)
459 { 480 {
460 BIO_OK_CTX *ctx; 481 BIO_OK_CTX *ctx;
461 EVP_MD_CTX *md; 482 EVP_MD_CTX *md;
@@ -463,9 +484,10 @@ static void sig_out(BIO* b)
463 ctx=b->ptr; 484 ctx=b->ptr;
464 md=&ctx->md; 485 md=&ctx->md;
465 486
466 if(ctx->buf_len+ 2* md->digest->md_size > OK_BLOCK_SIZE) return; 487 if(ctx->buf_len+ 2* md->digest->md_size > OK_BLOCK_SIZE) return 1;
467 488
468 EVP_DigestInit_ex(md, md->digest, NULL); 489 if (!EVP_DigestInit_ex(md, md->digest, NULL))
490 goto berr;
469 /* FIXME: there's absolutely no guarantee this makes any sense at all, 491 /* FIXME: there's absolutely no guarantee this makes any sense at all,
470 * particularly now EVP_MD_CTX has been restructured. 492 * particularly now EVP_MD_CTX has been restructured.
471 */ 493 */
@@ -474,14 +496,20 @@ static void sig_out(BIO* b)
474 longswap(&(ctx->buf[ctx->buf_len]), md->digest->md_size); 496 longswap(&(ctx->buf[ctx->buf_len]), md->digest->md_size);
475 ctx->buf_len+= md->digest->md_size; 497 ctx->buf_len+= md->digest->md_size;
476 498
477 EVP_DigestUpdate(md, WELLKNOWN, strlen(WELLKNOWN)); 499 if (!EVP_DigestUpdate(md, WELLKNOWN, strlen(WELLKNOWN)))
478 EVP_DigestFinal_ex(md, &(ctx->buf[ctx->buf_len]), NULL); 500 goto berr;
501 if (!EVP_DigestFinal_ex(md, &(ctx->buf[ctx->buf_len]), NULL))
502 goto berr;
479 ctx->buf_len+= md->digest->md_size; 503 ctx->buf_len+= md->digest->md_size;
480 ctx->blockout= 1; 504 ctx->blockout= 1;
481 ctx->sigio= 0; 505 ctx->sigio= 0;
506 return 1;
507 berr:
508 BIO_clear_retry_flags(b);
509 return 0;
482 } 510 }
483 511
484static void sig_in(BIO* b) 512static int sig_in(BIO* b)
485 { 513 {
486 BIO_OK_CTX *ctx; 514 BIO_OK_CTX *ctx;
487 EVP_MD_CTX *md; 515 EVP_MD_CTX *md;
@@ -491,15 +519,18 @@ static void sig_in(BIO* b)
491 ctx=b->ptr; 519 ctx=b->ptr;
492 md=&ctx->md; 520 md=&ctx->md;
493 521
494 if((int)(ctx->buf_len-ctx->buf_off) < 2*md->digest->md_size) return; 522 if((int)(ctx->buf_len-ctx->buf_off) < 2*md->digest->md_size) return 1;
495 523
496 EVP_DigestInit_ex(md, md->digest, NULL); 524 if (!EVP_DigestInit_ex(md, md->digest, NULL))
525 goto berr;
497 memcpy(md->md_data, &(ctx->buf[ctx->buf_off]), md->digest->md_size); 526 memcpy(md->md_data, &(ctx->buf[ctx->buf_off]), md->digest->md_size);
498 longswap(md->md_data, md->digest->md_size); 527 longswap(md->md_data, md->digest->md_size);
499 ctx->buf_off+= md->digest->md_size; 528 ctx->buf_off+= md->digest->md_size;
500 529
501 EVP_DigestUpdate(md, WELLKNOWN, strlen(WELLKNOWN)); 530 if (!EVP_DigestUpdate(md, WELLKNOWN, strlen(WELLKNOWN)))
502 EVP_DigestFinal_ex(md, tmp, NULL); 531 goto berr;
532 if (!EVP_DigestFinal_ex(md, tmp, NULL))
533 goto berr;
503 ret= memcmp(&(ctx->buf[ctx->buf_off]), tmp, md->digest->md_size) == 0; 534 ret= memcmp(&(ctx->buf[ctx->buf_off]), tmp, md->digest->md_size) == 0;
504 ctx->buf_off+= md->digest->md_size; 535 ctx->buf_off+= md->digest->md_size;
505 if(ret == 1) 536 if(ret == 1)
@@ -516,9 +547,13 @@ static void sig_in(BIO* b)
516 { 547 {
517 ctx->cont= 0; 548 ctx->cont= 0;
518 } 549 }
550 return 1;
551 berr:
552 BIO_clear_retry_flags(b);
553 return 0;
519 } 554 }
520 555
521static void block_out(BIO* b) 556static int block_out(BIO* b)
522 { 557 {
523 BIO_OK_CTX *ctx; 558 BIO_OK_CTX *ctx;
524 EVP_MD_CTX *md; 559 EVP_MD_CTX *md;
@@ -532,13 +567,20 @@ static void block_out(BIO* b)
532 ctx->buf[1]=(unsigned char)(tl>>16); 567 ctx->buf[1]=(unsigned char)(tl>>16);
533 ctx->buf[2]=(unsigned char)(tl>>8); 568 ctx->buf[2]=(unsigned char)(tl>>8);
534 ctx->buf[3]=(unsigned char)(tl); 569 ctx->buf[3]=(unsigned char)(tl);
535 EVP_DigestUpdate(md, (unsigned char*) &(ctx->buf[OK_BLOCK_BLOCK]), tl); 570 if (!EVP_DigestUpdate(md,
536 EVP_DigestFinal_ex(md, &(ctx->buf[ctx->buf_len]), NULL); 571 (unsigned char*) &(ctx->buf[OK_BLOCK_BLOCK]), tl))
572 goto berr;
573 if (!EVP_DigestFinal_ex(md, &(ctx->buf[ctx->buf_len]), NULL))
574 goto berr;
537 ctx->buf_len+= md->digest->md_size; 575 ctx->buf_len+= md->digest->md_size;
538 ctx->blockout= 1; 576 ctx->blockout= 1;
577 return 1;
578 berr:
579 BIO_clear_retry_flags(b);
580 return 0;
539 } 581 }
540 582
541static void block_in(BIO* b) 583static int block_in(BIO* b)
542 { 584 {
543 BIO_OK_CTX *ctx; 585 BIO_OK_CTX *ctx;
544 EVP_MD_CTX *md; 586 EVP_MD_CTX *md;
@@ -554,10 +596,13 @@ static void block_in(BIO* b)
554 tl|=ctx->buf[2]; tl<<=8; 596 tl|=ctx->buf[2]; tl<<=8;
555 tl|=ctx->buf[3]; 597 tl|=ctx->buf[3];
556 598
557 if (ctx->buf_len < tl+ OK_BLOCK_BLOCK+ md->digest->md_size) return; 599 if (ctx->buf_len < tl+ OK_BLOCK_BLOCK+ md->digest->md_size) return 1;
558 600
559 EVP_DigestUpdate(md, (unsigned char*) &(ctx->buf[OK_BLOCK_BLOCK]), tl); 601 if (!EVP_DigestUpdate(md,
560 EVP_DigestFinal_ex(md, tmp, NULL); 602 (unsigned char*) &(ctx->buf[OK_BLOCK_BLOCK]), tl))
603 goto berr;
604 if (!EVP_DigestFinal_ex(md, tmp, NULL))
605 goto berr;
561 if(memcmp(&(ctx->buf[tl+ OK_BLOCK_BLOCK]), tmp, md->digest->md_size) == 0) 606 if(memcmp(&(ctx->buf[tl+ OK_BLOCK_BLOCK]), tmp, md->digest->md_size) == 0)
562 { 607 {
563 /* there might be parts from next block lurking around ! */ 608 /* there might be parts from next block lurking around ! */
@@ -571,5 +616,9 @@ static void block_in(BIO* b)
571 { 616 {
572 ctx->cont= 0; 617 ctx->cont= 0;
573 } 618 }
619 return 1;
620 berr:
621 BIO_clear_retry_flags(b);
622 return 0;
574 } 623 }
575 624
diff --git a/src/lib/libcrypto/evp/c_allc.c b/src/lib/libcrypto/evp/c_allc.c
index c5f9268378..2a45d435e5 100644
--- a/src/lib/libcrypto/evp/c_allc.c
+++ b/src/lib/libcrypto/evp/c_allc.c
@@ -98,6 +98,9 @@ void OpenSSL_add_all_ciphers(void)
98#ifndef OPENSSL_NO_RC4 98#ifndef OPENSSL_NO_RC4
99 EVP_add_cipher(EVP_rc4()); 99 EVP_add_cipher(EVP_rc4());
100 EVP_add_cipher(EVP_rc4_40()); 100 EVP_add_cipher(EVP_rc4_40());
101#ifndef OPENSSL_NO_MD5
102 EVP_add_cipher(EVP_rc4_hmac_md5());
103#endif
101#endif 104#endif
102 105
103#ifndef OPENSSL_NO_IDEA 106#ifndef OPENSSL_NO_IDEA
@@ -166,9 +169,9 @@ void OpenSSL_add_all_ciphers(void)
166 EVP_add_cipher(EVP_aes_128_cfb1()); 169 EVP_add_cipher(EVP_aes_128_cfb1());
167 EVP_add_cipher(EVP_aes_128_cfb8()); 170 EVP_add_cipher(EVP_aes_128_cfb8());
168 EVP_add_cipher(EVP_aes_128_ofb()); 171 EVP_add_cipher(EVP_aes_128_ofb());
169#if 0
170 EVP_add_cipher(EVP_aes_128_ctr()); 172 EVP_add_cipher(EVP_aes_128_ctr());
171#endif 173 EVP_add_cipher(EVP_aes_128_gcm());
174 EVP_add_cipher(EVP_aes_128_xts());
172 EVP_add_cipher_alias(SN_aes_128_cbc,"AES128"); 175 EVP_add_cipher_alias(SN_aes_128_cbc,"AES128");
173 EVP_add_cipher_alias(SN_aes_128_cbc,"aes128"); 176 EVP_add_cipher_alias(SN_aes_128_cbc,"aes128");
174 EVP_add_cipher(EVP_aes_192_ecb()); 177 EVP_add_cipher(EVP_aes_192_ecb());
@@ -177,9 +180,8 @@ void OpenSSL_add_all_ciphers(void)
177 EVP_add_cipher(EVP_aes_192_cfb1()); 180 EVP_add_cipher(EVP_aes_192_cfb1());
178 EVP_add_cipher(EVP_aes_192_cfb8()); 181 EVP_add_cipher(EVP_aes_192_cfb8());
179 EVP_add_cipher(EVP_aes_192_ofb()); 182 EVP_add_cipher(EVP_aes_192_ofb());
180#if 0
181 EVP_add_cipher(EVP_aes_192_ctr()); 183 EVP_add_cipher(EVP_aes_192_ctr());
182#endif 184 EVP_add_cipher(EVP_aes_192_gcm());
183 EVP_add_cipher_alias(SN_aes_192_cbc,"AES192"); 185 EVP_add_cipher_alias(SN_aes_192_cbc,"AES192");
184 EVP_add_cipher_alias(SN_aes_192_cbc,"aes192"); 186 EVP_add_cipher_alias(SN_aes_192_cbc,"aes192");
185 EVP_add_cipher(EVP_aes_256_ecb()); 187 EVP_add_cipher(EVP_aes_256_ecb());
@@ -188,11 +190,15 @@ void OpenSSL_add_all_ciphers(void)
188 EVP_add_cipher(EVP_aes_256_cfb1()); 190 EVP_add_cipher(EVP_aes_256_cfb1());
189 EVP_add_cipher(EVP_aes_256_cfb8()); 191 EVP_add_cipher(EVP_aes_256_cfb8());
190 EVP_add_cipher(EVP_aes_256_ofb()); 192 EVP_add_cipher(EVP_aes_256_ofb());
191#if 0
192 EVP_add_cipher(EVP_aes_256_ctr()); 193 EVP_add_cipher(EVP_aes_256_ctr());
193#endif 194 EVP_add_cipher(EVP_aes_256_gcm());
195 EVP_add_cipher(EVP_aes_256_xts());
194 EVP_add_cipher_alias(SN_aes_256_cbc,"AES256"); 196 EVP_add_cipher_alias(SN_aes_256_cbc,"AES256");
195 EVP_add_cipher_alias(SN_aes_256_cbc,"aes256"); 197 EVP_add_cipher_alias(SN_aes_256_cbc,"aes256");
198#if !defined(OPENSSL_NO_SHA) && !defined(OPENSSL_NO_SHA1)
199 EVP_add_cipher(EVP_aes_128_cbc_hmac_sha1());
200 EVP_add_cipher(EVP_aes_256_cbc_hmac_sha1());
201#endif
196#endif 202#endif
197 203
198#ifndef OPENSSL_NO_CAMELLIA 204#ifndef OPENSSL_NO_CAMELLIA
diff --git a/src/lib/libcrypto/evp/evptests.txt b/src/lib/libcrypto/evp/evptests.txt
index beb12144b6..c273707c14 100644
--- a/src/lib/libcrypto/evp/evptests.txt
+++ b/src/lib/libcrypto/evp/evptests.txt
@@ -158,6 +158,19 @@ AES-256-OFB:603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4:B7B
158AES-256-OFB:603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4:E1C656305ED1A7A6563805746FE03EDC:30C81C46A35CE411E5FBC1191A0A52EF:71AB47A086E86EEDF39D1C5BBA97C408:0 158AES-256-OFB:603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4:E1C656305ED1A7A6563805746FE03EDC:30C81C46A35CE411E5FBC1191A0A52EF:71AB47A086E86EEDF39D1C5BBA97C408:0
159AES-256-OFB:603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4:41635BE625B48AFC1666DD42A09D96E7:F69F2445DF4F9B17AD2B417BE66C3710:0126141D67F37BE8538F5A8BE740E484:0 159AES-256-OFB:603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4:41635BE625B48AFC1666DD42A09D96E7:F69F2445DF4F9B17AD2B417BE66C3710:0126141D67F37BE8538F5A8BE740E484:0
160 160
161# AES Counter test vectors from RFC3686
162aes-128-ctr:AE6852F8121067CC4BF7A5765577F39E:00000030000000000000000000000001:53696E676C6520626C6F636B206D7367:E4095D4FB7A7B3792D6175A3261311B8:1
163aes-128-ctr:7E24067817FAE0D743D6CE1F32539163:006CB6DBC0543B59DA48D90B00000001:000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F:5104A106168A72D9790D41EE8EDAD388EB2E1EFC46DA57C8FCE630DF9141BE28:1
164aes-128-ctr:7691BE035E5020A8AC6E618529F9A0DC:00E0017B27777F3F4A1786F000000001:000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F20212223:C1CF48A89F2FFDD9CF4652E9EFDB72D74540A42BDE6D7836D59A5CEAAEF3105325B2072F:1
165
166aes-192-ctr:16AF5B145FC9F579C175F93E3BFB0EED863D06CCFDB78515:0000004836733C147D6D93CB00000001:53696E676C6520626C6F636B206D7367:4B55384FE259C9C84E7935A003CBE928:1
167aes-192-ctr:7C5CB2401B3DC33C19E7340819E0F69C678C3DB8E6F6A91A:0096B03B020C6EADC2CB500D00000001:000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F:453243FC609B23327EDFAAFA7131CD9F8490701C5AD4A79CFC1FE0FF42F4FB00:1
168aes-192-ctr:02BF391EE8ECB159B959617B0965279BF59B60A786D3E0FE:0007BDFD5CBD60278DCC091200000001:000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F20212223:96893FC55E5C722F540B7DD1DDF7E758D288BC95C69165884536C811662F2188ABEE0935:1
169
170aes-256-ctr:776BEFF2851DB06F4C8A0542C8696F6C6A81AF1EEC96B4D37FC1D689E6C1C104:00000060DB5672C97AA8F0B200000001:53696E676C6520626C6F636B206D7367:145AD01DBF824EC7560863DC71E3E0C0:1
171aes-256-ctr:F6D66D6BD52D59BB0796365879EFF886C66DD51A5B6A99744B50590C87A23884:00FAAC24C1585EF15A43D87500000001:000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F:F05E231B3894612C49EE000B804EB2A9B8306B508F839D6A5530831D9344AF1C:1
172aes-256-ctr:FF7A617CE69148E4F1726E2F43581DE2AA62D9F805532EDFF1EED687FB54153D:001CC5B751A51D70A1C1114800000001:000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F20212223:EB6C52821D0BBBF7CE7594462ACA4FAAB407DF866569FD07F48CC0B583D6071F1EC0E6B8:1
173
161# DES ECB tests (from destest) 174# DES ECB tests (from destest)
162 175
163DES-ECB:0000000000000000::0000000000000000:8CA64DE9C1B123A7 176DES-ECB:0000000000000000::0000000000000000:8CA64DE9C1B123A7
diff --git a/src/lib/libcrypto/evp/m_mdc2.c b/src/lib/libcrypto/evp/m_mdc2.c
index b08d559803..3602bed316 100644
--- a/src/lib/libcrypto/evp/m_mdc2.c
+++ b/src/lib/libcrypto/evp/m_mdc2.c
@@ -69,6 +69,8 @@
69#include <openssl/rsa.h> 69#include <openssl/rsa.h>
70#endif 70#endif
71 71
72#include "evp_locl.h"
73
72static int init(EVP_MD_CTX *ctx) 74static int init(EVP_MD_CTX *ctx)
73 { return MDC2_Init(ctx->md_data); } 75 { return MDC2_Init(ctx->md_data); }
74 76
diff --git a/src/lib/libcrypto/evp/m_sha.c b/src/lib/libcrypto/evp/m_sha.c
index acccc8f92d..8769cdd42f 100644
--- a/src/lib/libcrypto/evp/m_sha.c
+++ b/src/lib/libcrypto/evp/m_sha.c
@@ -67,6 +67,7 @@
67#ifndef OPENSSL_NO_RSA 67#ifndef OPENSSL_NO_RSA
68#include <openssl/rsa.h> 68#include <openssl/rsa.h>
69#endif 69#endif
70#include "evp_locl.h"
70 71
71static int init(EVP_MD_CTX *ctx) 72static int init(EVP_MD_CTX *ctx)
72 { return SHA_Init(ctx->md_data); } 73 { return SHA_Init(ctx->md_data); }
diff --git a/src/lib/libcrypto/idea/Makefile b/src/lib/libcrypto/idea/Makefile
index b2e7add666..8af0acdad9 100644
--- a/src/lib/libcrypto/idea/Makefile
+++ b/src/lib/libcrypto/idea/Makefile
@@ -82,5 +82,8 @@ i_ecb.o: ../../include/openssl/idea.h ../../include/openssl/opensslconf.h
82i_ecb.o: ../../include/openssl/opensslv.h i_ecb.c idea_lcl.h 82i_ecb.o: ../../include/openssl/opensslv.h i_ecb.c idea_lcl.h
83i_ofb64.o: ../../include/openssl/idea.h ../../include/openssl/opensslconf.h 83i_ofb64.o: ../../include/openssl/idea.h ../../include/openssl/opensslconf.h
84i_ofb64.o: i_ofb64.c idea_lcl.h 84i_ofb64.o: i_ofb64.c idea_lcl.h
85i_skey.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
85i_skey.o: ../../include/openssl/idea.h ../../include/openssl/opensslconf.h 86i_skey.o: ../../include/openssl/idea.h ../../include/openssl/opensslconf.h
86i_skey.o: i_skey.c idea_lcl.h 87i_skey.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
88i_skey.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
89i_skey.o: ../../include/openssl/symhacks.h i_skey.c idea_lcl.h
diff --git a/src/lib/libcrypto/md2/md2.h b/src/lib/libcrypto/md2/md2.h
index a46120e7d4..d59c9f2593 100644
--- a/src/lib/libcrypto/md2/md2.h
+++ b/src/lib/libcrypto/md2/md2.h
@@ -81,6 +81,9 @@ typedef struct MD2state_st
81 } MD2_CTX; 81 } MD2_CTX;
82 82
83const char *MD2_options(void); 83const char *MD2_options(void);
84#ifdef OPENSSL_FIPS
85int private_MD2_Init(MD2_CTX *c);
86#endif
84int MD2_Init(MD2_CTX *c); 87int MD2_Init(MD2_CTX *c);
85int MD2_Update(MD2_CTX *c, const unsigned char *data, size_t len); 88int MD2_Update(MD2_CTX *c, const unsigned char *data, size_t len);
86int MD2_Final(unsigned char *md, MD2_CTX *c); 89int MD2_Final(unsigned char *md, MD2_CTX *c);
diff --git a/src/lib/libcrypto/md2/md2_dgst.c b/src/lib/libcrypto/md2/md2_dgst.c
index c57b3da288..bf89def73e 100644
--- a/src/lib/libcrypto/md2/md2_dgst.c
+++ b/src/lib/libcrypto/md2/md2_dgst.c
@@ -116,7 +116,7 @@ const char *MD2_options(void)
116 return("md2(int)"); 116 return("md2(int)");
117 } 117 }
118 118
119int MD2_Init(MD2_CTX *c) 119fips_md_init(MD2)
120 { 120 {
121 c->num=0; 121 c->num=0;
122 memset(c->state,0,sizeof c->state); 122 memset(c->state,0,sizeof c->state);
diff --git a/src/lib/libcrypto/md4/Makefile b/src/lib/libcrypto/md4/Makefile
index c94a1398ed..e6f1e4478c 100644
--- a/src/lib/libcrypto/md4/Makefile
+++ b/src/lib/libcrypto/md4/Makefile
@@ -76,9 +76,11 @@ clean:
76 76
77# DO NOT DELETE THIS LINE -- make depend depends on it. 77# DO NOT DELETE THIS LINE -- make depend depends on it.
78 78
79md4_dgst.o: ../../include/openssl/e_os2.h ../../include/openssl/md4.h 79md4_dgst.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
80md4_dgst.o: ../../include/openssl/opensslconf.h 80md4_dgst.o: ../../include/openssl/md4.h ../../include/openssl/opensslconf.h
81md4_dgst.o: ../../include/openssl/opensslv.h ../md32_common.h md4_dgst.c 81md4_dgst.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
82md4_dgst.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
83md4_dgst.o: ../../include/openssl/symhacks.h ../md32_common.h md4_dgst.c
82md4_dgst.o: md4_locl.h 84md4_dgst.o: md4_locl.h
83md4_one.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h 85md4_one.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
84md4_one.o: ../../include/openssl/md4.h ../../include/openssl/opensslconf.h 86md4_one.o: ../../include/openssl/md4.h ../../include/openssl/opensslconf.h
diff --git a/src/lib/libcrypto/md5/Makefile b/src/lib/libcrypto/md5/Makefile
index 9858d53d31..b9e2ce9a38 100644
--- a/src/lib/libcrypto/md5/Makefile
+++ b/src/lib/libcrypto/md5/Makefile
@@ -89,9 +89,11 @@ clean:
89 89
90# DO NOT DELETE THIS LINE -- make depend depends on it. 90# DO NOT DELETE THIS LINE -- make depend depends on it.
91 91
92md5_dgst.o: ../../include/openssl/e_os2.h ../../include/openssl/md5.h 92md5_dgst.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
93md5_dgst.o: ../../include/openssl/opensslconf.h 93md5_dgst.o: ../../include/openssl/md5.h ../../include/openssl/opensslconf.h
94md5_dgst.o: ../../include/openssl/opensslv.h ../md32_common.h md5_dgst.c 94md5_dgst.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
95md5_dgst.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
96md5_dgst.o: ../../include/openssl/symhacks.h ../md32_common.h md5_dgst.c
95md5_dgst.o: md5_locl.h 97md5_dgst.o: md5_locl.h
96md5_one.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h 98md5_one.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
97md5_one.o: ../../include/openssl/md5.h ../../include/openssl/opensslconf.h 99md5_one.o: ../../include/openssl/md5.h ../../include/openssl/opensslconf.h
diff --git a/src/lib/libcrypto/mdc2/Makefile b/src/lib/libcrypto/mdc2/Makefile
index 1d064f17a6..141553149d 100644
--- a/src/lib/libcrypto/mdc2/Makefile
+++ b/src/lib/libcrypto/mdc2/Makefile
@@ -84,10 +84,10 @@ mdc2_one.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
84mdc2_one.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h 84mdc2_one.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
85mdc2_one.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h 85mdc2_one.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
86mdc2_one.o: ../../include/openssl/ui_compat.h ../cryptlib.h mdc2_one.c 86mdc2_one.o: ../../include/openssl/ui_compat.h ../cryptlib.h mdc2_one.c
87mdc2dgst.o: ../../include/openssl/des.h ../../include/openssl/des_old.h 87mdc2dgst.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
88mdc2dgst.o: ../../include/openssl/e_os2.h ../../include/openssl/mdc2.h 88mdc2dgst.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h
89mdc2dgst.o: ../../include/openssl/opensslconf.h 89mdc2dgst.o: ../../include/openssl/mdc2.h ../../include/openssl/opensslconf.h
90mdc2dgst.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h 90mdc2dgst.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
91mdc2dgst.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h 91mdc2dgst.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
92mdc2dgst.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h 92mdc2dgst.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h
93mdc2dgst.o: mdc2dgst.c 93mdc2dgst.o: ../../include/openssl/ui_compat.h mdc2dgst.c
diff --git a/src/lib/libcrypto/mdc2/mdc2.h b/src/lib/libcrypto/mdc2/mdc2.h
index 72778a5212..f3e8e579d2 100644
--- a/src/lib/libcrypto/mdc2/mdc2.h
+++ b/src/lib/libcrypto/mdc2/mdc2.h
@@ -81,6 +81,9 @@ typedef struct mdc2_ctx_st
81 } MDC2_CTX; 81 } MDC2_CTX;
82 82
83 83
84#ifdef OPENSSL_FIPS
85int private_MDC2_Init(MDC2_CTX *c);
86#endif
84int MDC2_Init(MDC2_CTX *c); 87int MDC2_Init(MDC2_CTX *c);
85int MDC2_Update(MDC2_CTX *c, const unsigned char *data, size_t len); 88int MDC2_Update(MDC2_CTX *c, const unsigned char *data, size_t len);
86int MDC2_Final(unsigned char *md, MDC2_CTX *c); 89int MDC2_Final(unsigned char *md, MDC2_CTX *c);
diff --git a/src/lib/libcrypto/mem.c b/src/lib/libcrypto/mem.c
index 6f80dd33eb..21c0011380 100644
--- a/src/lib/libcrypto/mem.c
+++ b/src/lib/libcrypto/mem.c
@@ -125,6 +125,7 @@ static long (*get_debug_options_func)(void) = NULL;
125int CRYPTO_set_mem_functions(void *(*m)(size_t), void *(*r)(void *, size_t), 125int CRYPTO_set_mem_functions(void *(*m)(size_t), void *(*r)(void *, size_t),
126 void (*f)(void *)) 126 void (*f)(void *))
127 { 127 {
128 OPENSSL_init();
128 if (!allow_customize) 129 if (!allow_customize)
129 return 0; 130 return 0;
130 if ((m == 0) || (r == 0) || (f == 0)) 131 if ((m == 0) || (r == 0) || (f == 0))
@@ -186,6 +187,7 @@ int CRYPTO_set_mem_debug_functions(void (*m)(void *,int,const char *,int,int),
186 { 187 {
187 if (!allow_customize_debug) 188 if (!allow_customize_debug)
188 return 0; 189 return 0;
190 OPENSSL_init();
189 malloc_debug_func=m; 191 malloc_debug_func=m;
190 realloc_debug_func=r; 192 realloc_debug_func=r;
191 free_debug_func=f; 193 free_debug_func=f;
@@ -361,6 +363,10 @@ void *CRYPTO_realloc_clean(void *str, int old_len, int num, const char *file,
361 363
362 if (num <= 0) return NULL; 364 if (num <= 0) return NULL;
363 365
366 /* We don't support shrinking the buffer. Note the memcpy that copies
367 * |old_len| bytes to the new buffer, below. */
368 if (num < old_len) return NULL;
369
364 if (realloc_debug_func != NULL) 370 if (realloc_debug_func != NULL)
365 realloc_debug_func(str, NULL, num, file, line, 0); 371 realloc_debug_func(str, NULL, num, file, line, 0);
366 ret=malloc_ex_func(num,file,line); 372 ret=malloc_ex_func(num,file,line);
diff --git a/src/lib/libcrypto/objects/obj_dat.h b/src/lib/libcrypto/objects/obj_dat.h
index 6449be6071..d404ad07c9 100644
--- a/src/lib/libcrypto/objects/obj_dat.h
+++ b/src/lib/libcrypto/objects/obj_dat.h
@@ -62,12 +62,12 @@
62 * [including the GNU Public Licence.] 62 * [including the GNU Public Licence.]
63 */ 63 */
64 64
65#define NUM_NID 893 65#define NUM_NID 920
66#define NUM_SN 886 66#define NUM_SN 913
67#define NUM_LN 886 67#define NUM_LN 913
68#define NUM_OBJ 840 68#define NUM_OBJ 857
69 69
70static const unsigned char lvalues[5824]={ 70static const unsigned char lvalues[5980]={
710x00, /* [ 0] OBJ_undef */ 710x00, /* [ 0] OBJ_undef */
720x2A,0x86,0x48,0x86,0xF7,0x0D, /* [ 1] OBJ_rsadsi */ 720x2A,0x86,0x48,0x86,0xF7,0x0D, /* [ 1] OBJ_rsadsi */
730x2A,0x86,0x48,0x86,0xF7,0x0D,0x01, /* [ 7] OBJ_pkcs */ 730x2A,0x86,0x48,0x86,0xF7,0x0D,0x01, /* [ 7] OBJ_pkcs */
@@ -908,6 +908,23 @@ static const unsigned char lvalues[5824]={
9080x55,0x04,0x34, /* [5814] OBJ_supportedAlgorithms */ 9080x55,0x04,0x34, /* [5814] OBJ_supportedAlgorithms */
9090x55,0x04,0x35, /* [5817] OBJ_deltaRevocationList */ 9090x55,0x04,0x35, /* [5817] OBJ_deltaRevocationList */
9100x55,0x04,0x36, /* [5820] OBJ_dmdName */ 9100x55,0x04,0x36, /* [5820] OBJ_dmdName */
9110x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x10,0x03,0x09,/* [5823] OBJ_id_alg_PWRI_KEK */
9120x60,0x86,0x48,0x01,0x65,0x03,0x04,0x01,0x06,/* [5834] OBJ_aes_128_gcm */
9130x60,0x86,0x48,0x01,0x65,0x03,0x04,0x01,0x07,/* [5843] OBJ_aes_128_ccm */
9140x60,0x86,0x48,0x01,0x65,0x03,0x04,0x01,0x08,/* [5852] OBJ_id_aes128_wrap_pad */
9150x60,0x86,0x48,0x01,0x65,0x03,0x04,0x01,0x1A,/* [5861] OBJ_aes_192_gcm */
9160x60,0x86,0x48,0x01,0x65,0x03,0x04,0x01,0x1B,/* [5870] OBJ_aes_192_ccm */
9170x60,0x86,0x48,0x01,0x65,0x03,0x04,0x01,0x1C,/* [5879] OBJ_id_aes192_wrap_pad */
9180x60,0x86,0x48,0x01,0x65,0x03,0x04,0x01,0x2E,/* [5888] OBJ_aes_256_gcm */
9190x60,0x86,0x48,0x01,0x65,0x03,0x04,0x01,0x2F,/* [5897] OBJ_aes_256_ccm */
9200x60,0x86,0x48,0x01,0x65,0x03,0x04,0x01,0x30,/* [5906] OBJ_id_aes256_wrap_pad */
9210x2A,0x83,0x08,0x8C,0x9A,0x4B,0x3D,0x01,0x01,0x03,0x02,/* [5915] OBJ_id_camellia128_wrap */
9220x2A,0x83,0x08,0x8C,0x9A,0x4B,0x3D,0x01,0x01,0x03,0x03,/* [5926] OBJ_id_camellia192_wrap */
9230x2A,0x83,0x08,0x8C,0x9A,0x4B,0x3D,0x01,0x01,0x03,0x04,/* [5937] OBJ_id_camellia256_wrap */
9240x55,0x1D,0x25,0x00, /* [5948] OBJ_anyExtendedKeyUsage */
9250x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01,0x08,/* [5952] OBJ_mgf1 */
9260x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01,0x0A,/* [5961] OBJ_rsassaPss */
9270x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01,0x07,/* [5970] OBJ_rsaesOaep */
911}; 928};
912 929
913static const ASN1_OBJECT nid_objs[NUM_NID]={ 930static const ASN1_OBJECT nid_objs[NUM_NID]={
@@ -2351,28 +2368,74 @@ static const ASN1_OBJECT nid_objs[NUM_NID]={
2351{"deltaRevocationList","deltaRevocationList",NID_deltaRevocationList, 2368{"deltaRevocationList","deltaRevocationList",NID_deltaRevocationList,
2352 3,&(lvalues[5817]),0}, 2369 3,&(lvalues[5817]),0},
2353{"dmdName","dmdName",NID_dmdName,3,&(lvalues[5820]),0}, 2370{"dmdName","dmdName",NID_dmdName,3,&(lvalues[5820]),0},
2371{"id-alg-PWRI-KEK","id-alg-PWRI-KEK",NID_id_alg_PWRI_KEK,11,
2372 &(lvalues[5823]),0},
2373{"CMAC","cmac",NID_cmac,0,NULL,0},
2374{"id-aes128-GCM","aes-128-gcm",NID_aes_128_gcm,9,&(lvalues[5834]),0},
2375{"id-aes128-CCM","aes-128-ccm",NID_aes_128_ccm,9,&(lvalues[5843]),0},
2376{"id-aes128-wrap-pad","id-aes128-wrap-pad",NID_id_aes128_wrap_pad,9,
2377 &(lvalues[5852]),0},
2378{"id-aes192-GCM","aes-192-gcm",NID_aes_192_gcm,9,&(lvalues[5861]),0},
2379{"id-aes192-CCM","aes-192-ccm",NID_aes_192_ccm,9,&(lvalues[5870]),0},
2380{"id-aes192-wrap-pad","id-aes192-wrap-pad",NID_id_aes192_wrap_pad,9,
2381 &(lvalues[5879]),0},
2382{"id-aes256-GCM","aes-256-gcm",NID_aes_256_gcm,9,&(lvalues[5888]),0},
2383{"id-aes256-CCM","aes-256-ccm",NID_aes_256_ccm,9,&(lvalues[5897]),0},
2384{"id-aes256-wrap-pad","id-aes256-wrap-pad",NID_id_aes256_wrap_pad,9,
2385 &(lvalues[5906]),0},
2386{"AES-128-CTR","aes-128-ctr",NID_aes_128_ctr,0,NULL,0},
2387{"AES-192-CTR","aes-192-ctr",NID_aes_192_ctr,0,NULL,0},
2388{"AES-256-CTR","aes-256-ctr",NID_aes_256_ctr,0,NULL,0},
2389{"id-camellia128-wrap","id-camellia128-wrap",NID_id_camellia128_wrap,
2390 11,&(lvalues[5915]),0},
2391{"id-camellia192-wrap","id-camellia192-wrap",NID_id_camellia192_wrap,
2392 11,&(lvalues[5926]),0},
2393{"id-camellia256-wrap","id-camellia256-wrap",NID_id_camellia256_wrap,
2394 11,&(lvalues[5937]),0},
2395{"anyExtendedKeyUsage","Any Extended Key Usage",
2396 NID_anyExtendedKeyUsage,4,&(lvalues[5948]),0},
2397{"MGF1","mgf1",NID_mgf1,9,&(lvalues[5952]),0},
2398{"RSASSA-PSS","rsassaPss",NID_rsassaPss,9,&(lvalues[5961]),0},
2399{"AES-128-XTS","aes-128-xts",NID_aes_128_xts,0,NULL,0},
2400{"AES-256-XTS","aes-256-xts",NID_aes_256_xts,0,NULL,0},
2401{"RC4-HMAC-MD5","rc4-hmac-md5",NID_rc4_hmac_md5,0,NULL,0},
2402{"AES-128-CBC-HMAC-SHA1","aes-128-cbc-hmac-sha1",
2403 NID_aes_128_cbc_hmac_sha1,0,NULL,0},
2404{"AES-192-CBC-HMAC-SHA1","aes-192-cbc-hmac-sha1",
2405 NID_aes_192_cbc_hmac_sha1,0,NULL,0},
2406{"AES-256-CBC-HMAC-SHA1","aes-256-cbc-hmac-sha1",
2407 NID_aes_256_cbc_hmac_sha1,0,NULL,0},
2408{"RSAES-OAEP","rsaesOaep",NID_rsaesOaep,9,&(lvalues[5970]),0},
2354}; 2409};
2355 2410
2356static const unsigned int sn_objs[NUM_SN]={ 2411static const unsigned int sn_objs[NUM_SN]={
2357364, /* "AD_DVCS" */ 2412364, /* "AD_DVCS" */
2358419, /* "AES-128-CBC" */ 2413419, /* "AES-128-CBC" */
2414916, /* "AES-128-CBC-HMAC-SHA1" */
2359421, /* "AES-128-CFB" */ 2415421, /* "AES-128-CFB" */
2360650, /* "AES-128-CFB1" */ 2416650, /* "AES-128-CFB1" */
2361653, /* "AES-128-CFB8" */ 2417653, /* "AES-128-CFB8" */
2418904, /* "AES-128-CTR" */
2362418, /* "AES-128-ECB" */ 2419418, /* "AES-128-ECB" */
2363420, /* "AES-128-OFB" */ 2420420, /* "AES-128-OFB" */
2421913, /* "AES-128-XTS" */
2364423, /* "AES-192-CBC" */ 2422423, /* "AES-192-CBC" */
2423917, /* "AES-192-CBC-HMAC-SHA1" */
2365425, /* "AES-192-CFB" */ 2424425, /* "AES-192-CFB" */
2366651, /* "AES-192-CFB1" */ 2425651, /* "AES-192-CFB1" */
2367654, /* "AES-192-CFB8" */ 2426654, /* "AES-192-CFB8" */
2427905, /* "AES-192-CTR" */
2368422, /* "AES-192-ECB" */ 2428422, /* "AES-192-ECB" */
2369424, /* "AES-192-OFB" */ 2429424, /* "AES-192-OFB" */
2370427, /* "AES-256-CBC" */ 2430427, /* "AES-256-CBC" */
2431918, /* "AES-256-CBC-HMAC-SHA1" */
2371429, /* "AES-256-CFB" */ 2432429, /* "AES-256-CFB" */
2372652, /* "AES-256-CFB1" */ 2433652, /* "AES-256-CFB1" */
2373655, /* "AES-256-CFB8" */ 2434655, /* "AES-256-CFB8" */
2435906, /* "AES-256-CTR" */
2374426, /* "AES-256-ECB" */ 2436426, /* "AES-256-ECB" */
2375428, /* "AES-256-OFB" */ 2437428, /* "AES-256-OFB" */
2438914, /* "AES-256-XTS" */
237691, /* "BF-CBC" */ 243991, /* "BF-CBC" */
237793, /* "BF-CFB" */ 244093, /* "BF-CFB" */
237892, /* "BF-ECB" */ 244192, /* "BF-ECB" */
@@ -2400,6 +2463,7 @@ static const unsigned int sn_objs[NUM_SN]={
2400110, /* "CAST5-CFB" */ 2463110, /* "CAST5-CFB" */
2401109, /* "CAST5-ECB" */ 2464109, /* "CAST5-ECB" */
2402111, /* "CAST5-OFB" */ 2465111, /* "CAST5-OFB" */
2466894, /* "CMAC" */
240313, /* "CN" */ 246713, /* "CN" */
2404141, /* "CRLReason" */ 2468141, /* "CRLReason" */
2405417, /* "CSPName" */ 2469417, /* "CSPName" */
@@ -2451,6 +2515,7 @@ static const unsigned int sn_objs[NUM_SN]={
2451 4, /* "MD5" */ 2515 4, /* "MD5" */
2452114, /* "MD5-SHA1" */ 2516114, /* "MD5-SHA1" */
245395, /* "MDC2" */ 251795, /* "MDC2" */
2518911, /* "MGF1" */
2454388, /* "Mail" */ 2519388, /* "Mail" */
2455393, /* "NULL" */ 2520393, /* "NULL" */
2456404, /* "NULL" */ 2521404, /* "NULL" */
@@ -2487,6 +2552,7 @@ static const unsigned int sn_objs[NUM_SN]={
248740, /* "RC2-OFB" */ 255240, /* "RC2-OFB" */
2488 5, /* "RC4" */ 2553 5, /* "RC4" */
248997, /* "RC4-40" */ 255497, /* "RC4-40" */
2555915, /* "RC4-HMAC-MD5" */
2490120, /* "RC5-CBC" */ 2556120, /* "RC5-CBC" */
2491122, /* "RC5-CFB" */ 2557122, /* "RC5-CFB" */
2492121, /* "RC5-ECB" */ 2558121, /* "RC5-ECB" */
@@ -2507,6 +2573,8 @@ static const unsigned int sn_objs[NUM_SN]={
2507668, /* "RSA-SHA256" */ 2573668, /* "RSA-SHA256" */
2508669, /* "RSA-SHA384" */ 2574669, /* "RSA-SHA384" */
2509670, /* "RSA-SHA512" */ 2575670, /* "RSA-SHA512" */
2576919, /* "RSAES-OAEP" */
2577912, /* "RSASSA-PSS" */
2510777, /* "SEED-CBC" */ 2578777, /* "SEED-CBC" */
2511779, /* "SEED-CFB" */ 2579779, /* "SEED-CFB" */
2512776, /* "SEED-ECB" */ 2580776, /* "SEED-ECB" */
@@ -2540,6 +2608,7 @@ static const unsigned int sn_objs[NUM_SN]={
2540363, /* "ad_timestamping" */ 2608363, /* "ad_timestamping" */
2541376, /* "algorithm" */ 2609376, /* "algorithm" */
2542405, /* "ansi-X9-62" */ 2610405, /* "ansi-X9-62" */
2611910, /* "anyExtendedKeyUsage" */
2543746, /* "anyPolicy" */ 2612746, /* "anyPolicy" */
2544370, /* "archiveCutoff" */ 2613370, /* "archiveCutoff" */
2545484, /* "associatedDomain" */ 2614484, /* "associatedDomain" */
@@ -2716,14 +2785,27 @@ static const unsigned int sn_objs[NUM_SN]={
2716357, /* "id-aca-group" */ 2785357, /* "id-aca-group" */
2717358, /* "id-aca-role" */ 2786358, /* "id-aca-role" */
2718176, /* "id-ad" */ 2787176, /* "id-ad" */
2788896, /* "id-aes128-CCM" */
2789895, /* "id-aes128-GCM" */
2719788, /* "id-aes128-wrap" */ 2790788, /* "id-aes128-wrap" */
2791897, /* "id-aes128-wrap-pad" */
2792899, /* "id-aes192-CCM" */
2793898, /* "id-aes192-GCM" */
2720789, /* "id-aes192-wrap" */ 2794789, /* "id-aes192-wrap" */
2795900, /* "id-aes192-wrap-pad" */
2796902, /* "id-aes256-CCM" */
2797901, /* "id-aes256-GCM" */
2721790, /* "id-aes256-wrap" */ 2798790, /* "id-aes256-wrap" */
2799903, /* "id-aes256-wrap-pad" */
2722262, /* "id-alg" */ 2800262, /* "id-alg" */
2801893, /* "id-alg-PWRI-KEK" */
2723323, /* "id-alg-des40" */ 2802323, /* "id-alg-des40" */
2724326, /* "id-alg-dh-pop" */ 2803326, /* "id-alg-dh-pop" */
2725325, /* "id-alg-dh-sig-hmac-sha1" */ 2804325, /* "id-alg-dh-sig-hmac-sha1" */
2726324, /* "id-alg-noSignature" */ 2805324, /* "id-alg-noSignature" */
2806907, /* "id-camellia128-wrap" */
2807908, /* "id-camellia192-wrap" */
2808909, /* "id-camellia256-wrap" */
2727268, /* "id-cct" */ 2809268, /* "id-cct" */
2728361, /* "id-cct-PKIData" */ 2810361, /* "id-cct-PKIData" */
2729362, /* "id-cct-PKIResponse" */ 2811362, /* "id-cct-PKIResponse" */
@@ -3246,6 +3328,7 @@ static const unsigned int ln_objs[NUM_LN]={
3246363, /* "AD Time Stamping" */ 3328363, /* "AD Time Stamping" */
3247405, /* "ANSI X9.62" */ 3329405, /* "ANSI X9.62" */
3248368, /* "Acceptable OCSP Responses" */ 3330368, /* "Acceptable OCSP Responses" */
3331910, /* "Any Extended Key Usage" */
3249664, /* "Any language" */ 3332664, /* "Any language" */
3250177, /* "Authority Information Access" */ 3333177, /* "Authority Information Access" */
3251365, /* "Basic OCSP Response" */ 3334365, /* "Basic OCSP Response" */
@@ -3386,23 +3469,37 @@ static const unsigned int ln_objs[NUM_LN]={
3386364, /* "ad dvcs" */ 3469364, /* "ad dvcs" */
3387606, /* "additional verification" */ 3470606, /* "additional verification" */
3388419, /* "aes-128-cbc" */ 3471419, /* "aes-128-cbc" */
3472916, /* "aes-128-cbc-hmac-sha1" */
3473896, /* "aes-128-ccm" */
3389421, /* "aes-128-cfb" */ 3474421, /* "aes-128-cfb" */
3390650, /* "aes-128-cfb1" */ 3475650, /* "aes-128-cfb1" */
3391653, /* "aes-128-cfb8" */ 3476653, /* "aes-128-cfb8" */
3477904, /* "aes-128-ctr" */
3392418, /* "aes-128-ecb" */ 3478418, /* "aes-128-ecb" */
3479895, /* "aes-128-gcm" */
3393420, /* "aes-128-ofb" */ 3480420, /* "aes-128-ofb" */
3481913, /* "aes-128-xts" */
3394423, /* "aes-192-cbc" */ 3482423, /* "aes-192-cbc" */
3483917, /* "aes-192-cbc-hmac-sha1" */
3484899, /* "aes-192-ccm" */
3395425, /* "aes-192-cfb" */ 3485425, /* "aes-192-cfb" */
3396651, /* "aes-192-cfb1" */ 3486651, /* "aes-192-cfb1" */
3397654, /* "aes-192-cfb8" */ 3487654, /* "aes-192-cfb8" */
3488905, /* "aes-192-ctr" */
3398422, /* "aes-192-ecb" */ 3489422, /* "aes-192-ecb" */
3490898, /* "aes-192-gcm" */
3399424, /* "aes-192-ofb" */ 3491424, /* "aes-192-ofb" */
3400427, /* "aes-256-cbc" */ 3492427, /* "aes-256-cbc" */
3493918, /* "aes-256-cbc-hmac-sha1" */
3494902, /* "aes-256-ccm" */
3401429, /* "aes-256-cfb" */ 3495429, /* "aes-256-cfb" */
3402652, /* "aes-256-cfb1" */ 3496652, /* "aes-256-cfb1" */
3403655, /* "aes-256-cfb8" */ 3497655, /* "aes-256-cfb8" */
3498906, /* "aes-256-ctr" */
3404426, /* "aes-256-ecb" */ 3499426, /* "aes-256-ecb" */
3500901, /* "aes-256-gcm" */
3405428, /* "aes-256-ofb" */ 3501428, /* "aes-256-ofb" */
3502914, /* "aes-256-xts" */
3406376, /* "algorithm" */ 3503376, /* "algorithm" */
3407484, /* "associatedDomain" */ 3504484, /* "associatedDomain" */
3408485, /* "associatedName" */ 3505485, /* "associatedName" */
@@ -3467,6 +3564,7 @@ static const unsigned int ln_objs[NUM_LN]={
3467407, /* "characteristic-two-field" */ 3564407, /* "characteristic-two-field" */
3468395, /* "clearance" */ 3565395, /* "clearance" */
3469633, /* "cleartext track 2" */ 3566633, /* "cleartext track 2" */
3567894, /* "cmac" */
347013, /* "commonName" */ 356813, /* "commonName" */
3471513, /* "content types" */ 3569513, /* "content types" */
347250, /* "contentType" */ 357050, /* "contentType" */
@@ -3602,13 +3700,20 @@ static const unsigned int ln_objs[NUM_LN]={
3602358, /* "id-aca-role" */ 3700358, /* "id-aca-role" */
3603176, /* "id-ad" */ 3701176, /* "id-ad" */
3604788, /* "id-aes128-wrap" */ 3702788, /* "id-aes128-wrap" */
3703897, /* "id-aes128-wrap-pad" */
3605789, /* "id-aes192-wrap" */ 3704789, /* "id-aes192-wrap" */
3705900, /* "id-aes192-wrap-pad" */
3606790, /* "id-aes256-wrap" */ 3706790, /* "id-aes256-wrap" */
3707903, /* "id-aes256-wrap-pad" */
3607262, /* "id-alg" */ 3708262, /* "id-alg" */
3709893, /* "id-alg-PWRI-KEK" */
3608323, /* "id-alg-des40" */ 3710323, /* "id-alg-des40" */
3609326, /* "id-alg-dh-pop" */ 3711326, /* "id-alg-dh-pop" */
3610325, /* "id-alg-dh-sig-hmac-sha1" */ 3712325, /* "id-alg-dh-sig-hmac-sha1" */
3611324, /* "id-alg-noSignature" */ 3713324, /* "id-alg-noSignature" */
3714907, /* "id-camellia128-wrap" */
3715908, /* "id-camellia192-wrap" */
3716909, /* "id-camellia256-wrap" */
3612268, /* "id-cct" */ 3717268, /* "id-cct" */
3613361, /* "id-cct-PKIData" */ 3718361, /* "id-cct-PKIData" */
3614362, /* "id-cct-PKIResponse" */ 3719362, /* "id-cct-PKIResponse" */
@@ -3806,6 +3911,7 @@ static const unsigned int ln_objs[NUM_LN]={
3806602, /* "merchant initiated auth" */ 3911602, /* "merchant initiated auth" */
3807514, /* "message extensions" */ 3912514, /* "message extensions" */
380851, /* "messageDigest" */ 391351, /* "messageDigest" */
3914911, /* "mgf1" */
3809506, /* "mime-mhs-bodies" */ 3915506, /* "mime-mhs-bodies" */
3810505, /* "mime-mhs-headings" */ 3916505, /* "mime-mhs-headings" */
3811488, /* "mobileTelephoneNumber" */ 3917488, /* "mobileTelephoneNumber" */
@@ -3889,6 +3995,7 @@ static const unsigned int ln_objs[NUM_LN]={
388940, /* "rc2-ofb" */ 399540, /* "rc2-ofb" */
3890 5, /* "rc4" */ 3996 5, /* "rc4" */
389197, /* "rc4-40" */ 399797, /* "rc4-40" */
3998915, /* "rc4-hmac-md5" */
3892120, /* "rc5-cbc" */ 3999120, /* "rc5-cbc" */
3893122, /* "rc5-cfb" */ 4000122, /* "rc5-cfb" */
3894121, /* "rc5-ecb" */ 4001121, /* "rc5-ecb" */
@@ -3905,6 +4012,8 @@ static const unsigned int ln_objs[NUM_LN]={
3905 6, /* "rsaEncryption" */ 4012 6, /* "rsaEncryption" */
3906644, /* "rsaOAEPEncryptionSET" */ 4013644, /* "rsaOAEPEncryptionSET" */
3907377, /* "rsaSignature" */ 4014377, /* "rsaSignature" */
4015919, /* "rsaesOaep" */
4016912, /* "rsassaPss" */
3908124, /* "run length compression" */ 4017124, /* "run length compression" */
3909482, /* "sOARecord" */ 4018482, /* "sOARecord" */
3910155, /* "safeContentsBag" */ 4019155, /* "safeContentsBag" */
@@ -4254,6 +4363,7 @@ static const unsigned int obj_objs[NUM_OBJ]={
425496, /* OBJ_mdc2WithRSA 2 5 8 3 100 */ 436396, /* OBJ_mdc2WithRSA 2 5 8 3 100 */
425595, /* OBJ_mdc2 2 5 8 3 101 */ 436495, /* OBJ_mdc2 2 5 8 3 101 */
4256746, /* OBJ_any_policy 2 5 29 32 0 */ 4365746, /* OBJ_any_policy 2 5 29 32 0 */
4366910, /* OBJ_anyExtendedKeyUsage 2 5 29 37 0 */
4257519, /* OBJ_setct_PANData 2 23 42 0 0 */ 4367519, /* OBJ_setct_PANData 2 23 42 0 0 */
4258520, /* OBJ_setct_PANToken 2 23 42 0 1 */ 4368520, /* OBJ_setct_PANToken 2 23 42 0 1 */
4259521, /* OBJ_setct_PANOnly 2 23 42 0 2 */ 4369521, /* OBJ_setct_PANOnly 2 23 42 0 2 */
@@ -4720,6 +4830,9 @@ static const unsigned int obj_objs[NUM_OBJ]={
4720 8, /* OBJ_md5WithRSAEncryption 1 2 840 113549 1 1 4 */ 4830 8, /* OBJ_md5WithRSAEncryption 1 2 840 113549 1 1 4 */
472165, /* OBJ_sha1WithRSAEncryption 1 2 840 113549 1 1 5 */ 483165, /* OBJ_sha1WithRSAEncryption 1 2 840 113549 1 1 5 */
4722644, /* OBJ_rsaOAEPEncryptionSET 1 2 840 113549 1 1 6 */ 4832644, /* OBJ_rsaOAEPEncryptionSET 1 2 840 113549 1 1 6 */
4833919, /* OBJ_rsaesOaep 1 2 840 113549 1 1 7 */
4834911, /* OBJ_mgf1 1 2 840 113549 1 1 8 */
4835912, /* OBJ_rsassaPss 1 2 840 113549 1 1 10 */
4723668, /* OBJ_sha256WithRSAEncryption 1 2 840 113549 1 1 11 */ 4836668, /* OBJ_sha256WithRSAEncryption 1 2 840 113549 1 1 11 */
4724669, /* OBJ_sha384WithRSAEncryption 1 2 840 113549 1 1 12 */ 4837669, /* OBJ_sha384WithRSAEncryption 1 2 840 113549 1 1 12 */
4725670, /* OBJ_sha512WithRSAEncryption 1 2 840 113549 1 1 13 */ 4838670, /* OBJ_sha512WithRSAEncryption 1 2 840 113549 1 1 13 */
@@ -4785,16 +4898,25 @@ static const unsigned int obj_objs[NUM_OBJ]={
4785420, /* OBJ_aes_128_ofb128 2 16 840 1 101 3 4 1 3 */ 4898420, /* OBJ_aes_128_ofb128 2 16 840 1 101 3 4 1 3 */
4786421, /* OBJ_aes_128_cfb128 2 16 840 1 101 3 4 1 4 */ 4899421, /* OBJ_aes_128_cfb128 2 16 840 1 101 3 4 1 4 */
4787788, /* OBJ_id_aes128_wrap 2 16 840 1 101 3 4 1 5 */ 4900788, /* OBJ_id_aes128_wrap 2 16 840 1 101 3 4 1 5 */
4901895, /* OBJ_aes_128_gcm 2 16 840 1 101 3 4 1 6 */
4902896, /* OBJ_aes_128_ccm 2 16 840 1 101 3 4 1 7 */
4903897, /* OBJ_id_aes128_wrap_pad 2 16 840 1 101 3 4 1 8 */
4788422, /* OBJ_aes_192_ecb 2 16 840 1 101 3 4 1 21 */ 4904422, /* OBJ_aes_192_ecb 2 16 840 1 101 3 4 1 21 */
4789423, /* OBJ_aes_192_cbc 2 16 840 1 101 3 4 1 22 */ 4905423, /* OBJ_aes_192_cbc 2 16 840 1 101 3 4 1 22 */
4790424, /* OBJ_aes_192_ofb128 2 16 840 1 101 3 4 1 23 */ 4906424, /* OBJ_aes_192_ofb128 2 16 840 1 101 3 4 1 23 */
4791425, /* OBJ_aes_192_cfb128 2 16 840 1 101 3 4 1 24 */ 4907425, /* OBJ_aes_192_cfb128 2 16 840 1 101 3 4 1 24 */
4792789, /* OBJ_id_aes192_wrap 2 16 840 1 101 3 4 1 25 */ 4908789, /* OBJ_id_aes192_wrap 2 16 840 1 101 3 4 1 25 */
4909898, /* OBJ_aes_192_gcm 2 16 840 1 101 3 4 1 26 */
4910899, /* OBJ_aes_192_ccm 2 16 840 1 101 3 4 1 27 */
4911900, /* OBJ_id_aes192_wrap_pad 2 16 840 1 101 3 4 1 28 */
4793426, /* OBJ_aes_256_ecb 2 16 840 1 101 3 4 1 41 */ 4912426, /* OBJ_aes_256_ecb 2 16 840 1 101 3 4 1 41 */
4794427, /* OBJ_aes_256_cbc 2 16 840 1 101 3 4 1 42 */ 4913427, /* OBJ_aes_256_cbc 2 16 840 1 101 3 4 1 42 */
4795428, /* OBJ_aes_256_ofb128 2 16 840 1 101 3 4 1 43 */ 4914428, /* OBJ_aes_256_ofb128 2 16 840 1 101 3 4 1 43 */
4796429, /* OBJ_aes_256_cfb128 2 16 840 1 101 3 4 1 44 */ 4915429, /* OBJ_aes_256_cfb128 2 16 840 1 101 3 4 1 44 */
4797790, /* OBJ_id_aes256_wrap 2 16 840 1 101 3 4 1 45 */ 4916790, /* OBJ_id_aes256_wrap 2 16 840 1 101 3 4 1 45 */
4917901, /* OBJ_aes_256_gcm 2 16 840 1 101 3 4 1 46 */
4918902, /* OBJ_aes_256_ccm 2 16 840 1 101 3 4 1 47 */
4919903, /* OBJ_id_aes256_wrap_pad 2 16 840 1 101 3 4 1 48 */
4798672, /* OBJ_sha256 2 16 840 1 101 3 4 2 1 */ 4920672, /* OBJ_sha256 2 16 840 1 101 3 4 2 1 */
4799673, /* OBJ_sha384 2 16 840 1 101 3 4 2 2 */ 4921673, /* OBJ_sha384 2 16 840 1 101 3 4 2 2 */
4800674, /* OBJ_sha512 2 16 840 1 101 3 4 2 3 */ 4922674, /* OBJ_sha512 2 16 840 1 101 3 4 2 3 */
@@ -4901,6 +5023,9 @@ static const unsigned int obj_objs[NUM_OBJ]={
4901751, /* OBJ_camellia_128_cbc 1 2 392 200011 61 1 1 1 2 */ 5023751, /* OBJ_camellia_128_cbc 1 2 392 200011 61 1 1 1 2 */
4902752, /* OBJ_camellia_192_cbc 1 2 392 200011 61 1 1 1 3 */ 5024752, /* OBJ_camellia_192_cbc 1 2 392 200011 61 1 1 1 3 */
4903753, /* OBJ_camellia_256_cbc 1 2 392 200011 61 1 1 1 4 */ 5025753, /* OBJ_camellia_256_cbc 1 2 392 200011 61 1 1 1 4 */
5026907, /* OBJ_id_camellia128_wrap 1 2 392 200011 61 1 1 3 2 */
5027908, /* OBJ_id_camellia192_wrap 1 2 392 200011 61 1 1 3 3 */
5028909, /* OBJ_id_camellia256_wrap 1 2 392 200011 61 1 1 3 4 */
4904196, /* OBJ_id_smime_mod_cms 1 2 840 113549 1 9 16 0 1 */ 5029196, /* OBJ_id_smime_mod_cms 1 2 840 113549 1 9 16 0 1 */
4905197, /* OBJ_id_smime_mod_ess 1 2 840 113549 1 9 16 0 2 */ 5030197, /* OBJ_id_smime_mod_ess 1 2 840 113549 1 9 16 0 2 */
4906198, /* OBJ_id_smime_mod_oid 1 2 840 113549 1 9 16 0 3 */ 5031198, /* OBJ_id_smime_mod_oid 1 2 840 113549 1 9 16 0 3 */
@@ -4956,6 +5081,7 @@ static const unsigned int obj_objs[NUM_OBJ]={
4956246, /* OBJ_id_smime_alg_CMS3DESwrap 1 2 840 113549 1 9 16 3 6 */ 5081246, /* OBJ_id_smime_alg_CMS3DESwrap 1 2 840 113549 1 9 16 3 6 */
4957247, /* OBJ_id_smime_alg_CMSRC2wrap 1 2 840 113549 1 9 16 3 7 */ 5082247, /* OBJ_id_smime_alg_CMSRC2wrap 1 2 840 113549 1 9 16 3 7 */
4958125, /* OBJ_zlib_compression 1 2 840 113549 1 9 16 3 8 */ 5083125, /* OBJ_zlib_compression 1 2 840 113549 1 9 16 3 8 */
5084893, /* OBJ_id_alg_PWRI_KEK 1 2 840 113549 1 9 16 3 9 */
4959248, /* OBJ_id_smime_cd_ldap 1 2 840 113549 1 9 16 4 1 */ 5085248, /* OBJ_id_smime_cd_ldap 1 2 840 113549 1 9 16 4 1 */
4960249, /* OBJ_id_smime_spq_ets_sqt_uri 1 2 840 113549 1 9 16 5 1 */ 5086249, /* OBJ_id_smime_spq_ets_sqt_uri 1 2 840 113549 1 9 16 5 1 */
4961250, /* OBJ_id_smime_spq_ets_sqt_unotice 1 2 840 113549 1 9 16 5 2 */ 5087250, /* OBJ_id_smime_spq_ets_sqt_unotice 1 2 840 113549 1 9 16 5 2 */
diff --git a/src/lib/libcrypto/objects/obj_mac.h b/src/lib/libcrypto/objects/obj_mac.h
index 282f11a8a8..b5ea7cdab4 100644
--- a/src/lib/libcrypto/objects/obj_mac.h
+++ b/src/lib/libcrypto/objects/obj_mac.h
@@ -580,6 +580,21 @@
580#define NID_sha1WithRSAEncryption 65 580#define NID_sha1WithRSAEncryption 65
581#define OBJ_sha1WithRSAEncryption OBJ_pkcs1,5L 581#define OBJ_sha1WithRSAEncryption OBJ_pkcs1,5L
582 582
583#define SN_rsaesOaep "RSAES-OAEP"
584#define LN_rsaesOaep "rsaesOaep"
585#define NID_rsaesOaep 919
586#define OBJ_rsaesOaep OBJ_pkcs1,7L
587
588#define SN_mgf1 "MGF1"
589#define LN_mgf1 "mgf1"
590#define NID_mgf1 911
591#define OBJ_mgf1 OBJ_pkcs1,8L
592
593#define SN_rsassaPss "RSASSA-PSS"
594#define LN_rsassaPss "rsassaPss"
595#define NID_rsassaPss 912
596#define OBJ_rsassaPss OBJ_pkcs1,10L
597
583#define SN_sha256WithRSAEncryption "RSA-SHA256" 598#define SN_sha256WithRSAEncryption "RSA-SHA256"
584#define LN_sha256WithRSAEncryption "sha256WithRSAEncryption" 599#define LN_sha256WithRSAEncryption "sha256WithRSAEncryption"
585#define NID_sha256WithRSAEncryption 668 600#define NID_sha256WithRSAEncryption 668
@@ -981,6 +996,10 @@
981#define NID_id_smime_alg_CMSRC2wrap 247 996#define NID_id_smime_alg_CMSRC2wrap 247
982#define OBJ_id_smime_alg_CMSRC2wrap OBJ_id_smime_alg,7L 997#define OBJ_id_smime_alg_CMSRC2wrap OBJ_id_smime_alg,7L
983 998
999#define SN_id_alg_PWRI_KEK "id-alg-PWRI-KEK"
1000#define NID_id_alg_PWRI_KEK 893
1001#define OBJ_id_alg_PWRI_KEK OBJ_id_smime_alg,9L
1002
984#define SN_id_smime_cd_ldap "id-smime-cd-ldap" 1003#define SN_id_smime_cd_ldap "id-smime-cd-ldap"
985#define NID_id_smime_cd_ldap 248 1004#define NID_id_smime_cd_ldap 248
986#define OBJ_id_smime_cd_ldap OBJ_id_smime_cd,1L 1005#define OBJ_id_smime_cd_ldap OBJ_id_smime_cd,1L
@@ -2399,6 +2418,11 @@
2399#define NID_no_rev_avail 403 2418#define NID_no_rev_avail 403
2400#define OBJ_no_rev_avail OBJ_id_ce,56L 2419#define OBJ_no_rev_avail OBJ_id_ce,56L
2401 2420
2421#define SN_anyExtendedKeyUsage "anyExtendedKeyUsage"
2422#define LN_anyExtendedKeyUsage "Any Extended Key Usage"
2423#define NID_anyExtendedKeyUsage 910
2424#define OBJ_anyExtendedKeyUsage OBJ_ext_key_usage,0L
2425
2402#define SN_netscape "Netscape" 2426#define SN_netscape "Netscape"
2403#define LN_netscape "Netscape Communications Corp." 2427#define LN_netscape "Netscape Communications Corp."
2404#define NID_netscape 57 2428#define NID_netscape 57
@@ -2586,6 +2610,24 @@
2586#define NID_aes_128_cfb128 421 2610#define NID_aes_128_cfb128 421
2587#define OBJ_aes_128_cfb128 OBJ_aes,4L 2611#define OBJ_aes_128_cfb128 OBJ_aes,4L
2588 2612
2613#define SN_id_aes128_wrap "id-aes128-wrap"
2614#define NID_id_aes128_wrap 788
2615#define OBJ_id_aes128_wrap OBJ_aes,5L
2616
2617#define SN_aes_128_gcm "id-aes128-GCM"
2618#define LN_aes_128_gcm "aes-128-gcm"
2619#define NID_aes_128_gcm 895
2620#define OBJ_aes_128_gcm OBJ_aes,6L
2621
2622#define SN_aes_128_ccm "id-aes128-CCM"
2623#define LN_aes_128_ccm "aes-128-ccm"
2624#define NID_aes_128_ccm 896
2625#define OBJ_aes_128_ccm OBJ_aes,7L
2626
2627#define SN_id_aes128_wrap_pad "id-aes128-wrap-pad"
2628#define NID_id_aes128_wrap_pad 897
2629#define OBJ_id_aes128_wrap_pad OBJ_aes,8L
2630
2589#define SN_aes_192_ecb "AES-192-ECB" 2631#define SN_aes_192_ecb "AES-192-ECB"
2590#define LN_aes_192_ecb "aes-192-ecb" 2632#define LN_aes_192_ecb "aes-192-ecb"
2591#define NID_aes_192_ecb 422 2633#define NID_aes_192_ecb 422
@@ -2606,6 +2648,24 @@
2606#define NID_aes_192_cfb128 425 2648#define NID_aes_192_cfb128 425
2607#define OBJ_aes_192_cfb128 OBJ_aes,24L 2649#define OBJ_aes_192_cfb128 OBJ_aes,24L
2608 2650
2651#define SN_id_aes192_wrap "id-aes192-wrap"
2652#define NID_id_aes192_wrap 789
2653#define OBJ_id_aes192_wrap OBJ_aes,25L
2654
2655#define SN_aes_192_gcm "id-aes192-GCM"
2656#define LN_aes_192_gcm "aes-192-gcm"
2657#define NID_aes_192_gcm 898
2658#define OBJ_aes_192_gcm OBJ_aes,26L
2659
2660#define SN_aes_192_ccm "id-aes192-CCM"
2661#define LN_aes_192_ccm "aes-192-ccm"
2662#define NID_aes_192_ccm 899
2663#define OBJ_aes_192_ccm OBJ_aes,27L
2664
2665#define SN_id_aes192_wrap_pad "id-aes192-wrap-pad"
2666#define NID_id_aes192_wrap_pad 900
2667#define OBJ_id_aes192_wrap_pad OBJ_aes,28L
2668
2609#define SN_aes_256_ecb "AES-256-ECB" 2669#define SN_aes_256_ecb "AES-256-ECB"
2610#define LN_aes_256_ecb "aes-256-ecb" 2670#define LN_aes_256_ecb "aes-256-ecb"
2611#define NID_aes_256_ecb 426 2671#define NID_aes_256_ecb 426
@@ -2626,6 +2686,24 @@
2626#define NID_aes_256_cfb128 429 2686#define NID_aes_256_cfb128 429
2627#define OBJ_aes_256_cfb128 OBJ_aes,44L 2687#define OBJ_aes_256_cfb128 OBJ_aes,44L
2628 2688
2689#define SN_id_aes256_wrap "id-aes256-wrap"
2690#define NID_id_aes256_wrap 790
2691#define OBJ_id_aes256_wrap OBJ_aes,45L
2692
2693#define SN_aes_256_gcm "id-aes256-GCM"
2694#define LN_aes_256_gcm "aes-256-gcm"
2695#define NID_aes_256_gcm 901
2696#define OBJ_aes_256_gcm OBJ_aes,46L
2697
2698#define SN_aes_256_ccm "id-aes256-CCM"
2699#define LN_aes_256_ccm "aes-256-ccm"
2700#define NID_aes_256_ccm 902
2701#define OBJ_aes_256_ccm OBJ_aes,47L
2702
2703#define SN_id_aes256_wrap_pad "id-aes256-wrap-pad"
2704#define NID_id_aes256_wrap_pad 903
2705#define OBJ_id_aes256_wrap_pad OBJ_aes,48L
2706
2629#define SN_aes_128_cfb1 "AES-128-CFB1" 2707#define SN_aes_128_cfb1 "AES-128-CFB1"
2630#define LN_aes_128_cfb1 "aes-128-cfb1" 2708#define LN_aes_128_cfb1 "aes-128-cfb1"
2631#define NID_aes_128_cfb1 650 2709#define NID_aes_128_cfb1 650
@@ -2650,6 +2728,26 @@
2650#define LN_aes_256_cfb8 "aes-256-cfb8" 2728#define LN_aes_256_cfb8 "aes-256-cfb8"
2651#define NID_aes_256_cfb8 655 2729#define NID_aes_256_cfb8 655
2652 2730
2731#define SN_aes_128_ctr "AES-128-CTR"
2732#define LN_aes_128_ctr "aes-128-ctr"
2733#define NID_aes_128_ctr 904
2734
2735#define SN_aes_192_ctr "AES-192-CTR"
2736#define LN_aes_192_ctr "aes-192-ctr"
2737#define NID_aes_192_ctr 905
2738
2739#define SN_aes_256_ctr "AES-256-CTR"
2740#define LN_aes_256_ctr "aes-256-ctr"
2741#define NID_aes_256_ctr 906
2742
2743#define SN_aes_128_xts "AES-128-XTS"
2744#define LN_aes_128_xts "aes-128-xts"
2745#define NID_aes_128_xts 913
2746
2747#define SN_aes_256_xts "AES-256-XTS"
2748#define LN_aes_256_xts "aes-256-xts"
2749#define NID_aes_256_xts 914
2750
2653#define SN_des_cfb1 "DES-CFB1" 2751#define SN_des_cfb1 "DES-CFB1"
2654#define LN_des_cfb1 "des-cfb1" 2752#define LN_des_cfb1 "des-cfb1"
2655#define NID_des_cfb1 656 2753#define NID_des_cfb1 656
@@ -2666,18 +2764,6 @@
2666#define LN_des_ede3_cfb8 "des-ede3-cfb8" 2764#define LN_des_ede3_cfb8 "des-ede3-cfb8"
2667#define NID_des_ede3_cfb8 659 2765#define NID_des_ede3_cfb8 659
2668 2766
2669#define SN_id_aes128_wrap "id-aes128-wrap"
2670#define NID_id_aes128_wrap 788
2671#define OBJ_id_aes128_wrap OBJ_aes,5L
2672
2673#define SN_id_aes192_wrap "id-aes192-wrap"
2674#define NID_id_aes192_wrap 789
2675#define OBJ_id_aes192_wrap OBJ_aes,25L
2676
2677#define SN_id_aes256_wrap "id-aes256-wrap"
2678#define NID_id_aes256_wrap 790
2679#define OBJ_id_aes256_wrap OBJ_aes,45L
2680
2681#define OBJ_nist_hashalgs OBJ_nistAlgorithms,2L 2767#define OBJ_nist_hashalgs OBJ_nistAlgorithms,2L
2682 2768
2683#define SN_sha256 "SHA256" 2769#define SN_sha256 "SHA256"
@@ -3810,6 +3896,18 @@
3810#define NID_camellia_256_cbc 753 3896#define NID_camellia_256_cbc 753
3811#define OBJ_camellia_256_cbc 1L,2L,392L,200011L,61L,1L,1L,1L,4L 3897#define OBJ_camellia_256_cbc 1L,2L,392L,200011L,61L,1L,1L,1L,4L
3812 3898
3899#define SN_id_camellia128_wrap "id-camellia128-wrap"
3900#define NID_id_camellia128_wrap 907
3901#define OBJ_id_camellia128_wrap 1L,2L,392L,200011L,61L,1L,1L,3L,2L
3902
3903#define SN_id_camellia192_wrap "id-camellia192-wrap"
3904#define NID_id_camellia192_wrap 908
3905#define OBJ_id_camellia192_wrap 1L,2L,392L,200011L,61L,1L,1L,3L,3L
3906
3907#define SN_id_camellia256_wrap "id-camellia256-wrap"
3908#define NID_id_camellia256_wrap 909
3909#define OBJ_id_camellia256_wrap 1L,2L,392L,200011L,61L,1L,1L,3L,4L
3910
3813#define OBJ_ntt_ds 0L,3L,4401L,5L 3911#define OBJ_ntt_ds 0L,3L,4401L,5L
3814 3912
3815#define OBJ_camellia OBJ_ntt_ds,3L,1L,9L 3913#define OBJ_camellia OBJ_ntt_ds,3L,1L,9L
@@ -3912,3 +4010,23 @@
3912#define LN_hmac "hmac" 4010#define LN_hmac "hmac"
3913#define NID_hmac 855 4011#define NID_hmac 855
3914 4012
4013#define SN_cmac "CMAC"
4014#define LN_cmac "cmac"
4015#define NID_cmac 894
4016
4017#define SN_rc4_hmac_md5 "RC4-HMAC-MD5"
4018#define LN_rc4_hmac_md5 "rc4-hmac-md5"
4019#define NID_rc4_hmac_md5 915
4020
4021#define SN_aes_128_cbc_hmac_sha1 "AES-128-CBC-HMAC-SHA1"
4022#define LN_aes_128_cbc_hmac_sha1 "aes-128-cbc-hmac-sha1"
4023#define NID_aes_128_cbc_hmac_sha1 916
4024
4025#define SN_aes_192_cbc_hmac_sha1 "AES-192-CBC-HMAC-SHA1"
4026#define LN_aes_192_cbc_hmac_sha1 "aes-192-cbc-hmac-sha1"
4027#define NID_aes_192_cbc_hmac_sha1 917
4028
4029#define SN_aes_256_cbc_hmac_sha1 "AES-256-CBC-HMAC-SHA1"
4030#define LN_aes_256_cbc_hmac_sha1 "aes-256-cbc-hmac-sha1"
4031#define NID_aes_256_cbc_hmac_sha1 918
4032
diff --git a/src/lib/libcrypto/opensslconf.h b/src/lib/libcrypto/opensslconf.h
index c21b3913f0..b18f4da496 100644
--- a/src/lib/libcrypto/opensslconf.h
+++ b/src/lib/libcrypto/opensslconf.h
@@ -5,6 +5,9 @@
5#ifndef OPENSSL_DOING_MAKEDEPEND 5#ifndef OPENSSL_DOING_MAKEDEPEND
6 6
7 7
8#ifndef OPENSSL_NO_EC_NISTP_64_GCC_128
9# define OPENSSL_NO_EC_NISTP_64_GCC_128
10#endif
8#ifndef OPENSSL_NO_GMP 11#ifndef OPENSSL_NO_GMP
9# define OPENSSL_NO_GMP 12# define OPENSSL_NO_GMP
10#endif 13#endif
@@ -23,6 +26,9 @@
23#ifndef OPENSSL_NO_RFC3779 26#ifndef OPENSSL_NO_RFC3779
24# define OPENSSL_NO_RFC3779 27# define OPENSSL_NO_RFC3779
25#endif 28#endif
29#ifndef OPENSSL_NO_SCTP
30# define OPENSSL_NO_SCTP
31#endif
26#ifndef OPENSSL_NO_STORE 32#ifndef OPENSSL_NO_STORE
27# define OPENSSL_NO_STORE 33# define OPENSSL_NO_STORE
28#endif 34#endif
@@ -38,6 +44,9 @@
38 who haven't had the time to do the appropriate changes in their 44 who haven't had the time to do the appropriate changes in their
39 applications. */ 45 applications. */
40#ifdef OPENSSL_ALGORITHM_DEFINES 46#ifdef OPENSSL_ALGORITHM_DEFINES
47# if defined(OPENSSL_NO_EC_NISTP_64_GCC_128) && !defined(NO_EC_NISTP_64_GCC_128)
48# define NO_EC_NISTP_64_GCC_128
49# endif
41# if defined(OPENSSL_NO_GMP) && !defined(NO_GMP) 50# if defined(OPENSSL_NO_GMP) && !defined(NO_GMP)
42# define NO_GMP 51# define NO_GMP
43# endif 52# endif
@@ -56,6 +65,9 @@
56# if defined(OPENSSL_NO_RFC3779) && !defined(NO_RFC3779) 65# if defined(OPENSSL_NO_RFC3779) && !defined(NO_RFC3779)
57# define NO_RFC3779 66# define NO_RFC3779
58# endif 67# endif
68# if defined(OPENSSL_NO_SCTP) && !defined(NO_SCTP)
69# define NO_SCTP
70# endif
59# if defined(OPENSSL_NO_STORE) && !defined(NO_STORE) 71# if defined(OPENSSL_NO_STORE) && !defined(NO_STORE)
60# define NO_STORE 72# define NO_STORE
61# endif 73# endif
diff --git a/src/lib/libcrypto/perlasm/x86nasm.pl b/src/lib/libcrypto/perlasm/x86nasm.pl
index ce2bed9bb2..ca2511c9eb 100644
--- a/src/lib/libcrypto/perlasm/x86nasm.pl
+++ b/src/lib/libcrypto/perlasm/x86nasm.pl
@@ -19,6 +19,8 @@ sub ::generic
19 { $_[0] = "NEAR $_[0]"; } 19 { $_[0] = "NEAR $_[0]"; }
20 elsif ($opcode eq "lea" && $#_==1) # wipe storage qualifier from lea 20 elsif ($opcode eq "lea" && $#_==1) # wipe storage qualifier from lea
21 { $_[1] =~ s/^[^\[]*\[/\[/o; } 21 { $_[1] =~ s/^[^\[]*\[/\[/o; }
22 elsif ($opcode eq "clflush" && $#_==0)
23 { $_[0] =~ s/^[^\[]*\[/\[/o; }
22 } 24 }
23 &::emit($opcode,@_); 25 &::emit($opcode,@_);
24 1; 26 1;
@@ -67,6 +69,7 @@ sub get_mem
67} 69}
68sub ::BP { &get_mem("BYTE",@_); } 70sub ::BP { &get_mem("BYTE",@_); }
69sub ::DWP { &get_mem("DWORD",@_); } 71sub ::DWP { &get_mem("DWORD",@_); }
72sub ::WP { &get_mem("WORD",@_); }
70sub ::QWP { &get_mem("",@_); } 73sub ::QWP { &get_mem("",@_); }
71sub ::BC { (($::mwerks)?"":"BYTE ")."@_"; } 74sub ::BC { (($::mwerks)?"":"BYTE ")."@_"; }
72sub ::DWC { (($::mwerks)?"":"DWORD ")."@_"; } 75sub ::DWC { (($::mwerks)?"":"DWORD ")."@_"; }
@@ -114,7 +117,7 @@ sub ::file_end
114{ if (grep {/\b${nmdecor}OPENSSL_ia32cap_P\b/i} @out) 117{ if (grep {/\b${nmdecor}OPENSSL_ia32cap_P\b/i} @out)
115 { my $comm=<<___; 118 { my $comm=<<___;
116${drdecor}segment .bss 119${drdecor}segment .bss
117${drdecor}common ${nmdecor}OPENSSL_ia32cap_P 4 120${drdecor}common ${nmdecor}OPENSSL_ia32cap_P 8
118___ 121___
119 # comment out OPENSSL_ia32cap_P declarations 122 # comment out OPENSSL_ia32cap_P declarations
120 grep {s/(^extern\s+${nmdecor}OPENSSL_ia32cap_P)/\;$1/} @out; 123 grep {s/(^extern\s+${nmdecor}OPENSSL_ia32cap_P)/\;$1/} @out;
@@ -135,7 +138,8 @@ sub ::public_label
135 138
136sub ::data_byte 139sub ::data_byte
137{ push(@out,(($::mwerks)?".byte\t":"db\t").join(',',@_)."\n"); } 140{ push(@out,(($::mwerks)?".byte\t":"db\t").join(',',@_)."\n"); }
138 141sub ::data_short
142{ push(@out,(($::mwerks)?".word\t":"dw\t").join(',',@_)."\n"); }
139sub ::data_word 143sub ::data_word
140{ push(@out,(($::mwerks)?".long\t":"dd\t").join(',',@_)."\n"); } 144{ push(@out,(($::mwerks)?".long\t":"dd\t").join(',',@_)."\n"); }
141 145
@@ -163,4 +167,11 @@ sub ::dataseg
163 else { push(@out,"section\t.data align=4\n"); } 167 else { push(@out,"section\t.data align=4\n"); }
164} 168}
165 169
170sub ::safeseh
171{ my $nm=shift;
172 push(@out,"%if __NASM_VERSION_ID__ >= 0x02030000\n");
173 push(@out,"safeseh ".&::LABEL($nm,$nmdecor.$nm)."\n");
174 push(@out,"%endif\n");
175}
176
1661; 1771;
diff --git a/src/lib/libcrypto/rand/md_rand.c b/src/lib/libcrypto/rand/md_rand.c
index b2f04ff13e..fcdd3f2a84 100644
--- a/src/lib/libcrypto/rand/md_rand.c
+++ b/src/lib/libcrypto/rand/md_rand.c
@@ -109,6 +109,8 @@
109 * 109 *
110 */ 110 */
111 111
112#define OPENSSL_FIPSEVP
113
112#ifdef MD_RAND_DEBUG 114#ifdef MD_RAND_DEBUG
113# ifndef NDEBUG 115# ifndef NDEBUG
114# define NDEBUG 116# define NDEBUG
@@ -157,13 +159,14 @@ const char RAND_version[]="RAND" OPENSSL_VERSION_PTEXT;
157static void ssleay_rand_cleanup(void); 159static void ssleay_rand_cleanup(void);
158static void ssleay_rand_seed(const void *buf, int num); 160static void ssleay_rand_seed(const void *buf, int num);
159static void ssleay_rand_add(const void *buf, int num, double add_entropy); 161static void ssleay_rand_add(const void *buf, int num, double add_entropy);
160static int ssleay_rand_bytes(unsigned char *buf, int num); 162static int ssleay_rand_bytes(unsigned char *buf, int num, int pseudo);
163static int ssleay_rand_nopseudo_bytes(unsigned char *buf, int num);
161static int ssleay_rand_pseudo_bytes(unsigned char *buf, int num); 164static int ssleay_rand_pseudo_bytes(unsigned char *buf, int num);
162static int ssleay_rand_status(void); 165static int ssleay_rand_status(void);
163 166
164RAND_METHOD rand_ssleay_meth={ 167RAND_METHOD rand_ssleay_meth={
165 ssleay_rand_seed, 168 ssleay_rand_seed,
166 ssleay_rand_bytes, 169 ssleay_rand_nopseudo_bytes,
167 ssleay_rand_cleanup, 170 ssleay_rand_cleanup,
168 ssleay_rand_add, 171 ssleay_rand_add,
169 ssleay_rand_pseudo_bytes, 172 ssleay_rand_pseudo_bytes,
@@ -328,7 +331,7 @@ static void ssleay_rand_seed(const void *buf, int num)
328 ssleay_rand_add(buf, num, (double)num); 331 ssleay_rand_add(buf, num, (double)num);
329 } 332 }
330 333
331static int ssleay_rand_bytes(unsigned char *buf, int num) 334static int ssleay_rand_bytes(unsigned char *buf, int num, int pseudo)
332 { 335 {
333 static volatile int stirred_pool = 0; 336 static volatile int stirred_pool = 0;
334 int i,j,k,st_num,st_idx; 337 int i,j,k,st_num,st_idx;
@@ -517,7 +520,9 @@ static int ssleay_rand_bytes(unsigned char *buf, int num)
517 EVP_MD_CTX_cleanup(&m); 520 EVP_MD_CTX_cleanup(&m);
518 if (ok) 521 if (ok)
519 return(1); 522 return(1);
520 else 523 else if (pseudo)
524 return 0;
525 else
521 { 526 {
522 RANDerr(RAND_F_SSLEAY_RAND_BYTES,RAND_R_PRNG_NOT_SEEDED); 527 RANDerr(RAND_F_SSLEAY_RAND_BYTES,RAND_R_PRNG_NOT_SEEDED);
523 ERR_add_error_data(1, "You need to read the OpenSSL FAQ, " 528 ERR_add_error_data(1, "You need to read the OpenSSL FAQ, "
@@ -526,22 +531,16 @@ static int ssleay_rand_bytes(unsigned char *buf, int num)
526 } 531 }
527 } 532 }
528 533
534static int ssleay_rand_nopseudo_bytes(unsigned char *buf, int num)
535 {
536 return ssleay_rand_bytes(buf, num, 0);
537 }
538
529/* pseudo-random bytes that are guaranteed to be unique but not 539/* pseudo-random bytes that are guaranteed to be unique but not
530 unpredictable */ 540 unpredictable */
531static int ssleay_rand_pseudo_bytes(unsigned char *buf, int num) 541static int ssleay_rand_pseudo_bytes(unsigned char *buf, int num)
532 { 542 {
533 int ret; 543 return ssleay_rand_bytes(buf, num, 1);
534 unsigned long err;
535
536 ret = RAND_bytes(buf, num);
537 if (ret == 0)
538 {
539 err = ERR_peek_error();
540 if (ERR_GET_LIB(err) == ERR_LIB_RAND &&
541 ERR_GET_REASON(err) == RAND_R_PRNG_NOT_SEEDED)
542 ERR_clear_error();
543 }
544 return (ret);
545 } 544 }
546 545
547static int ssleay_rand_status(void) 546static int ssleay_rand_status(void)
diff --git a/src/lib/libcrypto/rc2/Makefile b/src/lib/libcrypto/rc2/Makefile
index 73eac347e7..8a9d49ab5e 100644
--- a/src/lib/libcrypto/rc2/Makefile
+++ b/src/lib/libcrypto/rc2/Makefile
@@ -78,7 +78,11 @@ rc2_cbc.o: ../../include/openssl/opensslconf.h ../../include/openssl/rc2.h
78rc2_cbc.o: rc2_cbc.c rc2_locl.h 78rc2_cbc.o: rc2_cbc.c rc2_locl.h
79rc2_ecb.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h 79rc2_ecb.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
80rc2_ecb.o: ../../include/openssl/rc2.h rc2_ecb.c rc2_locl.h 80rc2_ecb.o: ../../include/openssl/rc2.h rc2_ecb.c rc2_locl.h
81rc2_skey.o: ../../include/openssl/opensslconf.h ../../include/openssl/rc2.h 81rc2_skey.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
82rc2_skey.o: ../../include/openssl/opensslconf.h
83rc2_skey.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
84rc2_skey.o: ../../include/openssl/rc2.h ../../include/openssl/safestack.h
85rc2_skey.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
82rc2_skey.o: rc2_locl.h rc2_skey.c 86rc2_skey.o: rc2_locl.h rc2_skey.c
83rc2cfb64.o: ../../include/openssl/opensslconf.h ../../include/openssl/rc2.h 87rc2cfb64.o: ../../include/openssl/opensslconf.h ../../include/openssl/rc2.h
84rc2cfb64.o: rc2_locl.h rc2cfb64.c 88rc2cfb64.o: rc2_locl.h rc2cfb64.c
diff --git a/src/lib/libcrypto/rc4/Makefile b/src/lib/libcrypto/rc4/Makefile
index 264451a213..1614d47961 100644
--- a/src/lib/libcrypto/rc4/Makefile
+++ b/src/lib/libcrypto/rc4/Makefile
@@ -21,8 +21,8 @@ TEST=rc4test.c
21APPS= 21APPS=
22 22
23LIB=$(TOP)/libcrypto.a 23LIB=$(TOP)/libcrypto.a
24LIBSRC=rc4_skey.c rc4_enc.c 24LIBSRC=rc4_skey.c rc4_enc.c rc4_utl.c
25LIBOBJ=$(RC4_ENC) 25LIBOBJ=$(RC4_ENC) rc4_utl.o
26 26
27SRC= $(LIBSRC) 27SRC= $(LIBSRC)
28 28
@@ -46,12 +46,14 @@ rc4-586.s: asm/rc4-586.pl ../perlasm/x86asm.pl
46 46
47rc4-x86_64.s: asm/rc4-x86_64.pl 47rc4-x86_64.s: asm/rc4-x86_64.pl
48 $(PERL) asm/rc4-x86_64.pl $(PERLASM_SCHEME) > $@ 48 $(PERL) asm/rc4-x86_64.pl $(PERLASM_SCHEME) > $@
49rc4-md5-x86_64.s: asm/rc4-md5-x86_64.pl
50 $(PERL) asm/rc4-md5-x86_64.pl $(PERLASM_SCHEME) > $@
49 51
50rc4-ia64.S: asm/rc4-ia64.pl 52rc4-ia64.S: asm/rc4-ia64.pl
51 $(PERL) asm/rc4-ia64.pl $(CFLAGS) > $@ 53 $(PERL) asm/rc4-ia64.pl $(CFLAGS) > $@
52 54
53rc4-s390x.s: asm/rc4-s390x.pl 55rc4-parisc.s: asm/rc4-parisc.pl
54 $(PERL) asm/rc4-s390x.pl > $@ 56 $(PERL) asm/rc4-parisc.pl $(PERLASM_SCHEME) $@
55 57
56rc4-ia64.s: rc4-ia64.S 58rc4-ia64.s: rc4-ia64.S
57 @case `awk '/^#define RC4_INT/{print$$NF}' $(TOP)/include/openssl/opensslconf.h` in \ 59 @case `awk '/^#define RC4_INT/{print$$NF}' $(TOP)/include/openssl/opensslconf.h` in \
@@ -60,6 +62,9 @@ rc4-ia64.s: rc4-ia64.S
60 *) exit 1 ;; \ 62 *) exit 1 ;; \
61 esac 63 esac
62 64
65# GNU make "catch all"
66rc4-%.s: asm/rc4-%.pl; $(PERL) $< $(PERLASM_SCHEME) $@
67
63files: 68files:
64 $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO 69 $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
65 70
@@ -113,3 +118,8 @@ rc4_skey.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
113rc4_skey.o: ../../include/openssl/rc4.h ../../include/openssl/safestack.h 118rc4_skey.o: ../../include/openssl/rc4.h ../../include/openssl/safestack.h
114rc4_skey.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h 119rc4_skey.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
115rc4_skey.o: ../cryptlib.h rc4_locl.h rc4_skey.c 120rc4_skey.o: ../cryptlib.h rc4_locl.h rc4_skey.c
121rc4_utl.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
122rc4_utl.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
123rc4_utl.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rc4.h
124rc4_utl.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
125rc4_utl.o: ../../include/openssl/symhacks.h rc4_utl.c
diff --git a/src/lib/libcrypto/rc4/rc4test.c b/src/lib/libcrypto/rc4/rc4test.c
index 633a79e758..4312605ccb 100644
--- a/src/lib/libcrypto/rc4/rc4test.c
+++ b/src/lib/libcrypto/rc4/rc4test.c
@@ -120,6 +120,12 @@ int main(int argc, char *argv[])
120 RC4_KEY key; 120 RC4_KEY key;
121 unsigned char obuf[512]; 121 unsigned char obuf[512];
122 122
123#if !defined(OPENSSL_PIC)
124 void OPENSSL_cpuid_setup(void);
125
126 OPENSSL_cpuid_setup();
127#endif
128
123 for (i=0; i<6; i++) 129 for (i=0; i<6; i++)
124 { 130 {
125 RC4_set_key(&key,keys[i][0],&(keys[i][1])); 131 RC4_set_key(&key,keys[i][0],&(keys[i][1]));
diff --git a/src/lib/libcrypto/ripemd/Makefile b/src/lib/libcrypto/ripemd/Makefile
index d5b1067dbe..25140b2a73 100644
--- a/src/lib/libcrypto/ripemd/Makefile
+++ b/src/lib/libcrypto/ripemd/Makefile
@@ -82,8 +82,11 @@ clean:
82 82
83# DO NOT DELETE THIS LINE -- make depend depends on it. 83# DO NOT DELETE THIS LINE -- make depend depends on it.
84 84
85rmd_dgst.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h 85rmd_dgst.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
86rmd_dgst.o: ../../include/openssl/opensslv.h ../../include/openssl/ripemd.h 86rmd_dgst.o: ../../include/openssl/opensslconf.h
87rmd_dgst.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
88rmd_dgst.o: ../../include/openssl/ripemd.h ../../include/openssl/safestack.h
89rmd_dgst.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
87rmd_dgst.o: ../md32_common.h rmd_dgst.c rmd_locl.h rmdconst.h 90rmd_dgst.o: ../md32_common.h rmd_dgst.c rmd_locl.h rmdconst.h
88rmd_one.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h 91rmd_one.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
89rmd_one.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h 92rmd_one.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
diff --git a/src/lib/libcrypto/rsa/Makefile b/src/lib/libcrypto/rsa/Makefile
index bb64223e05..f798d2f749 100644
--- a/src/lib/libcrypto/rsa/Makefile
+++ b/src/lib/libcrypto/rsa/Makefile
@@ -20,11 +20,11 @@ LIB=$(TOP)/libcrypto.a
20LIBSRC= rsa_eay.c rsa_gen.c rsa_lib.c rsa_sign.c rsa_saos.c rsa_err.c \ 20LIBSRC= rsa_eay.c rsa_gen.c rsa_lib.c rsa_sign.c rsa_saos.c rsa_err.c \
21 rsa_pk1.c rsa_ssl.c rsa_none.c rsa_oaep.c rsa_chk.c rsa_null.c \ 21 rsa_pk1.c rsa_ssl.c rsa_none.c rsa_oaep.c rsa_chk.c rsa_null.c \
22 rsa_pss.c rsa_x931.c rsa_asn1.c rsa_depr.c rsa_ameth.c rsa_prn.c \ 22 rsa_pss.c rsa_x931.c rsa_asn1.c rsa_depr.c rsa_ameth.c rsa_prn.c \
23 rsa_pmeth.c 23 rsa_pmeth.c rsa_crpt.c
24LIBOBJ= rsa_eay.o rsa_gen.o rsa_lib.o rsa_sign.o rsa_saos.o rsa_err.o \ 24LIBOBJ= rsa_eay.o rsa_gen.o rsa_lib.o rsa_sign.o rsa_saos.o rsa_err.o \
25 rsa_pk1.o rsa_ssl.o rsa_none.o rsa_oaep.o rsa_chk.o rsa_null.o \ 25 rsa_pk1.o rsa_ssl.o rsa_none.o rsa_oaep.o rsa_chk.o rsa_null.o \
26 rsa_pss.o rsa_x931.o rsa_asn1.o rsa_depr.o rsa_ameth.o rsa_prn.o \ 26 rsa_pss.o rsa_x931.o rsa_asn1.o rsa_depr.o rsa_ameth.o rsa_prn.o \
27 rsa_pmeth.o 27 rsa_pmeth.o rsa_crpt.o
28 28
29SRC= $(LIBSRC) 29SRC= $(LIBSRC)
30 30
@@ -100,11 +100,16 @@ rsa_asn1.o: ../../e_os.h ../../include/openssl/asn1.h
100rsa_asn1.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h 100rsa_asn1.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
101rsa_asn1.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h 101rsa_asn1.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
102rsa_asn1.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h 102rsa_asn1.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
103rsa_asn1.o: ../../include/openssl/err.h ../../include/openssl/lhash.h 103rsa_asn1.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
104rsa_asn1.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h
105rsa_asn1.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h
106rsa_asn1.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
104rsa_asn1.o: ../../include/openssl/opensslconf.h 107rsa_asn1.o: ../../include/openssl/opensslconf.h
105rsa_asn1.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 108rsa_asn1.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
106rsa_asn1.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h 109rsa_asn1.o: ../../include/openssl/pkcs7.h ../../include/openssl/rsa.h
110rsa_asn1.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
107rsa_asn1.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h 111rsa_asn1.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
112rsa_asn1.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
108rsa_asn1.o: ../cryptlib.h rsa_asn1.c 113rsa_asn1.o: ../cryptlib.h rsa_asn1.c
109rsa_chk.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h 114rsa_chk.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
110rsa_chk.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h 115rsa_chk.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h
@@ -114,6 +119,21 @@ rsa_chk.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
114rsa_chk.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h 119rsa_chk.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
115rsa_chk.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h 120rsa_chk.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
116rsa_chk.o: rsa_chk.c 121rsa_chk.o: rsa_chk.c
122rsa_crpt.o: ../../e_os.h ../../include/openssl/asn1.h
123rsa_crpt.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
124rsa_crpt.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
125rsa_crpt.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
126rsa_crpt.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
127rsa_crpt.o: ../../include/openssl/engine.h ../../include/openssl/err.h
128rsa_crpt.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h
129rsa_crpt.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
130rsa_crpt.o: ../../include/openssl/opensslconf.h
131rsa_crpt.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
132rsa_crpt.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h
133rsa_crpt.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
134rsa_crpt.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
135rsa_crpt.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
136rsa_crpt.o: ../../include/openssl/x509_vfy.h ../cryptlib.h rsa_crpt.c
117rsa_depr.o: ../../e_os.h ../../include/openssl/asn1.h 137rsa_depr.o: ../../e_os.h ../../include/openssl/asn1.h
118rsa_depr.o: ../../include/openssl/bio.h ../../include/openssl/bn.h 138rsa_depr.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
119rsa_depr.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 139rsa_depr.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
@@ -205,11 +225,12 @@ rsa_pk1.o: ../../include/openssl/symhacks.h ../cryptlib.h rsa_pk1.c
205rsa_pmeth.o: ../../e_os.h ../../include/openssl/asn1.h 225rsa_pmeth.o: ../../e_os.h ../../include/openssl/asn1.h
206rsa_pmeth.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h 226rsa_pmeth.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
207rsa_pmeth.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h 227rsa_pmeth.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
208rsa_pmeth.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h 228rsa_pmeth.o: ../../include/openssl/cms.h ../../include/openssl/crypto.h
209rsa_pmeth.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h 229rsa_pmeth.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
210rsa_pmeth.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h 230rsa_pmeth.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
211rsa_pmeth.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h 231rsa_pmeth.o: ../../include/openssl/err.h ../../include/openssl/evp.h
212rsa_pmeth.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h 232rsa_pmeth.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
233rsa_pmeth.o: ../../include/openssl/objects.h
213rsa_pmeth.o: ../../include/openssl/opensslconf.h 234rsa_pmeth.o: ../../include/openssl/opensslconf.h
214rsa_pmeth.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h 235rsa_pmeth.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
215rsa_pmeth.o: ../../include/openssl/pkcs7.h ../../include/openssl/rsa.h 236rsa_pmeth.o: ../../include/openssl/pkcs7.h ../../include/openssl/rsa.h
diff --git a/src/lib/libcrypto/sha/Makefile b/src/lib/libcrypto/sha/Makefile
index e6eccb05f9..6d191d3936 100644
--- a/src/lib/libcrypto/sha/Makefile
+++ b/src/lib/libcrypto/sha/Makefile
@@ -56,8 +56,11 @@ sha256-ia64.s: asm/sha512-ia64.pl
56sha512-ia64.s: asm/sha512-ia64.pl 56sha512-ia64.s: asm/sha512-ia64.pl
57 (cd asm; $(PERL) sha512-ia64.pl ../$@ $(CFLAGS)) 57 (cd asm; $(PERL) sha512-ia64.pl ../$@ $(CFLAGS))
58 58
59sha256-armv4.s: asm/sha256-armv4.pl 59sha256-armv4.S: asm/sha256-armv4.pl
60 $(PERL) $< $@ 60 $(PERL) $< $(PERLASM_SCHEME) $@
61
62sha1-alpha.s: asm/sha1-alpha.pl
63 $(PERL) $< | $(CC) -E - | tee $@ > /dev/null
61 64
62# Solaris make has to be explicitly told 65# Solaris make has to be explicitly told
63sha1-x86_64.s: asm/sha1-x86_64.pl; $(PERL) asm/sha1-x86_64.pl $(PERLASM_SCHEME) > $@ 66sha1-x86_64.s: asm/sha1-x86_64.pl; $(PERL) asm/sha1-x86_64.pl $(PERLASM_SCHEME) > $@
@@ -71,10 +74,22 @@ sha1-ppc.s: asm/sha1-ppc.pl; $(PERL) asm/sha1-ppc.pl $(PERLASM_SCHEME) $@
71sha256-ppc.s: asm/sha512-ppc.pl; $(PERL) asm/sha512-ppc.pl $(PERLASM_SCHEME) $@ 74sha256-ppc.s: asm/sha512-ppc.pl; $(PERL) asm/sha512-ppc.pl $(PERLASM_SCHEME) $@
72sha512-ppc.s: asm/sha512-ppc.pl; $(PERL) asm/sha512-ppc.pl $(PERLASM_SCHEME) $@ 75sha512-ppc.s: asm/sha512-ppc.pl; $(PERL) asm/sha512-ppc.pl $(PERLASM_SCHEME) $@
73 76
77sha1-parisc.s: asm/sha1-parisc.pl; $(PERL) asm/sha1-parisc.pl $(PERLASM_SCHEME) $@
78sha256-parisc.s:asm/sha512-parisc.pl; $(PERL) asm/sha512-parisc.pl $(PERLASM_SCHEME) $@
79sha512-parisc.s:asm/sha512-parisc.pl; $(PERL) asm/sha512-parisc.pl $(PERLASM_SCHEME) $@
80
81sha1-mips.S: asm/sha1-mips.pl; $(PERL) asm/sha1-mips.pl $(PERLASM_SCHEME) $@
82sha256-mips.S: asm/sha512-mips.pl; $(PERL) asm/sha512-mips.pl $(PERLASM_SCHEME) $@
83sha512-mips.S: asm/sha512-mips.pl; $(PERL) asm/sha512-mips.pl $(PERLASM_SCHEME) $@
84
74# GNU make "catch all" 85# GNU make "catch all"
75sha1-%.s: asm/sha1-%.pl; $(PERL) $< $@ 86sha1-%.S: asm/sha1-%.pl; $(PERL) $< $(PERLASM_SCHEME) $@
76sha256-%.s: asm/sha512-%.pl; $(PERL) $< $@ 87sha256-%.S: asm/sha512-%.pl; $(PERL) $< $(PERLASM_SCHEME) $@
77sha512-%.s: asm/sha512-%.pl; $(PERL) $< $@ 88sha512-%.S: asm/sha512-%.pl; $(PERL) $< $(PERLASM_SCHEME) $@
89
90sha1-armv4-large.o: sha1-armv4-large.S
91sha256-armv4.o: sha256-armv4.S
92sha512-armv4.o: sha512-armv4.S
78 93
79files: 94files:
80 $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO 95 $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
@@ -119,8 +134,11 @@ sha1_one.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
119sha1_one.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h 134sha1_one.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
120sha1_one.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h 135sha1_one.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
121sha1_one.o: sha1_one.c 136sha1_one.o: sha1_one.c
122sha1dgst.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h 137sha1dgst.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
123sha1dgst.o: ../../include/openssl/opensslv.h ../../include/openssl/sha.h 138sha1dgst.o: ../../include/openssl/opensslconf.h
139sha1dgst.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
140sha1dgst.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
141sha1dgst.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
124sha1dgst.o: ../md32_common.h sha1dgst.c sha_locl.h 142sha1dgst.o: ../md32_common.h sha1dgst.c sha_locl.h
125sha256.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h 143sha256.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
126sha256.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h 144sha256.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
@@ -135,8 +153,11 @@ sha512.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
135sha512.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h 153sha512.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
136sha512.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h 154sha512.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
137sha512.o: ../cryptlib.h sha512.c 155sha512.o: ../cryptlib.h sha512.c
138sha_dgst.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h 156sha_dgst.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
139sha_dgst.o: ../../include/openssl/opensslv.h ../../include/openssl/sha.h 157sha_dgst.o: ../../include/openssl/opensslconf.h
158sha_dgst.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
159sha_dgst.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
160sha_dgst.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
140sha_dgst.o: ../md32_common.h sha_dgst.c sha_locl.h 161sha_dgst.o: ../md32_common.h sha_dgst.c sha_locl.h
141sha_one.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h 162sha_one.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
142sha_one.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h 163sha_one.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
diff --git a/src/lib/libcrypto/sha/sha_dgst.c b/src/lib/libcrypto/sha/sha_dgst.c
index 70eb56032c..c946ad827d 100644
--- a/src/lib/libcrypto/sha/sha_dgst.c
+++ b/src/lib/libcrypto/sha/sha_dgst.c
@@ -57,6 +57,7 @@
57 */ 57 */
58 58
59#include <openssl/opensslconf.h> 59#include <openssl/opensslconf.h>
60#include <openssl/crypto.h>
60#if !defined(OPENSSL_NO_SHA0) && !defined(OPENSSL_NO_SHA) 61#if !defined(OPENSSL_NO_SHA0) && !defined(OPENSSL_NO_SHA)
61 62
62#undef SHA_1 63#undef SHA_1
diff --git a/src/lib/libcrypto/symhacks.h b/src/lib/libcrypto/symhacks.h
index 3fd4a81692..403f592dcd 100644
--- a/src/lib/libcrypto/symhacks.h
+++ b/src/lib/libcrypto/symhacks.h
@@ -176,7 +176,6 @@
176#define SSL_CTX_set_default_passwd_cb_userdata SSL_CTX_set_def_passwd_cb_ud 176#define SSL_CTX_set_default_passwd_cb_userdata SSL_CTX_set_def_passwd_cb_ud
177#undef SSL_COMP_get_compression_methods 177#undef SSL_COMP_get_compression_methods
178#define SSL_COMP_get_compression_methods SSL_COMP_get_compress_methods 178#define SSL_COMP_get_compression_methods SSL_COMP_get_compress_methods
179
180#undef ssl_add_clienthello_renegotiate_ext 179#undef ssl_add_clienthello_renegotiate_ext
181#define ssl_add_clienthello_renegotiate_ext ssl_add_clienthello_reneg_ext 180#define ssl_add_clienthello_renegotiate_ext ssl_add_clienthello_reneg_ext
182#undef ssl_add_serverhello_renegotiate_ext 181#undef ssl_add_serverhello_renegotiate_ext
@@ -185,6 +184,26 @@
185#define ssl_parse_clienthello_renegotiate_ext ssl_parse_clienthello_reneg_ext 184#define ssl_parse_clienthello_renegotiate_ext ssl_parse_clienthello_reneg_ext
186#undef ssl_parse_serverhello_renegotiate_ext 185#undef ssl_parse_serverhello_renegotiate_ext
187#define ssl_parse_serverhello_renegotiate_ext ssl_parse_serverhello_reneg_ext 186#define ssl_parse_serverhello_renegotiate_ext ssl_parse_serverhello_reneg_ext
187#undef SSL_srp_server_param_with_username
188#define SSL_srp_server_param_with_username SSL_srp_server_param_with_un
189#undef SSL_CTX_set_srp_client_pwd_callback
190#define SSL_CTX_set_srp_client_pwd_callback SSL_CTX_set_srp_client_pwd_cb
191#undef SSL_CTX_set_srp_verify_param_callback
192#define SSL_CTX_set_srp_verify_param_callback SSL_CTX_set_srp_vfy_param_cb
193#undef SSL_CTX_set_srp_username_callback
194#define SSL_CTX_set_srp_username_callback SSL_CTX_set_srp_un_cb
195#undef ssl_add_clienthello_use_srtp_ext
196#define ssl_add_clienthello_use_srtp_ext ssl_add_clihello_use_srtp_ext
197#undef ssl_add_serverhello_use_srtp_ext
198#define ssl_add_serverhello_use_srtp_ext ssl_add_serhello_use_srtp_ext
199#undef ssl_parse_clienthello_use_srtp_ext
200#define ssl_parse_clienthello_use_srtp_ext ssl_parse_clihello_use_srtp_ext
201#undef ssl_parse_serverhello_use_srtp_ext
202#define ssl_parse_serverhello_use_srtp_ext ssl_parse_serhello_use_srtp_ext
203#undef SSL_CTX_set_next_protos_advertised_cb
204#define SSL_CTX_set_next_protos_advertised_cb SSL_CTX_set_next_protos_adv_cb
205#undef SSL_CTX_set_next_proto_select_cb
206#define SSL_CTX_set_next_proto_select_cb SSL_CTX_set_next_proto_sel_cb
188 207
189/* Hack some long ENGINE names */ 208/* Hack some long ENGINE names */
190#undef ENGINE_get_default_BN_mod_exp_crt 209#undef ENGINE_get_default_BN_mod_exp_crt
@@ -238,6 +257,9 @@
238#define EC_GROUP_get_point_conversion_form EC_GROUP_get_point_conv_form 257#define EC_GROUP_get_point_conversion_form EC_GROUP_get_point_conv_form
239#undef EC_GROUP_clear_free_all_extra_data 258#undef EC_GROUP_clear_free_all_extra_data
240#define EC_GROUP_clear_free_all_extra_data EC_GROUP_clr_free_all_xtra_data 259#define EC_GROUP_clear_free_all_extra_data EC_GROUP_clr_free_all_xtra_data
260#undef EC_KEY_set_public_key_affine_coordinates
261#define EC_KEY_set_public_key_affine_coordinates \
262 EC_KEY_set_pub_key_aff_coords
241#undef EC_POINT_set_Jprojective_coordinates_GFp 263#undef EC_POINT_set_Jprojective_coordinates_GFp
242#define EC_POINT_set_Jprojective_coordinates_GFp \ 264#define EC_POINT_set_Jprojective_coordinates_GFp \
243 EC_POINT_set_Jproj_coords_GFp 265 EC_POINT_set_Jproj_coords_GFp
@@ -399,6 +421,12 @@
399#undef dtls1_retransmit_buffered_messages 421#undef dtls1_retransmit_buffered_messages
400#define dtls1_retransmit_buffered_messages dtls1_retransmit_buffered_msgs 422#define dtls1_retransmit_buffered_messages dtls1_retransmit_buffered_msgs
401 423
424/* Hack some long SRP names */
425#undef SRP_generate_server_master_secret
426#define SRP_generate_server_master_secret SRP_gen_server_master_secret
427#undef SRP_generate_client_master_secret
428#define SRP_generate_client_master_secret SRP_gen_client_master_secret
429
402/* Hack some long UI names */ 430/* Hack some long UI names */
403#undef UI_method_get_prompt_constructor 431#undef UI_method_get_prompt_constructor
404#define UI_method_get_prompt_constructor UI_method_get_prompt_constructr 432#define UI_method_get_prompt_constructor UI_method_get_prompt_constructr
diff --git a/src/lib/libcrypto/util/cygwin.sh b/src/lib/libcrypto/util/cygwin.sh
index d6228521e6..cfdb04d2a4 100644
--- a/src/lib/libcrypto/util/cygwin.sh
+++ b/src/lib/libcrypto/util/cygwin.sh
@@ -11,6 +11,7 @@ CONFIG_OPTIONS="--prefix=/usr shared zlib no-idea no-rc5"
11INSTALL_PREFIX=/tmp/install/INSTALL 11INSTALL_PREFIX=/tmp/install/INSTALL
12 12
13VERSION= 13VERSION=
14SHLIB_VERSION_NUMBER=
14SUBVERSION=$1 15SUBVERSION=$1
15 16
16function cleanup() 17function cleanup()
@@ -28,6 +29,13 @@ function get_openssl_version()
28 echo " Check value of variable VERSION in Makefile." 29 echo " Check value of variable VERSION in Makefile."
29 exit 1 30 exit 1
30 fi 31 fi
32 eval `grep '^SHLIB_VERSION_NUMBER=' Makefile`
33 if [ -z "${SHLIB_VERSION_NUMBER}" ]
34 then
35 echo "Error: Couldn't retrieve OpenSSL shared lib version from Makefile."
36 echo " Check value of variable SHLIB_VERSION_NUMBER in Makefile."
37 exit 1
38 fi
31} 39}
32 40
33function base_install() 41function base_install()
@@ -124,7 +132,7 @@ strip usr/bin/*.exe usr/bin/*.dll usr/lib/engines/*.so
124chmod u-w usr/lib/engines/*.so 132chmod u-w usr/lib/engines/*.so
125 133
126# Runtime package 134# Runtime package
127tar cjf libopenssl${VERSION//[!0-9]/}-${VERSION}-${SUBVERSION}.tar.bz2 \ 135tar cjf libopenssl${SHLIB_VERSION_NUMBER//[!0-9]/}-${VERSION}-${SUBVERSION}.tar.bz2 \
128 usr/bin/cyg*dll 136 usr/bin/cyg*dll
129# Base package 137# Base package
130find etc usr/bin/openssl.exe usr/bin/c_rehash usr/lib/engines usr/share/doc \ 138find etc usr/bin/openssl.exe usr/bin/c_rehash usr/lib/engines usr/share/doc \
@@ -139,7 +147,7 @@ tar cjfT openssl-devel-${VERSION}-${SUBVERSION}.tar.bz2 -
139 147
140ls -l openssl-${VERSION}-${SUBVERSION}.tar.bz2 148ls -l openssl-${VERSION}-${SUBVERSION}.tar.bz2
141ls -l openssl-devel-${VERSION}-${SUBVERSION}.tar.bz2 149ls -l openssl-devel-${VERSION}-${SUBVERSION}.tar.bz2
142ls -l libopenssl${VERSION//[!0-9]/}-${VERSION}-${SUBVERSION}.tar.bz2 150ls -l libopenssl${SHLIB_VERSION_NUMBER//[!0-9]/}-${VERSION}-${SUBVERSION}.tar.bz2
143 151
144cleanup 152cleanup
145 153
diff --git a/src/lib/libcrypto/util/libeay.num b/src/lib/libcrypto/util/libeay.num
index b23619f20a..93f80ba0c6 100644
--- a/src/lib/libcrypto/util/libeay.num
+++ b/src/lib/libcrypto/util/libeay.num
@@ -1050,7 +1050,7 @@ ASN1_TYPE_get_octetstring 1077 EXIST::FUNCTION:
1050ASN1_TYPE_set_int_octetstring 1078 EXIST::FUNCTION: 1050ASN1_TYPE_set_int_octetstring 1078 EXIST::FUNCTION:
1051ASN1_TYPE_set_octetstring 1079 EXIST::FUNCTION: 1051ASN1_TYPE_set_octetstring 1079 EXIST::FUNCTION:
1052ASN1_UTCTIME_set_string 1080 EXIST::FUNCTION: 1052ASN1_UTCTIME_set_string 1080 EXIST::FUNCTION:
1053ERR_add_error_data 1081 EXIST::FUNCTION:BIO 1053ERR_add_error_data 1081 EXIST::FUNCTION:
1054ERR_set_error_data 1082 EXIST::FUNCTION: 1054ERR_set_error_data 1082 EXIST::FUNCTION:
1055EVP_CIPHER_asn1_to_param 1083 EXIST::FUNCTION: 1055EVP_CIPHER_asn1_to_param 1083 EXIST::FUNCTION:
1056EVP_CIPHER_param_to_asn1 1084 EXIST::FUNCTION: 1056EVP_CIPHER_param_to_asn1 1084 EXIST::FUNCTION:
@@ -2808,7 +2808,7 @@ FIPS_corrupt_rsa 3249 NOEXIST::FUNCTION:
2808FIPS_selftest_des 3250 NOEXIST::FUNCTION: 2808FIPS_selftest_des 3250 NOEXIST::FUNCTION:
2809EVP_aes_128_cfb1 3251 EXIST::FUNCTION:AES 2809EVP_aes_128_cfb1 3251 EXIST::FUNCTION:AES
2810EVP_aes_192_cfb8 3252 EXIST::FUNCTION:AES 2810EVP_aes_192_cfb8 3252 EXIST::FUNCTION:AES
2811FIPS_mode_set 3253 NOEXIST::FUNCTION: 2811FIPS_mode_set 3253 EXIST::FUNCTION:
2812FIPS_selftest_dsa 3254 NOEXIST::FUNCTION: 2812FIPS_selftest_dsa 3254 NOEXIST::FUNCTION:
2813EVP_aes_256_cfb8 3255 EXIST::FUNCTION:AES 2813EVP_aes_256_cfb8 3255 EXIST::FUNCTION:AES
2814FIPS_allow_md5 3256 NOEXIST::FUNCTION: 2814FIPS_allow_md5 3256 NOEXIST::FUNCTION:
@@ -2838,23 +2838,23 @@ AES_cfb1_encrypt 3279 EXIST::FUNCTION:AES
2838EVP_des_ede3_cfb1 3280 EXIST::FUNCTION:DES 2838EVP_des_ede3_cfb1 3280 EXIST::FUNCTION:DES
2839FIPS_rand_check 3281 NOEXIST::FUNCTION: 2839FIPS_rand_check 3281 NOEXIST::FUNCTION:
2840FIPS_md5_allowed 3282 NOEXIST::FUNCTION: 2840FIPS_md5_allowed 3282 NOEXIST::FUNCTION:
2841FIPS_mode 3283 NOEXIST::FUNCTION: 2841FIPS_mode 3283 EXIST::FUNCTION:
2842FIPS_selftest_failed 3284 NOEXIST::FUNCTION: 2842FIPS_selftest_failed 3284 NOEXIST::FUNCTION:
2843sk_is_sorted 3285 EXIST::FUNCTION: 2843sk_is_sorted 3285 EXIST::FUNCTION:
2844X509_check_ca 3286 EXIST::FUNCTION: 2844X509_check_ca 3286 EXIST::FUNCTION:
2845private_idea_set_encrypt_key 3287 NOEXIST::FUNCTION: 2845private_idea_set_encrypt_key 3287 EXIST:OPENSSL_FIPS:FUNCTION:IDEA
2846HMAC_CTX_set_flags 3288 EXIST::FUNCTION:HMAC 2846HMAC_CTX_set_flags 3288 EXIST::FUNCTION:HMAC
2847private_SHA_Init 3289 NOEXIST::FUNCTION: 2847private_SHA_Init 3289 EXIST:OPENSSL_FIPS:FUNCTION:SHA,SHA0
2848private_CAST_set_key 3290 NOEXIST::FUNCTION: 2848private_CAST_set_key 3290 EXIST:OPENSSL_FIPS:FUNCTION:CAST
2849private_RIPEMD160_Init 3291 NOEXIST::FUNCTION: 2849private_RIPEMD160_Init 3291 EXIST:OPENSSL_FIPS:FUNCTION:RIPEMD
2850private_RC5_32_set_key 3292 NOEXIST::FUNCTION: 2850private_RC5_32_set_key 3292 NOEXIST::FUNCTION:
2851private_MD5_Init 3293 NOEXIST::FUNCTION: 2851private_MD5_Init 3293 EXIST:OPENSSL_FIPS:FUNCTION:MD5
2852private_RC4_set_key 3294 NOEXIST::FUNCTION: 2852private_RC4_set_key 3294 EXIST::FUNCTION:RC4
2853private_MDC2_Init 3295 NOEXIST::FUNCTION: 2853private_MDC2_Init 3295 EXIST:OPENSSL_FIPS:FUNCTION:MDC2
2854private_RC2_set_key 3296 NOEXIST::FUNCTION: 2854private_RC2_set_key 3296 EXIST:OPENSSL_FIPS:FUNCTION:RC2
2855private_MD4_Init 3297 NOEXIST::FUNCTION: 2855private_MD4_Init 3297 EXIST:OPENSSL_FIPS:FUNCTION:MD4
2856private_BF_set_key 3298 NOEXIST::FUNCTION: 2856private_BF_set_key 3298 EXIST:OPENSSL_FIPS:FUNCTION:BF
2857private_MD2_Init 3299 NOEXIST::FUNCTION: 2857private_MD2_Init 3299 EXIST:OPENSSL_FIPS:FUNCTION:MD2
2858d2i_PROXY_CERT_INFO_EXTENSION 3300 EXIST::FUNCTION: 2858d2i_PROXY_CERT_INFO_EXTENSION 3300 EXIST::FUNCTION:
2859PROXY_POLICY_it 3301 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: 2859PROXY_POLICY_it 3301 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE:
2860PROXY_POLICY_it 3301 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION: 2860PROXY_POLICY_it 3301 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION:
@@ -2882,7 +2882,7 @@ RSA_verify_PKCS1_PSS 3321 EXIST::FUNCTION:RSA
2882RSA_padding_add_X931 3322 EXIST::FUNCTION:RSA 2882RSA_padding_add_X931 3322 EXIST::FUNCTION:RSA
2883RSA_padding_add_PKCS1_PSS 3323 EXIST::FUNCTION:RSA 2883RSA_padding_add_PKCS1_PSS 3323 EXIST::FUNCTION:RSA
2884PKCS1_MGF1 3324 EXIST::FUNCTION:RSA 2884PKCS1_MGF1 3324 EXIST::FUNCTION:RSA
2885BN_X931_generate_Xpq 3325 NOEXIST::FUNCTION: 2885BN_X931_generate_Xpq 3325 EXIST::FUNCTION:
2886RSA_X931_generate_key 3326 NOEXIST::FUNCTION: 2886RSA_X931_generate_key 3326 NOEXIST::FUNCTION:
2887BN_X931_derive_prime 3327 NOEXIST::FUNCTION: 2887BN_X931_derive_prime 3327 NOEXIST::FUNCTION:
2888BN_X931_generate_prime 3328 NOEXIST::FUNCTION: 2888BN_X931_generate_prime 3328 NOEXIST::FUNCTION:
@@ -2906,7 +2906,7 @@ STORE_parse_attrs_start 3343 NOEXIST::FUNCTION:
2906POLICY_CONSTRAINTS_free 3344 EXIST::FUNCTION: 2906POLICY_CONSTRAINTS_free 3344 EXIST::FUNCTION:
2907EVP_PKEY_add1_attr_by_NID 3345 EXIST::FUNCTION: 2907EVP_PKEY_add1_attr_by_NID 3345 EXIST::FUNCTION:
2908BN_nist_mod_192 3346 EXIST::FUNCTION: 2908BN_nist_mod_192 3346 EXIST::FUNCTION:
2909EC_GROUP_get_trinomial_basis 3347 EXIST::FUNCTION:EC 2909EC_GROUP_get_trinomial_basis 3347 EXIST::FUNCTION:EC,EC2M
2910STORE_set_method 3348 NOEXIST::FUNCTION: 2910STORE_set_method 3348 NOEXIST::FUNCTION:
2911GENERAL_SUBTREE_free 3349 EXIST::FUNCTION: 2911GENERAL_SUBTREE_free 3349 EXIST::FUNCTION:
2912NAME_CONSTRAINTS_it 3350 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE: 2912NAME_CONSTRAINTS_it 3350 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE:
@@ -2921,14 +2921,14 @@ SHA512_Update 3356 EXIST:!VMSVAX:FUNCTION:SHA,SHA512
2921i2d_ECPrivateKey 3357 EXIST::FUNCTION:EC 2921i2d_ECPrivateKey 3357 EXIST::FUNCTION:EC
2922BN_get0_nist_prime_192 3358 EXIST::FUNCTION: 2922BN_get0_nist_prime_192 3358 EXIST::FUNCTION:
2923STORE_modify_certificate 3359 NOEXIST::FUNCTION: 2923STORE_modify_certificate 3359 NOEXIST::FUNCTION:
2924EC_POINT_set_affine_coordinates_GF2m 3360 EXIST:!VMS:FUNCTION:EC 2924EC_POINT_set_affine_coordinates_GF2m 3360 EXIST:!VMS:FUNCTION:EC,EC2M
2925EC_POINT_set_affine_coords_GF2m 3360 EXIST:VMS:FUNCTION:EC 2925EC_POINT_set_affine_coords_GF2m 3360 EXIST:VMS:FUNCTION:EC,EC2M
2926BN_GF2m_mod_exp_arr 3361 EXIST::FUNCTION: 2926BN_GF2m_mod_exp_arr 3361 EXIST::FUNCTION:EC2M
2927STORE_ATTR_INFO_modify_number 3362 NOEXIST::FUNCTION: 2927STORE_ATTR_INFO_modify_number 3362 NOEXIST::FUNCTION:
2928X509_keyid_get0 3363 EXIST::FUNCTION: 2928X509_keyid_get0 3363 EXIST::FUNCTION:
2929ENGINE_load_gmp 3364 EXIST::FUNCTION:ENGINE,GMP,STATIC_ENGINE 2929ENGINE_load_gmp 3364 EXIST::FUNCTION:ENGINE,GMP,STATIC_ENGINE
2930pitem_new 3365 EXIST::FUNCTION: 2930pitem_new 3365 EXIST::FUNCTION:
2931BN_GF2m_mod_mul_arr 3366 EXIST::FUNCTION: 2931BN_GF2m_mod_mul_arr 3366 EXIST::FUNCTION:EC2M
2932STORE_list_public_key_endp 3367 NOEXIST::FUNCTION: 2932STORE_list_public_key_endp 3367 NOEXIST::FUNCTION:
2933o2i_ECPublicKey 3368 EXIST::FUNCTION:EC 2933o2i_ECPublicKey 3368 EXIST::FUNCTION:EC
2934EC_KEY_copy 3369 EXIST::FUNCTION:EC 2934EC_KEY_copy 3369 EXIST::FUNCTION:EC
@@ -2945,7 +2945,7 @@ X509_VERIFY_PARAM_inherit 3378 EXIST::FUNCTION:
2945EC_POINT_point2bn 3379 EXIST::FUNCTION:EC 2945EC_POINT_point2bn 3379 EXIST::FUNCTION:EC
2946STORE_ATTR_INFO_set_dn 3380 NOEXIST::FUNCTION: 2946STORE_ATTR_INFO_set_dn 3380 NOEXIST::FUNCTION:
2947X509_policy_tree_get0_policies 3381 EXIST::FUNCTION: 2947X509_policy_tree_get0_policies 3381 EXIST::FUNCTION:
2948EC_GROUP_new_curve_GF2m 3382 EXIST::FUNCTION:EC 2948EC_GROUP_new_curve_GF2m 3382 EXIST::FUNCTION:EC,EC2M
2949STORE_destroy_method 3383 NOEXIST::FUNCTION: 2949STORE_destroy_method 3383 NOEXIST::FUNCTION:
2950ENGINE_unregister_STORE 3384 EXIST::FUNCTION:ENGINE 2950ENGINE_unregister_STORE 3384 EXIST::FUNCTION:ENGINE
2951EVP_PKEY_get1_EC_KEY 3385 EXIST::FUNCTION:EC 2951EVP_PKEY_get1_EC_KEY 3385 EXIST::FUNCTION:EC
@@ -2961,7 +2961,7 @@ ENGINE_get_static_state 3393 EXIST::FUNCTION:ENGINE
2961pqueue_iterator 3394 EXIST::FUNCTION: 2961pqueue_iterator 3394 EXIST::FUNCTION:
2962ECDSA_SIG_new 3395 EXIST::FUNCTION:ECDSA 2962ECDSA_SIG_new 3395 EXIST::FUNCTION:ECDSA
2963OPENSSL_DIR_end 3396 EXIST::FUNCTION: 2963OPENSSL_DIR_end 3396 EXIST::FUNCTION:
2964BN_GF2m_mod_sqr 3397 EXIST::FUNCTION: 2964BN_GF2m_mod_sqr 3397 EXIST::FUNCTION:EC2M
2965EC_POINT_bn2point 3398 EXIST::FUNCTION:EC 2965EC_POINT_bn2point 3398 EXIST::FUNCTION:EC
2966X509_VERIFY_PARAM_set_depth 3399 EXIST::FUNCTION: 2966X509_VERIFY_PARAM_set_depth 3399 EXIST::FUNCTION:
2967EC_KEY_set_asn1_flag 3400 EXIST::FUNCTION:EC 2967EC_KEY_set_asn1_flag 3400 EXIST::FUNCTION:EC
@@ -2974,7 +2974,7 @@ EC_GROUP_get_point_conv_form 3405 EXIST:VMS:FUNCTION:EC
2974STORE_method_set_store_function 3406 NOEXIST::FUNCTION: 2974STORE_method_set_store_function 3406 NOEXIST::FUNCTION:
2975STORE_ATTR_INFO_in 3407 NOEXIST::FUNCTION: 2975STORE_ATTR_INFO_in 3407 NOEXIST::FUNCTION:
2976PEM_read_bio_ECPKParameters 3408 EXIST::FUNCTION:EC 2976PEM_read_bio_ECPKParameters 3408 EXIST::FUNCTION:EC
2977EC_GROUP_get_pentanomial_basis 3409 EXIST::FUNCTION:EC 2977EC_GROUP_get_pentanomial_basis 3409 EXIST::FUNCTION:EC,EC2M
2978EVP_PKEY_add1_attr_by_txt 3410 EXIST::FUNCTION: 2978EVP_PKEY_add1_attr_by_txt 3410 EXIST::FUNCTION:
2979BN_BLINDING_set_flags 3411 EXIST::FUNCTION: 2979BN_BLINDING_set_flags 3411 EXIST::FUNCTION:
2980X509_VERIFY_PARAM_set1_policies 3412 EXIST::FUNCTION: 2980X509_VERIFY_PARAM_set1_policies 3412 EXIST::FUNCTION:
@@ -2982,10 +2982,10 @@ X509_VERIFY_PARAM_set1_name 3413 EXIST::FUNCTION:
2982X509_VERIFY_PARAM_set_purpose 3414 EXIST::FUNCTION: 2982X509_VERIFY_PARAM_set_purpose 3414 EXIST::FUNCTION:
2983STORE_get_number 3415 NOEXIST::FUNCTION: 2983STORE_get_number 3415 NOEXIST::FUNCTION:
2984ECDSA_sign_setup 3416 EXIST::FUNCTION:ECDSA 2984ECDSA_sign_setup 3416 EXIST::FUNCTION:ECDSA
2985BN_GF2m_mod_solve_quad_arr 3417 EXIST::FUNCTION: 2985BN_GF2m_mod_solve_quad_arr 3417 EXIST::FUNCTION:EC2M
2986EC_KEY_up_ref 3418 EXIST::FUNCTION:EC 2986EC_KEY_up_ref 3418 EXIST::FUNCTION:EC
2987POLICY_MAPPING_free 3419 EXIST::FUNCTION: 2987POLICY_MAPPING_free 3419 EXIST::FUNCTION:
2988BN_GF2m_mod_div 3420 EXIST::FUNCTION: 2988BN_GF2m_mod_div 3420 EXIST::FUNCTION:EC2M
2989X509_VERIFY_PARAM_set_flags 3421 EXIST::FUNCTION: 2989X509_VERIFY_PARAM_set_flags 3421 EXIST::FUNCTION:
2990EC_KEY_free 3422 EXIST::FUNCTION:EC 2990EC_KEY_free 3422 EXIST::FUNCTION:EC
2991STORE_meth_set_list_next_fn 3423 NOEXIST::FUNCTION: 2991STORE_meth_set_list_next_fn 3423 NOEXIST::FUNCTION:
@@ -2999,7 +2999,7 @@ STORE_method_set_list_end_function 3427 NOEXIST::FUNCTION:
2999pqueue_print 3428 EXIST::FUNCTION: 2999pqueue_print 3428 EXIST::FUNCTION:
3000EC_GROUP_have_precompute_mult 3429 EXIST::FUNCTION:EC 3000EC_GROUP_have_precompute_mult 3429 EXIST::FUNCTION:EC
3001EC_KEY_print_fp 3430 EXIST::FUNCTION:EC,FP_API 3001EC_KEY_print_fp 3430 EXIST::FUNCTION:EC,FP_API
3002BN_GF2m_mod_arr 3431 EXIST::FUNCTION: 3002BN_GF2m_mod_arr 3431 EXIST::FUNCTION:EC2M
3003PEM_write_bio_X509_CERT_PAIR 3432 EXIST::FUNCTION: 3003PEM_write_bio_X509_CERT_PAIR 3432 EXIST::FUNCTION:
3004EVP_PKEY_cmp 3433 EXIST::FUNCTION: 3004EVP_PKEY_cmp 3433 EXIST::FUNCTION:
3005X509_policy_level_node_count 3434 EXIST::FUNCTION: 3005X509_policy_level_node_count 3434 EXIST::FUNCTION:
@@ -3020,7 +3020,7 @@ X509_policy_node_get0_qualifiers 3448 EXIST:!VMS:FUNCTION:
3020X509_pcy_node_get0_qualifiers 3448 EXIST:VMS:FUNCTION: 3020X509_pcy_node_get0_qualifiers 3448 EXIST:VMS:FUNCTION:
3021STORE_list_crl_end 3449 NOEXIST::FUNCTION: 3021STORE_list_crl_end 3449 NOEXIST::FUNCTION:
3022EVP_PKEY_set1_EC_KEY 3450 EXIST::FUNCTION:EC 3022EVP_PKEY_set1_EC_KEY 3450 EXIST::FUNCTION:EC
3023BN_GF2m_mod_sqrt_arr 3451 EXIST::FUNCTION: 3023BN_GF2m_mod_sqrt_arr 3451 EXIST::FUNCTION:EC2M
3024i2d_ECPrivateKey_bio 3452 EXIST::FUNCTION:BIO,EC 3024i2d_ECPrivateKey_bio 3452 EXIST::FUNCTION:BIO,EC
3025ECPKParameters_print_fp 3453 EXIST::FUNCTION:EC,FP_API 3025ECPKParameters_print_fp 3453 EXIST::FUNCTION:EC,FP_API
3026pqueue_find 3454 EXIST::FUNCTION: 3026pqueue_find 3454 EXIST::FUNCTION:
@@ -3037,7 +3037,7 @@ PKCS12_add_safes 3464 EXIST::FUNCTION:
3037BN_BLINDING_convert_ex 3465 EXIST::FUNCTION: 3037BN_BLINDING_convert_ex 3465 EXIST::FUNCTION:
3038X509_policy_tree_free 3466 EXIST::FUNCTION: 3038X509_policy_tree_free 3466 EXIST::FUNCTION:
3039OPENSSL_ia32cap_loc 3467 EXIST::FUNCTION: 3039OPENSSL_ia32cap_loc 3467 EXIST::FUNCTION:
3040BN_GF2m_poly2arr 3468 EXIST::FUNCTION: 3040BN_GF2m_poly2arr 3468 EXIST::FUNCTION:EC2M
3041STORE_ctrl 3469 NOEXIST::FUNCTION: 3041STORE_ctrl 3469 NOEXIST::FUNCTION:
3042STORE_ATTR_INFO_compare 3470 NOEXIST::FUNCTION: 3042STORE_ATTR_INFO_compare 3470 NOEXIST::FUNCTION:
3043BN_get0_nist_prime_224 3471 EXIST::FUNCTION: 3043BN_get0_nist_prime_224 3471 EXIST::FUNCTION:
@@ -3061,7 +3061,7 @@ STORE_method_set_delete_function 3486 NOEXIST::FUNCTION:
3061STORE_list_certificate_next 3487 NOEXIST::FUNCTION: 3061STORE_list_certificate_next 3487 NOEXIST::FUNCTION:
3062ASN1_generate_nconf 3488 EXIST::FUNCTION: 3062ASN1_generate_nconf 3488 EXIST::FUNCTION:
3063BUF_memdup 3489 EXIST::FUNCTION: 3063BUF_memdup 3489 EXIST::FUNCTION:
3064BN_GF2m_mod_mul 3490 EXIST::FUNCTION: 3064BN_GF2m_mod_mul 3490 EXIST::FUNCTION:EC2M
3065STORE_meth_get_list_next_fn 3491 NOEXIST::FUNCTION: 3065STORE_meth_get_list_next_fn 3491 NOEXIST::FUNCTION:
3066STORE_method_get_list_next_function 3491 NOEXIST::FUNCTION: 3066STORE_method_get_list_next_function 3491 NOEXIST::FUNCTION:
3067STORE_ATTR_INFO_get0_dn 3492 NOEXIST::FUNCTION: 3067STORE_ATTR_INFO_get0_dn 3492 NOEXIST::FUNCTION:
@@ -3072,7 +3072,7 @@ STORE_ATTR_INFO_free 3496 NOEXIST::FUNCTION:
3072STORE_get_private_key 3497 NOEXIST::FUNCTION: 3072STORE_get_private_key 3497 NOEXIST::FUNCTION:
3073EVP_PKEY_get_attr_count 3498 EXIST::FUNCTION: 3073EVP_PKEY_get_attr_count 3498 EXIST::FUNCTION:
3074STORE_ATTR_INFO_new 3499 NOEXIST::FUNCTION: 3074STORE_ATTR_INFO_new 3499 NOEXIST::FUNCTION:
3075EC_GROUP_get_curve_GF2m 3500 EXIST::FUNCTION:EC 3075EC_GROUP_get_curve_GF2m 3500 EXIST::FUNCTION:EC,EC2M
3076STORE_meth_set_revoke_fn 3501 NOEXIST::FUNCTION: 3076STORE_meth_set_revoke_fn 3501 NOEXIST::FUNCTION:
3077STORE_method_set_revoke_function 3501 NOEXIST::FUNCTION: 3077STORE_method_set_revoke_function 3501 NOEXIST::FUNCTION:
3078STORE_store_number 3502 NOEXIST::FUNCTION: 3078STORE_store_number 3502 NOEXIST::FUNCTION:
@@ -3088,7 +3088,7 @@ BIO_dump_indent_fp 3511 EXIST::FUNCTION:FP_API
3088EC_KEY_set_group 3512 EXIST::FUNCTION:EC 3088EC_KEY_set_group 3512 EXIST::FUNCTION:EC
3089BUF_strndup 3513 EXIST::FUNCTION: 3089BUF_strndup 3513 EXIST::FUNCTION:
3090STORE_list_certificate_start 3514 NOEXIST::FUNCTION: 3090STORE_list_certificate_start 3514 NOEXIST::FUNCTION:
3091BN_GF2m_mod 3515 EXIST::FUNCTION: 3091BN_GF2m_mod 3515 EXIST::FUNCTION:EC2M
3092X509_REQ_check_private_key 3516 EXIST::FUNCTION: 3092X509_REQ_check_private_key 3516 EXIST::FUNCTION:
3093EC_GROUP_get_seed_len 3517 EXIST::FUNCTION:EC 3093EC_GROUP_get_seed_len 3517 EXIST::FUNCTION:EC
3094ERR_load_STORE_strings 3518 NOEXIST::FUNCTION: 3094ERR_load_STORE_strings 3518 NOEXIST::FUNCTION:
@@ -3117,19 +3117,19 @@ STORE_method_set_get_function 3536 NOEXIST::FUNCTION:
3117STORE_modify_number 3537 NOEXIST::FUNCTION: 3117STORE_modify_number 3537 NOEXIST::FUNCTION:
3118STORE_method_get_store_function 3538 NOEXIST::FUNCTION: 3118STORE_method_get_store_function 3538 NOEXIST::FUNCTION:
3119STORE_store_private_key 3539 NOEXIST::FUNCTION: 3119STORE_store_private_key 3539 NOEXIST::FUNCTION:
3120BN_GF2m_mod_sqr_arr 3540 EXIST::FUNCTION: 3120BN_GF2m_mod_sqr_arr 3540 EXIST::FUNCTION:EC2M
3121RSA_setup_blinding 3541 EXIST::FUNCTION:RSA 3121RSA_setup_blinding 3541 EXIST::FUNCTION:RSA
3122BIO_s_datagram 3542 EXIST::FUNCTION:DGRAM 3122BIO_s_datagram 3542 EXIST::FUNCTION:DGRAM
3123STORE_Memory 3543 NOEXIST::FUNCTION: 3123STORE_Memory 3543 NOEXIST::FUNCTION:
3124sk_find_ex 3544 EXIST::FUNCTION: 3124sk_find_ex 3544 EXIST::FUNCTION:
3125EC_GROUP_set_curve_GF2m 3545 EXIST::FUNCTION:EC 3125EC_GROUP_set_curve_GF2m 3545 EXIST::FUNCTION:EC,EC2M
3126ENGINE_set_default_ECDSA 3546 EXIST::FUNCTION:ENGINE 3126ENGINE_set_default_ECDSA 3546 EXIST::FUNCTION:ENGINE
3127POLICY_CONSTRAINTS_new 3547 EXIST::FUNCTION: 3127POLICY_CONSTRAINTS_new 3547 EXIST::FUNCTION:
3128BN_GF2m_mod_sqrt 3548 EXIST::FUNCTION: 3128BN_GF2m_mod_sqrt 3548 EXIST::FUNCTION:EC2M
3129ECDH_set_default_method 3549 EXIST::FUNCTION:ECDH 3129ECDH_set_default_method 3549 EXIST::FUNCTION:ECDH
3130EC_KEY_generate_key 3550 EXIST::FUNCTION:EC 3130EC_KEY_generate_key 3550 EXIST::FUNCTION:EC
3131SHA384_Update 3551 EXIST:!VMSVAX:FUNCTION:SHA,SHA512 3131SHA384_Update 3551 EXIST:!VMSVAX:FUNCTION:SHA,SHA512
3132BN_GF2m_arr2poly 3552 EXIST::FUNCTION: 3132BN_GF2m_arr2poly 3552 EXIST::FUNCTION:EC2M
3133STORE_method_get_get_function 3553 NOEXIST::FUNCTION: 3133STORE_method_get_get_function 3553 NOEXIST::FUNCTION:
3134STORE_meth_set_cleanup_fn 3554 NOEXIST::FUNCTION: 3134STORE_meth_set_cleanup_fn 3554 NOEXIST::FUNCTION:
3135STORE_method_set_cleanup_function 3554 NOEXIST::FUNCTION: 3135STORE_method_set_cleanup_function 3554 NOEXIST::FUNCTION:
@@ -3154,7 +3154,7 @@ EC_GROUP_get_degree 3570 EXIST::FUNCTION:EC
3154ASN1_generate_v3 3571 EXIST::FUNCTION: 3154ASN1_generate_v3 3571 EXIST::FUNCTION:
3155STORE_ATTR_INFO_modify_cstr 3572 NOEXIST::FUNCTION: 3155STORE_ATTR_INFO_modify_cstr 3572 NOEXIST::FUNCTION:
3156X509_policy_tree_level_count 3573 EXIST::FUNCTION: 3156X509_policy_tree_level_count 3573 EXIST::FUNCTION:
3157BN_GF2m_add 3574 EXIST::FUNCTION: 3157BN_GF2m_add 3574 EXIST::FUNCTION:EC2M
3158EC_KEY_get0_group 3575 EXIST::FUNCTION:EC 3158EC_KEY_get0_group 3575 EXIST::FUNCTION:EC
3159STORE_generate_crl 3576 NOEXIST::FUNCTION: 3159STORE_generate_crl 3576 NOEXIST::FUNCTION:
3160STORE_store_public_key 3577 NOEXIST::FUNCTION: 3160STORE_store_public_key 3577 NOEXIST::FUNCTION:
@@ -3179,8 +3179,8 @@ STORE_store_certificate 3593 NOEXIST::FUNCTION:
3179OBJ_bsearch_ex 3594 NOEXIST::FUNCTION: 3179OBJ_bsearch_ex 3594 NOEXIST::FUNCTION:
3180X509_STORE_CTX_set_default 3595 EXIST::FUNCTION: 3180X509_STORE_CTX_set_default 3595 EXIST::FUNCTION:
3181STORE_ATTR_INFO_set_sha1str 3596 NOEXIST::FUNCTION: 3181STORE_ATTR_INFO_set_sha1str 3596 NOEXIST::FUNCTION:
3182BN_GF2m_mod_inv 3597 EXIST::FUNCTION: 3182BN_GF2m_mod_inv 3597 EXIST::FUNCTION:EC2M
3183BN_GF2m_mod_exp 3598 EXIST::FUNCTION: 3183BN_GF2m_mod_exp 3598 EXIST::FUNCTION:EC2M
3184STORE_modify_public_key 3599 NOEXIST::FUNCTION: 3184STORE_modify_public_key 3599 NOEXIST::FUNCTION:
3185STORE_meth_get_list_start_fn 3600 NOEXIST::FUNCTION: 3185STORE_meth_get_list_start_fn 3600 NOEXIST::FUNCTION:
3186STORE_method_get_list_start_function 3600 NOEXIST::FUNCTION: 3186STORE_method_get_list_start_function 3600 NOEXIST::FUNCTION:
@@ -3188,7 +3188,7 @@ EC_GROUP_get0_seed 3601 EXIST::FUNCTION:EC
3188STORE_store_arbitrary 3602 NOEXIST::FUNCTION: 3188STORE_store_arbitrary 3602 NOEXIST::FUNCTION:
3189STORE_meth_set_unlock_store_fn 3603 NOEXIST::FUNCTION: 3189STORE_meth_set_unlock_store_fn 3603 NOEXIST::FUNCTION:
3190STORE_method_set_unlock_store_function 3603 NOEXIST::FUNCTION: 3190STORE_method_set_unlock_store_function 3603 NOEXIST::FUNCTION:
3191BN_GF2m_mod_div_arr 3604 EXIST::FUNCTION: 3191BN_GF2m_mod_div_arr 3604 EXIST::FUNCTION:EC2M
3192ENGINE_set_ECDSA 3605 EXIST::FUNCTION:ENGINE 3192ENGINE_set_ECDSA 3605 EXIST::FUNCTION:ENGINE
3193STORE_create_method 3606 NOEXIST::FUNCTION: 3193STORE_create_method 3606 NOEXIST::FUNCTION:
3194ECPKParameters_print 3607 EXIST::FUNCTION:BIO,EC 3194ECPKParameters_print 3607 EXIST::FUNCTION:BIO,EC
@@ -3211,8 +3211,8 @@ EC_KEY_get_enc_flags 3622 EXIST::FUNCTION:EC
3211ASN1_const_check_infinite_end 3623 EXIST::FUNCTION: 3211ASN1_const_check_infinite_end 3623 EXIST::FUNCTION:
3212EVP_PKEY_delete_attr 3624 EXIST::FUNCTION: 3212EVP_PKEY_delete_attr 3624 EXIST::FUNCTION:
3213ECDSA_set_default_method 3625 EXIST::FUNCTION:ECDSA 3213ECDSA_set_default_method 3625 EXIST::FUNCTION:ECDSA
3214EC_POINT_set_compressed_coordinates_GF2m 3626 EXIST:!VMS:FUNCTION:EC 3214EC_POINT_set_compressed_coordinates_GF2m 3626 EXIST:!VMS:FUNCTION:EC,EC2M
3215EC_POINT_set_compr_coords_GF2m 3626 EXIST:VMS:FUNCTION:EC 3215EC_POINT_set_compr_coords_GF2m 3626 EXIST:VMS:FUNCTION:EC,EC2M
3216EC_GROUP_cmp 3627 EXIST::FUNCTION:EC 3216EC_GROUP_cmp 3627 EXIST::FUNCTION:EC
3217STORE_revoke_certificate 3628 NOEXIST::FUNCTION: 3217STORE_revoke_certificate 3628 NOEXIST::FUNCTION:
3218BN_get0_nist_prime_256 3629 EXIST::FUNCTION: 3218BN_get0_nist_prime_256 3629 EXIST::FUNCTION:
@@ -3241,7 +3241,7 @@ POLICY_CONSTRAINTS_it 3649 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTI
3241STORE_get_ex_new_index 3650 NOEXIST::FUNCTION: 3241STORE_get_ex_new_index 3650 NOEXIST::FUNCTION:
3242EVP_PKEY_get_attr_by_OBJ 3651 EXIST::FUNCTION: 3242EVP_PKEY_get_attr_by_OBJ 3651 EXIST::FUNCTION:
3243X509_VERIFY_PARAM_add0_policy 3652 EXIST::FUNCTION: 3243X509_VERIFY_PARAM_add0_policy 3652 EXIST::FUNCTION:
3244BN_GF2m_mod_solve_quad 3653 EXIST::FUNCTION: 3244BN_GF2m_mod_solve_quad 3653 EXIST::FUNCTION:EC2M
3245SHA256 3654 EXIST::FUNCTION:SHA,SHA256 3245SHA256 3654 EXIST::FUNCTION:SHA,SHA256
3246i2d_ECPrivateKey_fp 3655 EXIST::FUNCTION:EC,FP_API 3246i2d_ECPrivateKey_fp 3655 EXIST::FUNCTION:EC,FP_API
3247X509_policy_tree_get0_user_policies 3656 EXIST:!VMS:FUNCTION: 3247X509_policy_tree_get0_user_policies 3656 EXIST:!VMS:FUNCTION:
@@ -3249,8 +3249,8 @@ X509_pcy_tree_get0_usr_policies 3656 EXIST:VMS:FUNCTION:
3249OPENSSL_DIR_read 3657 EXIST::FUNCTION: 3249OPENSSL_DIR_read 3657 EXIST::FUNCTION:
3250ENGINE_register_all_ECDSA 3658 EXIST::FUNCTION:ENGINE 3250ENGINE_register_all_ECDSA 3658 EXIST::FUNCTION:ENGINE
3251X509_VERIFY_PARAM_lookup 3659 EXIST::FUNCTION: 3251X509_VERIFY_PARAM_lookup 3659 EXIST::FUNCTION:
3252EC_POINT_get_affine_coordinates_GF2m 3660 EXIST:!VMS:FUNCTION:EC 3252EC_POINT_get_affine_coordinates_GF2m 3660 EXIST:!VMS:FUNCTION:EC,EC2M
3253EC_POINT_get_affine_coords_GF2m 3660 EXIST:VMS:FUNCTION:EC 3253EC_POINT_get_affine_coords_GF2m 3660 EXIST:VMS:FUNCTION:EC,EC2M
3254EC_GROUP_dup 3661 EXIST::FUNCTION:EC 3254EC_GROUP_dup 3661 EXIST::FUNCTION:EC
3255ENGINE_get_default_ECDSA 3662 EXIST::FUNCTION:ENGINE 3255ENGINE_get_default_ECDSA 3662 EXIST::FUNCTION:ENGINE
3256EC_KEY_new 3663 EXIST::FUNCTION:EC 3256EC_KEY_new 3663 EXIST::FUNCTION:EC
@@ -3332,7 +3332,7 @@ STORE_list_certificate_end 3734 NOEXIST::FUNCTION:
3332STORE_get_crl 3735 NOEXIST::FUNCTION: 3332STORE_get_crl 3735 NOEXIST::FUNCTION:
3333X509_POLICY_NODE_print 3736 EXIST::FUNCTION: 3333X509_POLICY_NODE_print 3736 EXIST::FUNCTION:
3334SHA384_Init 3737 EXIST:!VMSVAX:FUNCTION:SHA,SHA512 3334SHA384_Init 3737 EXIST:!VMSVAX:FUNCTION:SHA,SHA512
3335EC_GF2m_simple_method 3738 EXIST::FUNCTION:EC 3335EC_GF2m_simple_method 3738 EXIST::FUNCTION:EC,EC2M
3336ECDSA_set_ex_data 3739 EXIST::FUNCTION:ECDSA 3336ECDSA_set_ex_data 3739 EXIST::FUNCTION:ECDSA
3337SHA384_Final 3740 EXIST:!VMSVAX:FUNCTION:SHA,SHA512 3337SHA384_Final 3740 EXIST:!VMSVAX:FUNCTION:SHA,SHA512
3338PKCS7_set_digest 3741 EXIST::FUNCTION: 3338PKCS7_set_digest 3741 EXIST::FUNCTION:
@@ -3364,7 +3364,7 @@ BIO_dump_cb 3764 EXIST::FUNCTION:
3364SHA256_Update 3765 EXIST::FUNCTION:SHA,SHA256 3364SHA256_Update 3765 EXIST::FUNCTION:SHA,SHA256
3365pqueue_insert 3766 EXIST::FUNCTION: 3365pqueue_insert 3766 EXIST::FUNCTION:
3366pitem_free 3767 EXIST::FUNCTION: 3366pitem_free 3767 EXIST::FUNCTION:
3367BN_GF2m_mod_inv_arr 3768 EXIST::FUNCTION: 3367BN_GF2m_mod_inv_arr 3768 EXIST::FUNCTION:EC2M
3368ENGINE_unregister_ECDSA 3769 EXIST::FUNCTION:ENGINE 3368ENGINE_unregister_ECDSA 3769 EXIST::FUNCTION:ENGINE
3369BN_BLINDING_set_thread_id 3770 EXIST::FUNCTION:DEPRECATED 3369BN_BLINDING_set_thread_id 3770 EXIST::FUNCTION:DEPRECATED
3370get_rfc3526_prime_8192 3771 EXIST::FUNCTION: 3370get_rfc3526_prime_8192 3771 EXIST::FUNCTION:
@@ -3670,7 +3670,7 @@ int_EVP_MD_set_engine_callbacks 4056 NOEXIST::FUNCTION:
3670int_CRYPTO_set_do_dynlock_callback 4057 NOEXIST::FUNCTION: 3670int_CRYPTO_set_do_dynlock_callback 4057 NOEXIST::FUNCTION:
3671FIPS_rng_stick 4058 NOEXIST::FUNCTION: 3671FIPS_rng_stick 4058 NOEXIST::FUNCTION:
3672EVP_CIPHER_CTX_set_flags 4059 EXIST::FUNCTION: 3672EVP_CIPHER_CTX_set_flags 4059 EXIST::FUNCTION:
3673BN_X931_generate_prime_ex 4060 NOEXIST::FUNCTION: 3673BN_X931_generate_prime_ex 4060 EXIST::FUNCTION:
3674FIPS_selftest_check 4061 NOEXIST::FUNCTION: 3674FIPS_selftest_check 4061 NOEXIST::FUNCTION:
3675FIPS_rand_set_dt 4062 NOEXIST::FUNCTION: 3675FIPS_rand_set_dt 4062 NOEXIST::FUNCTION:
3676CRYPTO_dbg_pop_info 4063 NOEXIST::FUNCTION: 3676CRYPTO_dbg_pop_info 4063 NOEXIST::FUNCTION:
@@ -3695,14 +3695,14 @@ FIPS_rand_test_mode 4081 NOEXIST::FUNCTION:
3695FIPS_rand_reset 4082 NOEXIST::FUNCTION: 3695FIPS_rand_reset 4082 NOEXIST::FUNCTION:
3696FIPS_dsa_new 4083 NOEXIST::FUNCTION: 3696FIPS_dsa_new 4083 NOEXIST::FUNCTION:
3697int_RAND_set_callbacks 4084 NOEXIST::FUNCTION: 3697int_RAND_set_callbacks 4084 NOEXIST::FUNCTION:
3698BN_X931_derive_prime_ex 4085 NOEXIST::FUNCTION: 3698BN_X931_derive_prime_ex 4085 EXIST::FUNCTION:
3699int_ERR_lib_init 4086 NOEXIST::FUNCTION: 3699int_ERR_lib_init 4086 NOEXIST::FUNCTION:
3700int_EVP_CIPHER_init_engine_callbacks 4087 NOEXIST::FUNCTION: 3700int_EVP_CIPHER_init_engine_callbacks 4087 NOEXIST::FUNCTION:
3701FIPS_rsa_free 4088 NOEXIST::FUNCTION: 3701FIPS_rsa_free 4088 NOEXIST::FUNCTION:
3702FIPS_dsa_sig_encode 4089 NOEXIST::FUNCTION: 3702FIPS_dsa_sig_encode 4089 NOEXIST::FUNCTION:
3703CRYPTO_dbg_remove_all_info 4090 NOEXIST::FUNCTION: 3703CRYPTO_dbg_remove_all_info 4090 NOEXIST::FUNCTION:
3704OPENSSL_init 4091 NOEXIST::FUNCTION: 3704OPENSSL_init 4091 EXIST::FUNCTION:
3705private_Camellia_set_key 4092 NOEXIST::FUNCTION: 3705private_Camellia_set_key 4092 EXIST:OPENSSL_FIPS:FUNCTION:CAMELLIA
3706CRYPTO_strdup 4093 EXIST::FUNCTION: 3706CRYPTO_strdup 4093 EXIST::FUNCTION:
3707JPAKE_STEP3A_process 4094 EXIST::FUNCTION:JPAKE 3707JPAKE_STEP3A_process 4094 EXIST::FUNCTION:JPAKE
3708JPAKE_STEP1_release 4095 EXIST::FUNCTION:JPAKE 3708JPAKE_STEP1_release 4095 EXIST::FUNCTION:JPAKE
@@ -4194,3 +4194,119 @@ OPENSSL_memcmp 4565 EXIST::FUNCTION:
4194OPENSSL_strncasecmp 4566 EXIST::FUNCTION: 4194OPENSSL_strncasecmp 4566 EXIST::FUNCTION:
4195OPENSSL_gmtime 4567 EXIST::FUNCTION: 4195OPENSSL_gmtime 4567 EXIST::FUNCTION:
4196OPENSSL_gmtime_adj 4568 EXIST::FUNCTION: 4196OPENSSL_gmtime_adj 4568 EXIST::FUNCTION:
4197SRP_VBASE_get_by_user 4569 EXIST::FUNCTION:SRP
4198SRP_Calc_server_key 4570 EXIST::FUNCTION:SRP
4199SRP_create_verifier 4571 EXIST::FUNCTION:SRP
4200SRP_create_verifier_BN 4572 EXIST::FUNCTION:SRP
4201SRP_Calc_u 4573 EXIST::FUNCTION:SRP
4202SRP_VBASE_free 4574 EXIST::FUNCTION:SRP
4203SRP_Calc_client_key 4575 EXIST::FUNCTION:SRP
4204SRP_get_default_gN 4576 EXIST::FUNCTION:SRP
4205SRP_Calc_x 4577 EXIST::FUNCTION:SRP
4206SRP_Calc_B 4578 EXIST::FUNCTION:SRP
4207SRP_VBASE_new 4579 EXIST::FUNCTION:SRP
4208SRP_check_known_gN_param 4580 EXIST::FUNCTION:SRP
4209SRP_Calc_A 4581 EXIST::FUNCTION:SRP
4210SRP_Verify_A_mod_N 4582 EXIST::FUNCTION:SRP
4211SRP_VBASE_init 4583 EXIST::FUNCTION:SRP
4212SRP_Verify_B_mod_N 4584 EXIST::FUNCTION:SRP
4213EC_KEY_set_public_key_affine_coordinates 4585 EXIST:!VMS:FUNCTION:EC
4214EC_KEY_set_pub_key_aff_coords 4585 EXIST:VMS:FUNCTION:EC
4215EVP_aes_192_ctr 4586 EXIST::FUNCTION:AES
4216EVP_PKEY_meth_get0_info 4587 EXIST::FUNCTION:
4217EVP_PKEY_meth_copy 4588 EXIST::FUNCTION:
4218ERR_add_error_vdata 4589 EXIST::FUNCTION:
4219EVP_aes_128_ctr 4590 EXIST::FUNCTION:AES
4220EVP_aes_256_ctr 4591 EXIST::FUNCTION:AES
4221EC_GFp_nistp224_method 4592 EXIST::FUNCTION:EC,EC_NISTP_64_GCC_128
4222EC_KEY_get_flags 4593 EXIST::FUNCTION:EC
4223RSA_padding_add_PKCS1_PSS_mgf1 4594 EXIST::FUNCTION:RSA
4224EVP_aes_128_xts 4595 EXIST::FUNCTION:AES
4225private_SHA224_Init 4596 EXIST:OPENSSL_FIPS:FUNCTION:SHA,SHA256
4226private_AES_set_decrypt_key 4597 EXIST::FUNCTION:AES
4227private_WHIRLPOOL_Init 4598 EXIST:OPENSSL_FIPS:FUNCTION:WHIRLPOOL
4228EVP_aes_256_xts 4599 EXIST::FUNCTION:AES
4229private_SHA512_Init 4600 EXIST:OPENSSL_FIPS:FUNCTION:SHA,SHA512
4230EVP_aes_128_gcm 4601 EXIST::FUNCTION:AES
4231EC_KEY_clear_flags 4602 EXIST::FUNCTION:EC
4232EC_KEY_set_flags 4603 EXIST::FUNCTION:EC
4233private_DES_set_key_unchecked 4604 EXIST:OPENSSL_FIPS:FUNCTION:DES
4234EVP_aes_256_ccm 4605 EXIST::FUNCTION:AES
4235private_AES_set_encrypt_key 4606 EXIST::FUNCTION:AES
4236RSA_verify_PKCS1_PSS_mgf1 4607 EXIST::FUNCTION:RSA
4237private_SHA1_Init 4608 EXIST:OPENSSL_FIPS:FUNCTION:SHA,SHA1
4238EVP_aes_128_ccm 4609 EXIST::FUNCTION:AES
4239private_SEED_set_key 4610 EXIST:OPENSSL_FIPS:FUNCTION:SEED
4240EVP_aes_192_gcm 4611 EXIST::FUNCTION:AES
4241X509_ALGOR_set_md 4612 EXIST::FUNCTION:
4242private_SHA256_Init 4613 EXIST:OPENSSL_FIPS:FUNCTION:SHA,SHA256
4243RAND_init_fips 4614 EXIST:OPENSSL_FIPS:FUNCTION:
4244EVP_aes_256_gcm 4615 EXIST::FUNCTION:AES
4245private_SHA384_Init 4616 EXIST:OPENSSL_FIPS:FUNCTION:SHA,SHA512
4246EVP_aes_192_ccm 4617 EXIST::FUNCTION:AES
4247CMAC_CTX_copy 4618 EXIST::FUNCTION:
4248CMAC_CTX_free 4619 EXIST::FUNCTION:
4249CMAC_CTX_get0_cipher_ctx 4620 EXIST::FUNCTION:
4250CMAC_CTX_cleanup 4621 EXIST::FUNCTION:
4251CMAC_Init 4622 EXIST::FUNCTION:
4252CMAC_Update 4623 EXIST::FUNCTION:
4253CMAC_resume 4624 EXIST::FUNCTION:
4254CMAC_CTX_new 4625 EXIST::FUNCTION:
4255CMAC_Final 4626 EXIST::FUNCTION:
4256CRYPTO_ctr128_encrypt_ctr32 4627 EXIST::FUNCTION:
4257CRYPTO_gcm128_release 4628 EXIST::FUNCTION:
4258CRYPTO_ccm128_decrypt_ccm64 4629 EXIST::FUNCTION:
4259CRYPTO_ccm128_encrypt 4630 EXIST::FUNCTION:
4260CRYPTO_gcm128_encrypt 4631 EXIST::FUNCTION:
4261CRYPTO_xts128_encrypt 4632 EXIST::FUNCTION:
4262EVP_rc4_hmac_md5 4633 EXIST::FUNCTION:MD5,RC4
4263CRYPTO_nistcts128_decrypt_block 4634 EXIST::FUNCTION:
4264CRYPTO_gcm128_setiv 4635 EXIST::FUNCTION:
4265CRYPTO_nistcts128_encrypt 4636 EXIST::FUNCTION:
4266EVP_aes_128_cbc_hmac_sha1 4637 EXIST::FUNCTION:AES,SHA,SHA1
4267CRYPTO_gcm128_tag 4638 EXIST::FUNCTION:
4268CRYPTO_ccm128_encrypt_ccm64 4639 EXIST::FUNCTION:
4269ENGINE_load_rdrand 4640 EXIST::FUNCTION:ENGINE
4270CRYPTO_ccm128_setiv 4641 EXIST::FUNCTION:
4271CRYPTO_nistcts128_encrypt_block 4642 EXIST::FUNCTION:
4272CRYPTO_gcm128_aad 4643 EXIST::FUNCTION:
4273CRYPTO_ccm128_init 4644 EXIST::FUNCTION:
4274CRYPTO_nistcts128_decrypt 4645 EXIST::FUNCTION:
4275CRYPTO_gcm128_new 4646 EXIST::FUNCTION:
4276CRYPTO_ccm128_tag 4647 EXIST::FUNCTION:
4277CRYPTO_ccm128_decrypt 4648 EXIST::FUNCTION:
4278CRYPTO_ccm128_aad 4649 EXIST::FUNCTION:
4279CRYPTO_gcm128_init 4650 EXIST::FUNCTION:
4280CRYPTO_gcm128_decrypt 4651 EXIST::FUNCTION:
4281ENGINE_load_rsax 4652 EXIST::FUNCTION:ENGINE
4282CRYPTO_gcm128_decrypt_ctr32 4653 EXIST::FUNCTION:
4283CRYPTO_gcm128_encrypt_ctr32 4654 EXIST::FUNCTION:
4284CRYPTO_gcm128_finish 4655 EXIST::FUNCTION:
4285EVP_aes_256_cbc_hmac_sha1 4656 EXIST::FUNCTION:AES,SHA,SHA1
4286PKCS5_pbkdf2_set 4657 EXIST::FUNCTION:
4287CMS_add0_recipient_password 4658 EXIST::FUNCTION:CMS
4288CMS_decrypt_set1_password 4659 EXIST::FUNCTION:CMS
4289CMS_RecipientInfo_set0_password 4660 EXIST::FUNCTION:CMS
4290RAND_set_fips_drbg_type 4661 EXIST:OPENSSL_FIPS:FUNCTION:
4291X509_REQ_sign_ctx 4662 EXIST::FUNCTION:EVP
4292RSA_PSS_PARAMS_new 4663 EXIST::FUNCTION:RSA
4293X509_CRL_sign_ctx 4664 EXIST::FUNCTION:EVP
4294X509_signature_dump 4665 EXIST::FUNCTION:EVP
4295d2i_RSA_PSS_PARAMS 4666 EXIST::FUNCTION:RSA
4296RSA_PSS_PARAMS_it 4667 EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE:RSA
4297RSA_PSS_PARAMS_it 4667 EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION:RSA
4298RSA_PSS_PARAMS_free 4668 EXIST::FUNCTION:RSA
4299X509_sign_ctx 4669 EXIST::FUNCTION:EVP
4300i2d_RSA_PSS_PARAMS 4670 EXIST::FUNCTION:RSA
4301ASN1_item_sign_ctx 4671 EXIST::FUNCTION:EVP
4302EC_GFp_nistp521_method 4672 EXIST::FUNCTION:EC,EC_NISTP_64_GCC_128
4303EC_GFp_nistp256_method 4673 EXIST::FUNCTION:EC,EC_NISTP_64_GCC_128
4304OPENSSL_stderr 4674 EXIST::FUNCTION:
4305OPENSSL_cpuid_setup 4675 EXIST::FUNCTION:
4306OPENSSL_showfatal 4676 EXIST::FUNCTION:
4307BIO_new_dgram_sctp 4677 EXIST::FUNCTION:SCTP
4308BIO_dgram_sctp_msg_waiting 4678 EXIST::FUNCTION:SCTP
4309BIO_dgram_sctp_wait_for_dry 4679 EXIST::FUNCTION:SCTP
4310BIO_s_datagram_sctp 4680 EXIST::FUNCTION:DGRAM,SCTP
4311BIO_dgram_is_sctp 4681 EXIST::FUNCTION:SCTP
4312BIO_dgram_sctp_notification_cb 4682 EXIST::FUNCTION:SCTP
diff --git a/src/lib/libcrypto/util/mk1mf.pl b/src/lib/libcrypto/util/mk1mf.pl
index afe8c7326d..72fa089f6b 100644
--- a/src/lib/libcrypto/util/mk1mf.pl
+++ b/src/lib/libcrypto/util/mk1mf.pl
@@ -18,6 +18,8 @@ local $zlib_opt = 0; # 0 = no zlib, 1 = static, 2 = dynamic
18local $zlib_lib = ""; 18local $zlib_lib = "";
19local $perl_asm = 0; # 1 to autobuild asm files from perl scripts 19local $perl_asm = 0; # 1 to autobuild asm files from perl scripts
20 20
21my $ex_l_libs = "";
22
21# Options to import from top level Makefile 23# Options to import from top level Makefile
22 24
23my %mf_import = ( 25my %mf_import = (
@@ -40,7 +42,9 @@ my %mf_import = (
40 SHA1_ASM_OBJ => \$mf_sha_asm, 42 SHA1_ASM_OBJ => \$mf_sha_asm,
41 RMD160_ASM_OBJ => \$mf_rmd_asm, 43 RMD160_ASM_OBJ => \$mf_rmd_asm,
42 WP_ASM_OBJ => \$mf_wp_asm, 44 WP_ASM_OBJ => \$mf_wp_asm,
43 CMLL_ENC => \$mf_cm_asm 45 CMLL_ENC => \$mf_cm_asm,
46 BASEADDR => \$baseaddr,
47 FIPSDIR => \$fipsdir,
44); 48);
45 49
46 50
@@ -104,6 +108,7 @@ and [options] can be one of
104 just-ssl - remove all non-ssl keys/digest 108 just-ssl - remove all non-ssl keys/digest
105 no-asm - No x86 asm 109 no-asm - No x86 asm
106 no-krb5 - No KRB5 110 no-krb5 - No KRB5
111 no-srp - No SRP
107 no-ec - No EC 112 no-ec - No EC
108 no-ecdsa - No ECDSA 113 no-ecdsa - No ECDSA
109 no-ecdh - No ECDH 114 no-ecdh - No ECDH
@@ -228,6 +233,8 @@ else
228 $cflags.=' -DTERMIO'; 233 $cflags.=' -DTERMIO';
229 } 234 }
230 235
236$fipsdir =~ s/\//${o}/g;
237
231$out_dir=(defined($VARS{'OUT'}))?$VARS{'OUT'}:$out_def.($debug?".dbg":""); 238$out_dir=(defined($VARS{'OUT'}))?$VARS{'OUT'}:$out_def.($debug?".dbg":"");
232$tmp_dir=(defined($VARS{'TMP'}))?$VARS{'TMP'}:$tmp_def.($debug?".dbg":""); 239$tmp_dir=(defined($VARS{'TMP'}))?$VARS{'TMP'}:$tmp_def.($debug?".dbg":"");
233$inc_dir=(defined($VARS{'INC'}))?$VARS{'INC'}:$inc_def; 240$inc_dir=(defined($VARS{'INC'}))?$VARS{'INC'}:$inc_def;
@@ -261,6 +268,7 @@ $cflags.=" -DOPENSSL_NO_SOCK" if $no_sock;
261$cflags.=" -DOPENSSL_NO_SSL2" if $no_ssl2; 268$cflags.=" -DOPENSSL_NO_SSL2" if $no_ssl2;
262$cflags.=" -DOPENSSL_NO_SSL3" if $no_ssl3; 269$cflags.=" -DOPENSSL_NO_SSL3" if $no_ssl3;
263$cflags.=" -DOPENSSL_NO_TLSEXT" if $no_tlsext; 270$cflags.=" -DOPENSSL_NO_TLSEXT" if $no_tlsext;
271$cflags.=" -DOPENSSL_NO_SRP" if $no_srp;
264$cflags.=" -DOPENSSL_NO_CMS" if $no_cms; 272$cflags.=" -DOPENSSL_NO_CMS" if $no_cms;
265$cflags.=" -DOPENSSL_NO_ERR" if $no_err; 273$cflags.=" -DOPENSSL_NO_ERR" if $no_err;
266$cflags.=" -DOPENSSL_NO_KRB5" if $no_krb5; 274$cflags.=" -DOPENSSL_NO_KRB5" if $no_krb5;
@@ -270,7 +278,9 @@ $cflags.=" -DOPENSSL_NO_ECDH" if $no_ecdh;
270$cflags.=" -DOPENSSL_NO_GOST" if $no_gost; 278$cflags.=" -DOPENSSL_NO_GOST" if $no_gost;
271$cflags.=" -DOPENSSL_NO_ENGINE" if $no_engine; 279$cflags.=" -DOPENSSL_NO_ENGINE" if $no_engine;
272$cflags.=" -DOPENSSL_NO_HW" if $no_hw; 280$cflags.=" -DOPENSSL_NO_HW" if $no_hw;
281$cflags.=" -DOPENSSL_FIPS" if $fips;
273$cflags.=" -DOPENSSL_NO_JPAKE" if $no_jpake; 282$cflags.=" -DOPENSSL_NO_JPAKE" if $no_jpake;
283$cflags.=" -DOPENSSL_NO_EC2M" if $no_ec2m;
274$cflags.= " -DZLIB" if $zlib_opt; 284$cflags.= " -DZLIB" if $zlib_opt;
275$cflags.= " -DZLIB_SHARED" if $zlib_opt == 2; 285$cflags.= " -DZLIB_SHARED" if $zlib_opt == 2;
276 286
@@ -404,6 +414,11 @@ else
404 \$(CP) \"\$(O_CRYPTO)\" \"\$(INSTALLTOP)${o}lib\" 414 \$(CP) \"\$(O_CRYPTO)\" \"\$(INSTALLTOP)${o}lib\"
405EOF 415EOF
406 $ex_libs .= " $zlib_lib" if $zlib_opt == 1; 416 $ex_libs .= " $zlib_lib" if $zlib_opt == 1;
417 if ($fips)
418 {
419 $build_targets .= " \$(LIB_D)$o$crypto_compat \$(PREMAIN_DSO_EXE)";
420 $ex_l_libs .= " \$(O_FIPSCANISTER)";
421 }
407 } 422 }
408 423
409$defs= <<"EOF"; 424$defs= <<"EOF";
@@ -465,6 +480,18 @@ MKLIB=$bin_dir$mklib
465MLFLAGS=$mlflags 480MLFLAGS=$mlflags
466ASM=$bin_dir$asm 481ASM=$bin_dir$asm
467 482
483# FIPS validated module and support file locations
484
485FIPSDIR=$fipsdir
486BASEADDR=$baseaddr
487FIPSLIB_D=\$(FIPSDIR)${o}lib
488FIPS_PREMAIN_SRC=\$(FIPSLIB_D)${o}fips_premain.c
489O_FIPSCANISTER=\$(FIPSLIB_D)${o}fipscanister.lib
490FIPS_SHA1_EXE=\$(FIPSDIR)${o}bin${o}fips_standalone_sha1${exep}
491E_PREMAIN_DSO=fips_premain_dso
492PREMAIN_DSO_EXE=\$(BIN_D)${o}fips_premain_dso$exep
493FIPSLINK=\$(PERL) \$(FIPSDIR)${o}bin${o}fipslink.pl
494
468###################################################### 495######################################################
469# You should not need to touch anything below this point 496# You should not need to touch anything below this point
470###################################################### 497######################################################
@@ -497,7 +524,7 @@ SO_CRYPTO= $plib\$(CRYPTO)$so_shlibp
497L_SSL= \$(LIB_D)$o$plib\$(SSL)$libp 524L_SSL= \$(LIB_D)$o$plib\$(SSL)$libp
498L_CRYPTO= \$(LIB_D)$o$plib\$(CRYPTO)$libp 525L_CRYPTO= \$(LIB_D)$o$plib\$(CRYPTO)$libp
499 526
500L_LIBS= \$(L_SSL) \$(L_CRYPTO) 527L_LIBS= \$(L_SSL) \$(L_CRYPTO) $ex_l_libs
501 528
502###################################################### 529######################################################
503# Don't touch anything below this point 530# Don't touch anything below this point
@@ -513,7 +540,7 @@ LIBS_DEP=\$(O_CRYPTO) \$(O_SSL)
513EOF 540EOF
514 541
515$rules=<<"EOF"; 542$rules=<<"EOF";
516all: banner \$(TMP_D) \$(BIN_D) \$(TEST_D) \$(LIB_D) \$(INCO_D) headers lib exe 543all: banner \$(TMP_D) \$(BIN_D) \$(TEST_D) \$(LIB_D) \$(INCO_D) headers lib exe $build_targets
517 544
518banner: 545banner:
519$banner 546$banner
@@ -629,6 +656,16 @@ $rules.=&do_compile_rule("\$(OBJ_D)",$test,"\$(APP_CFLAGS)");
629$defs.=&do_defs("E_OBJ",$e_exe,"\$(OBJ_D)",$obj); 656$defs.=&do_defs("E_OBJ",$e_exe,"\$(OBJ_D)",$obj);
630$rules.=&do_compile_rule("\$(OBJ_D)",$e_exe,'-DMONOLITH $(APP_CFLAGS)'); 657$rules.=&do_compile_rule("\$(OBJ_D)",$e_exe,'-DMONOLITH $(APP_CFLAGS)');
631 658
659# Special case rule for fips_premain_dso
660
661if ($fips)
662 {
663 $rules.=&cc_compile_target("\$(OBJ_D)${o}\$(E_PREMAIN_DSO)$obj",
664 "\$(FIPS_PREMAIN_SRC)",
665 "-DFINGERPRINT_PREMAIN_DSO_LOAD \$(SHLIB_CFLAGS)", "");
666 $rules.=&do_link_rule("\$(PREMAIN_DSO_EXE)","\$(OBJ_D)${o}\$(E_PREMAIN_DSO)$obj \$(CRYPTOOBJ) \$(O_FIPSCANISTER)","","\$(EX_LIBS)", 1);
667 }
668
632foreach (values %lib_nam) 669foreach (values %lib_nam)
633 { 670 {
634 $lib_obj=$lib_obj{$_}; 671 $lib_obj=$lib_obj{$_};
@@ -677,7 +714,28 @@ foreach (split(/\s+/,$engines))
677 714
678 715
679$rules.= &do_lib_rule("\$(SSLOBJ)","\$(O_SSL)",$ssl,$shlib,"\$(SO_SSL)"); 716$rules.= &do_lib_rule("\$(SSLOBJ)","\$(O_SSL)",$ssl,$shlib,"\$(SO_SSL)");
680$rules.= &do_lib_rule("\$(CRYPTOOBJ)","\$(O_CRYPTO)",$crypto,$shlib,"\$(SO_CRYPTO)"); 717
718if ($fips)
719 {
720 if ($shlib)
721 {
722 $rules.= &do_lib_rule("\$(CRYPTOOBJ) \$(O_FIPSCANISTER)",
723 "\$(O_CRYPTO)", "$crypto",
724 $shlib, "\$(SO_CRYPTO)", "\$(BASEADDR)");
725 }
726 else
727 {
728 $rules.= &do_lib_rule("\$(CRYPTOOBJ)",
729 "\$(O_CRYPTO)",$crypto,$shlib,"\$(SO_CRYPTO)", "");
730 $rules.= &do_lib_rule("\$(CRYPTOOBJ) \$(O_FIPSCANISTER)",
731 "\$(LIB_D)$o$crypto_compat",$crypto,$shlib,"\$(SO_CRYPTO)", "");
732 }
733 }
734 else
735 {
736 $rules.= &do_lib_rule("\$(CRYPTOOBJ)","\$(O_CRYPTO)",$crypto,$shlib,
737 "\$(SO_CRYPTO)");
738 }
681 739
682foreach (split(" ",$otherlibs)) 740foreach (split(" ",$otherlibs))
683 { 741 {
@@ -687,7 +745,7 @@ foreach (split(" ",$otherlibs))
687 745
688 } 746 }
689 747
690$rules.=&do_link_rule("\$(BIN_D)$o\$(E_EXE)$exep","\$(E_OBJ)","\$(LIBS_DEP)","\$(L_LIBS) \$(EX_LIBS)"); 748$rules.=&do_link_rule("\$(BIN_D)$o\$(E_EXE)$exep","\$(E_OBJ)","\$(LIBS_DEP)","\$(L_LIBS) \$(EX_LIBS)", ($fips && !$shlib) ? 2 : 0);
691 749
692print $defs; 750print $defs;
693 751
@@ -781,6 +839,8 @@ sub var_add
781 @a=grep(!/(^sha1)|(_sha1$)|(m_dss1$)/,@a) if $no_sha1; 839 @a=grep(!/(^sha1)|(_sha1$)|(m_dss1$)/,@a) if $no_sha1;
782 @a=grep(!/_mdc2$/,@a) if $no_mdc2; 840 @a=grep(!/_mdc2$/,@a) if $no_mdc2;
783 841
842 @a=grep(!/(srp)/,@a) if $no_srp;
843
784 @a=grep(!/^engine$/,@a) if $no_engine; 844 @a=grep(!/^engine$/,@a) if $no_engine;
785 @a=grep(!/^hw$/,@a) if $no_hw; 845 @a=grep(!/^hw$/,@a) if $no_hw;
786 @a=grep(!/(^rsa$)|(^genrsa$)/,@a) if $no_rsa; 846 @a=grep(!/(^rsa$)|(^genrsa$)/,@a) if $no_rsa;
@@ -939,14 +999,15 @@ sub Sasm_compile_target
939 999
940sub cc_compile_target 1000sub cc_compile_target
941 { 1001 {
942 local($target,$source,$ex_flags)=@_; 1002 local($target,$source,$ex_flags, $srcd)=@_;
943 local($ret); 1003 local($ret);
944 1004
945 $ex_flags.=" -DMK1MF_BUILD -D$platform_cpp_symbol" if ($source =~ /cversion/); 1005 $ex_flags.=" -DMK1MF_BUILD -D$platform_cpp_symbol" if ($source =~ /cversion/);
946 $target =~ s/\//$o/g if $o ne "/"; 1006 $target =~ s/\//$o/g if $o ne "/";
947 $source =~ s/\//$o/g if $o ne "/"; 1007 $source =~ s/\//$o/g if $o ne "/";
948 $ret ="$target: \$(SRC_D)$o$source\n\t"; 1008 $srcd = "\$(SRC_D)$o" unless defined $srcd;
949 $ret.="\$(CC) ${ofile}$target $ex_flags -c \$(SRC_D)$o$source\n\n"; 1009 $ret ="$target: $srcd$source\n\t";
1010 $ret.="\$(CC) ${ofile}$target $ex_flags -c $srcd$source\n\n";
950 return($ret); 1011 return($ret);
951 } 1012 }
952 1013
@@ -1056,8 +1117,11 @@ sub read_options
1056 "no-ssl2" => \$no_ssl2, 1117 "no-ssl2" => \$no_ssl2,
1057 "no-ssl3" => \$no_ssl3, 1118 "no-ssl3" => \$no_ssl3,
1058 "no-tlsext" => \$no_tlsext, 1119 "no-tlsext" => \$no_tlsext,
1120 "no-srp" => \$no_srp,
1059 "no-cms" => \$no_cms, 1121 "no-cms" => \$no_cms,
1122 "no-ec2m" => \$no_ec2m,
1060 "no-jpake" => \$no_jpake, 1123 "no-jpake" => \$no_jpake,
1124 "no-ec_nistp_64_gcc_128" => 0,
1061 "no-err" => \$no_err, 1125 "no-err" => \$no_err,
1062 "no-sock" => \$no_sock, 1126 "no-sock" => \$no_sock,
1063 "no-krb5" => \$no_krb5, 1127 "no-krb5" => \$no_krb5,
@@ -1067,11 +1131,12 @@ sub read_options
1067 "no-gost" => \$no_gost, 1131 "no-gost" => \$no_gost,
1068 "no-engine" => \$no_engine, 1132 "no-engine" => \$no_engine,
1069 "no-hw" => \$no_hw, 1133 "no-hw" => \$no_hw,
1134 "no-rsax" => 0,
1070 "just-ssl" => 1135 "just-ssl" =>
1071 [\$no_rc2, \$no_idea, \$no_des, \$no_bf, \$no_cast, 1136 [\$no_rc2, \$no_idea, \$no_des, \$no_bf, \$no_cast,
1072 \$no_md2, \$no_sha, \$no_mdc2, \$no_dsa, \$no_dh, 1137 \$no_md2, \$no_sha, \$no_mdc2, \$no_dsa, \$no_dh,
1073 \$no_ssl2, \$no_err, \$no_ripemd, \$no_rc5, 1138 \$no_ssl2, \$no_err, \$no_ripemd, \$no_rc5,
1074 \$no_aes, \$no_camellia, \$no_seed], 1139 \$no_aes, \$no_camellia, \$no_seed, \$no_srp],
1075 "rsaref" => 0, 1140 "rsaref" => 0,
1076 "gcc" => \$gcc, 1141 "gcc" => \$gcc,
1077 "debug" => \$debug, 1142 "debug" => \$debug,
@@ -1079,6 +1144,7 @@ sub read_options
1079 "shlib" => \$shlib, 1144 "shlib" => \$shlib,
1080 "dll" => \$shlib, 1145 "dll" => \$shlib,
1081 "shared" => 0, 1146 "shared" => 0,
1147 "no-sctp" => 0,
1082 "no-gmp" => 0, 1148 "no-gmp" => 0,
1083 "no-rfc3779" => 0, 1149 "no-rfc3779" => 0,
1084 "no-montasm" => 0, 1150 "no-montasm" => 0,
@@ -1086,6 +1152,7 @@ sub read_options
1086 "no-store" => 0, 1152 "no-store" => 0,
1087 "no-zlib" => 0, 1153 "no-zlib" => 0,
1088 "no-zlib-dynamic" => 0, 1154 "no-zlib-dynamic" => 0,
1155 "fips" => \$fips
1089 ); 1156 );
1090 1157
1091 if (exists $valid_options{$_}) 1158 if (exists $valid_options{$_})
diff --git a/src/lib/libcrypto/util/mkdef.pl b/src/lib/libcrypto/util/mkdef.pl
index ab47329097..9a8c7b87d1 100644
--- a/src/lib/libcrypto/util/mkdef.pl
+++ b/src/lib/libcrypto/util/mkdef.pl
@@ -79,13 +79,15 @@ my $OS2=0;
79my $safe_stack_def = 0; 79my $safe_stack_def = 0;
80 80
81my @known_platforms = ( "__FreeBSD__", "PERL5", "NeXT", 81my @known_platforms = ( "__FreeBSD__", "PERL5", "NeXT",
82 "EXPORT_VAR_AS_FUNCTION", "ZLIB" ); 82 "EXPORT_VAR_AS_FUNCTION", "ZLIB", "OPENSSL_FIPS" );
83my @known_ossl_platforms = ( "VMS", "WIN16", "WIN32", "WINNT", "OS2" ); 83my @known_ossl_platforms = ( "VMS", "WIN16", "WIN32", "WINNT", "OS2" );
84my @known_algorithms = ( "RC2", "RC4", "RC5", "IDEA", "DES", "BF", 84my @known_algorithms = ( "RC2", "RC4", "RC5", "IDEA", "DES", "BF",
85 "CAST", "MD2", "MD4", "MD5", "SHA", "SHA0", "SHA1", 85 "CAST", "MD2", "MD4", "MD5", "SHA", "SHA0", "SHA1",
86 "SHA256", "SHA512", "RIPEMD", 86 "SHA256", "SHA512", "RIPEMD",
87 "MDC2", "WHIRLPOOL", "RSA", "DSA", "DH", "EC", "ECDH", "ECDSA", 87 "MDC2", "WHIRLPOOL", "RSA", "DSA", "DH", "EC", "ECDH", "ECDSA", "EC2M",
88 "HMAC", "AES", "CAMELLIA", "SEED", "GOST", 88 "HMAC", "AES", "CAMELLIA", "SEED", "GOST",
89 # EC_NISTP_64_GCC_128
90 "EC_NISTP_64_GCC_128",
89 # Envelope "algorithms" 91 # Envelope "algorithms"
90 "EVP", "X509", "ASN1_TYPEDEFS", 92 "EVP", "X509", "ASN1_TYPEDEFS",
91 # Helper "algorithms" 93 # Helper "algorithms"
@@ -98,7 +100,7 @@ my @known_algorithms = ( "RC2", "RC4", "RC5", "IDEA", "DES", "BF",
98 # RFC3779 100 # RFC3779
99 "RFC3779", 101 "RFC3779",
100 # TLS 102 # TLS
101 "TLSEXT", "PSK", 103 "TLSEXT", "PSK", "SRP", "HEARTBEATS",
102 # CMS 104 # CMS
103 "CMS", 105 "CMS",
104 # CryptoAPI Engine 106 # CryptoAPI Engine
@@ -107,8 +109,14 @@ my @known_algorithms = ( "RC2", "RC4", "RC5", "IDEA", "DES", "BF",
107 "SSL2", 109 "SSL2",
108 # JPAKE 110 # JPAKE
109 "JPAKE", 111 "JPAKE",
112 # NEXTPROTONEG
113 "NEXTPROTONEG",
110 # Deprecated functions 114 # Deprecated functions
111 "DEPRECATED" ); 115 "DEPRECATED",
116 # Hide SSL internals
117 "SSL_INTERN",
118 # SCTP
119 "SCTP");
112 120
113my $options=""; 121my $options="";
114open(IN,"<Makefile") || die "unable to open Makefile!\n"; 122open(IN,"<Makefile") || die "unable to open Makefile!\n";
@@ -127,7 +135,10 @@ my $no_rsa; my $no_dsa; my $no_dh; my $no_hmac=0; my $no_aes; my $no_krb5;
127my $no_ec; my $no_ecdsa; my $no_ecdh; my $no_engine; my $no_hw; 135my $no_ec; my $no_ecdsa; my $no_ecdh; my $no_engine; my $no_hw;
128my $no_fp_api; my $no_static_engine=1; my $no_gmp; my $no_deprecated; 136my $no_fp_api; my $no_static_engine=1; my $no_gmp; my $no_deprecated;
129my $no_rfc3779; my $no_psk; my $no_tlsext; my $no_cms; my $no_capieng; 137my $no_rfc3779; my $no_psk; my $no_tlsext; my $no_cms; my $no_capieng;
130my $no_jpake; my $no_ssl2; 138my $no_jpake; my $no_srp; my $no_ssl2; my $no_ec2m; my $no_nistp_gcc;
139my $no_nextprotoneg; my $no_sctp;
140
141my $fips;
131 142
132my $zlib; 143my $zlib;
133 144
@@ -151,6 +162,7 @@ foreach (@ARGV, split(/ /, $options))
151 } 162 }
152 $VMS=1 if $_ eq "VMS"; 163 $VMS=1 if $_ eq "VMS";
153 $OS2=1 if $_ eq "OS2"; 164 $OS2=1 if $_ eq "OS2";
165 $fips=1 if /^fips/;
154 if ($_ eq "zlib" || $_ eq "enable-zlib" || $_ eq "zlib-dynamic" 166 if ($_ eq "zlib" || $_ eq "enable-zlib" || $_ eq "zlib-dynamic"
155 || $_ eq "enable-zlib-dynamic") { 167 || $_ eq "enable-zlib-dynamic") {
156 $zlib = 1; 168 $zlib = 1;
@@ -215,9 +227,14 @@ foreach (@ARGV, split(/ /, $options))
215 elsif (/^no-rfc3779$/) { $no_rfc3779=1; } 227 elsif (/^no-rfc3779$/) { $no_rfc3779=1; }
216 elsif (/^no-tlsext$/) { $no_tlsext=1; } 228 elsif (/^no-tlsext$/) { $no_tlsext=1; }
217 elsif (/^no-cms$/) { $no_cms=1; } 229 elsif (/^no-cms$/) { $no_cms=1; }
230 elsif (/^no-ec2m$/) { $no_ec2m=1; }
231 elsif (/^no-ec_nistp_64_gcc_128$/) { $no_nistp_gcc=1; }
232 elsif (/^no-nextprotoneg$/) { $no_nextprotoneg=1; }
218 elsif (/^no-ssl2$/) { $no_ssl2=1; } 233 elsif (/^no-ssl2$/) { $no_ssl2=1; }
219 elsif (/^no-capieng$/) { $no_capieng=1; } 234 elsif (/^no-capieng$/) { $no_capieng=1; }
220 elsif (/^no-jpake$/) { $no_jpake=1; } 235 elsif (/^no-jpake$/) { $no_jpake=1; }
236 elsif (/^no-srp$/) { $no_srp=1; }
237 elsif (/^no-sctp$/) { $no_sctp=1; }
221 } 238 }
222 239
223 240
@@ -254,8 +271,10 @@ $max_crypto = $max_num;
254my $ssl="ssl/ssl.h"; 271my $ssl="ssl/ssl.h";
255$ssl.=" ssl/kssl.h"; 272$ssl.=" ssl/kssl.h";
256$ssl.=" ssl/tls1.h"; 273$ssl.=" ssl/tls1.h";
274$ssl.=" ssl/srtp.h";
257 275
258my $crypto ="crypto/crypto.h"; 276my $crypto ="crypto/crypto.h";
277$crypto.=" crypto/cryptlib.h";
259$crypto.=" crypto/o_dir.h"; 278$crypto.=" crypto/o_dir.h";
260$crypto.=" crypto/o_str.h"; 279$crypto.=" crypto/o_str.h";
261$crypto.=" crypto/o_time.h"; 280$crypto.=" crypto/o_time.h";
@@ -285,6 +304,7 @@ $crypto.=" crypto/ec/ec.h" ; # unless $no_ec;
285$crypto.=" crypto/ecdsa/ecdsa.h" ; # unless $no_ecdsa; 304$crypto.=" crypto/ecdsa/ecdsa.h" ; # unless $no_ecdsa;
286$crypto.=" crypto/ecdh/ecdh.h" ; # unless $no_ecdh; 305$crypto.=" crypto/ecdh/ecdh.h" ; # unless $no_ecdh;
287$crypto.=" crypto/hmac/hmac.h" ; # unless $no_hmac; 306$crypto.=" crypto/hmac/hmac.h" ; # unless $no_hmac;
307$crypto.=" crypto/cmac/cmac.h" ; # unless $no_hmac;
288 308
289$crypto.=" crypto/engine/engine.h"; # unless $no_engine; 309$crypto.=" crypto/engine/engine.h"; # unless $no_engine;
290$crypto.=" crypto/stack/stack.h" ; # unless $no_stack; 310$crypto.=" crypto/stack/stack.h" ; # unless $no_stack;
@@ -319,6 +339,7 @@ $crypto.=" crypto/pqueue/pqueue.h";
319$crypto.=" crypto/cms/cms.h"; 339$crypto.=" crypto/cms/cms.h";
320$crypto.=" crypto/jpake/jpake.h"; 340$crypto.=" crypto/jpake/jpake.h";
321$crypto.=" crypto/modes/modes.h"; 341$crypto.=" crypto/modes/modes.h";
342$crypto.=" crypto/srp/srp.h";
322 343
323my $symhacks="crypto/symhacks.h"; 344my $symhacks="crypto/symhacks.h";
324 345
@@ -1126,6 +1147,9 @@ sub is_valid
1126 if ($keyword eq "EXPORT_VAR_AS_FUNCTION" && ($VMSVAX || $W32 || $W16)) { 1147 if ($keyword eq "EXPORT_VAR_AS_FUNCTION" && ($VMSVAX || $W32 || $W16)) {
1127 return 1; 1148 return 1;
1128 } 1149 }
1150 if ($keyword eq "OPENSSL_FIPS" && $fips) {
1151 return 1;
1152 }
1129 if ($keyword eq "ZLIB" && $zlib) { return 1; } 1153 if ($keyword eq "ZLIB" && $zlib) { return 1; }
1130 return 0; 1154 return 0;
1131 } else { 1155 } else {
@@ -1172,9 +1196,15 @@ sub is_valid
1172 if ($keyword eq "TLSEXT" && $no_tlsext) { return 0; } 1196 if ($keyword eq "TLSEXT" && $no_tlsext) { return 0; }
1173 if ($keyword eq "PSK" && $no_psk) { return 0; } 1197 if ($keyword eq "PSK" && $no_psk) { return 0; }
1174 if ($keyword eq "CMS" && $no_cms) { return 0; } 1198 if ($keyword eq "CMS" && $no_cms) { return 0; }
1199 if ($keyword eq "EC2M" && $no_ec2m) { return 0; }
1200 if ($keyword eq "NEXTPROTONEG" && $no_nextprotoneg) { return 0; }
1201 if ($keyword eq "EC_NISTP_64_GCC_128" && $no_nistp_gcc)
1202 { return 0; }
1175 if ($keyword eq "SSL2" && $no_ssl2) { return 0; } 1203 if ($keyword eq "SSL2" && $no_ssl2) { return 0; }
1176 if ($keyword eq "CAPIENG" && $no_capieng) { return 0; } 1204 if ($keyword eq "CAPIENG" && $no_capieng) { return 0; }
1177 if ($keyword eq "JPAKE" && $no_jpake) { return 0; } 1205 if ($keyword eq "JPAKE" && $no_jpake) { return 0; }
1206 if ($keyword eq "SRP" && $no_srp) { return 0; }
1207 if ($keyword eq "SCTP" && $no_sctp) { return 0; }
1178 if ($keyword eq "DEPRECATED" && $no_deprecated) { return 0; } 1208 if ($keyword eq "DEPRECATED" && $no_deprecated) { return 0; }
1179 1209
1180 # Nothing recognise as true 1210 # Nothing recognise as true
diff --git a/src/lib/libcrypto/util/mkfiles.pl b/src/lib/libcrypto/util/mkfiles.pl
index 6d15831450..7d9a9d5e5c 100644
--- a/src/lib/libcrypto/util/mkfiles.pl
+++ b/src/lib/libcrypto/util/mkfiles.pl
@@ -15,6 +15,7 @@ my @dirs = (
15"crypto/sha", 15"crypto/sha",
16"crypto/mdc2", 16"crypto/mdc2",
17"crypto/hmac", 17"crypto/hmac",
18"crypto/cmac",
18"crypto/ripemd", 19"crypto/ripemd",
19"crypto/des", 20"crypto/des",
20"crypto/rc2", 21"crypto/rc2",
@@ -62,6 +63,7 @@ my @dirs = (
62"crypto/pqueue", 63"crypto/pqueue",
63"crypto/whrlpool", 64"crypto/whrlpool",
64"crypto/ts", 65"crypto/ts",
66"crypto/srp",
65"ssl", 67"ssl",
66"apps", 68"apps",
67"engines", 69"engines",
diff --git a/src/lib/libcrypto/util/pl/VC-32.pl b/src/lib/libcrypto/util/pl/VC-32.pl
index 5f25fc41bf..c503bd52b9 100644
--- a/src/lib/libcrypto/util/pl/VC-32.pl
+++ b/src/lib/libcrypto/util/pl/VC-32.pl
@@ -6,6 +6,16 @@
6$ssl= "ssleay32"; 6$ssl= "ssleay32";
7$crypto="libeay32"; 7$crypto="libeay32";
8 8
9if ($fips && !$shlib)
10 {
11 $crypto="libeayfips32";
12 $crypto_compat = "libeaycompat32.lib";
13 }
14else
15 {
16 $crypto="libeay32";
17 }
18
9$o='\\'; 19$o='\\';
10$cp='$(PERL) util/copy.pl'; 20$cp='$(PERL) util/copy.pl';
11$mkdir='$(PERL) util/mkdir-p.pl'; 21$mkdir='$(PERL) util/mkdir-p.pl';
@@ -33,7 +43,7 @@ if ($FLAVOR =~ /WIN64/)
33 # considered safe to ignore. 43 # considered safe to ignore.
34 # 44 #
35 $base_cflags= " $mf_cflag"; 45 $base_cflags= " $mf_cflag";
36 my $f = $shlib?' /MD':' /MT'; 46 my $f = $shlib || $fips ?' /MD':' /MT';
37 $lib_cflag='/Zl' if (!$shlib); # remove /DEFAULTLIBs from static lib 47 $lib_cflag='/Zl' if (!$shlib); # remove /DEFAULTLIBs from static lib
38 $opt_cflags=$f.' /Ox'; 48 $opt_cflags=$f.' /Ox';
39 $dbg_cflags=$f.'d /Od -DDEBUG -D_DEBUG'; 49 $dbg_cflags=$f.'d /Od -DDEBUG -D_DEBUG';
@@ -114,7 +124,7 @@ elsif ($FLAVOR =~ /CE/)
114else # Win32 124else # Win32
115 { 125 {
116 $base_cflags= " $mf_cflag"; 126 $base_cflags= " $mf_cflag";
117 my $f = $shlib?' /MD':' /MT'; 127 my $f = $shlib || $fips ?' /MD':' /MT';
118 $lib_cflag='/Zl' if (!$shlib); # remove /DEFAULTLIBs from static lib 128 $lib_cflag='/Zl' if (!$shlib); # remove /DEFAULTLIBs from static lib
119 $opt_cflags=$f.' /Ox /O2 /Ob2'; 129 $opt_cflags=$f.' /Ox /O2 /Ob2';
120 $dbg_cflags=$f.'d /Od -DDEBUG -D_DEBUG'; 130 $dbg_cflags=$f.'d /Od -DDEBUG -D_DEBUG';
@@ -266,10 +276,19 @@ elsif ($shlib && $FLAVOR =~ /CE/)
266 276
267sub do_lib_rule 277sub do_lib_rule
268 { 278 {
269 local($objs,$target,$name,$shlib)=@_; 279 my($objs,$target,$name,$shlib,$ign,$base_addr) = @_;
270 local($ret); 280 local($ret);
271 281
272 $taget =~ s/\//$o/g if $o ne '/'; 282 $taget =~ s/\//$o/g if $o ne '/';
283 my $base_arg;
284 if ($base_addr ne "")
285 {
286 $base_arg= " /base:$base_addr";
287 }
288 else
289 {
290 $base_arg = "";
291 }
273 if ($name ne "") 292 if ($name ne "")
274 { 293 {
275 $name =~ tr/a-z/A-Z/; 294 $name =~ tr/a-z/A-Z/;
@@ -277,17 +296,37 @@ sub do_lib_rule
277 } 296 }
278 297
279# $target="\$(LIB_D)$o$target"; 298# $target="\$(LIB_D)$o$target";
280 $ret.="$target: $objs\n"; 299# $ret.="$target: $objs\n";
281 if (!$shlib) 300 if (!$shlib)
282 { 301 {
283# $ret.="\t\$(RM) \$(O_$Name)\n"; 302# $ret.="\t\$(RM) \$(O_$Name)\n";
303 $ret.="$target: $objs\n";
284 $ret.="\t\$(MKLIB) $lfile$target @<<\n $objs\n<<\n"; 304 $ret.="\t\$(MKLIB) $lfile$target @<<\n $objs\n<<\n";
285 } 305 }
286 else 306 else
287 { 307 {
288 local($ex)=($target =~ /O_CRYPTO/)?'':' $(L_CRYPTO)'; 308 local($ex)=($target =~ /O_CRYPTO/)?'':' $(L_CRYPTO)';
289 $ex.=" $zlib_lib" if $zlib_opt == 1 && $target =~ /O_CRYPTO/; 309 $ex.=" $zlib_lib" if $zlib_opt == 1 && $target =~ /O_CRYPTO/;
290 $ret.="\t\$(LINK) \$(MLFLAGS) $efile$target $name @<<\n \$(SHLIB_EX_OBJ) $objs $ex \$(EX_LIBS)\n<<\n"; 310
311 if ($fips && $target =~ /O_CRYPTO/)
312 {
313 $ret.="$target: $objs \$(PREMAIN_DSO_EXE)";
314 $ret.="\n\tSET FIPS_LINK=\$(LINK)\n";
315 $ret.="\tSET FIPS_CC=\$(CC)\n";
316 $ret.="\tSET FIPS_CC_ARGS=/Fo\$(OBJ_D)${o}fips_premain.obj \$(SHLIB_CFLAGS) -c\n";
317 $ret.="\tSET PREMAIN_DSO_EXE=\$(PREMAIN_DSO_EXE)\n";
318 $ret.="\tSET FIPS_SHA1_EXE=\$(FIPS_SHA1_EXE)\n";
319 $ret.="\tSET FIPS_TARGET=$target\n";
320 $ret.="\tSET FIPSLIB_D=\$(FIPSLIB_D)\n";
321 $ret.="\t\$(FIPSLINK) \$(MLFLAGS) /map $base_arg $efile$target ";
322 $ret.="$name @<<\n \$(SHLIB_EX_OBJ) $objs \$(EX_LIBS) ";
323 $ret.="\$(OBJ_D)${o}fips_premain.obj $ex\n<<\n";
324 }
325 else
326 {
327 $ret.="$target: $objs";
328 $ret.="\n\t\$(LINK) \$(MLFLAGS) $efile$target $name @<<\n \$(SHLIB_EX_OBJ) $objs $ex \$(EX_LIBS)\n<<\n";
329 }
291 $ret.="\tIF EXIST \$@.manifest mt -nologo -manifest \$@.manifest -outputresource:\$@;2\n\n"; 330 $ret.="\tIF EXIST \$@.manifest mt -nologo -manifest \$@.manifest -outputresource:\$@;2\n\n";
292 } 331 }
293 $ret.="\n"; 332 $ret.="\n";
@@ -296,15 +335,35 @@ sub do_lib_rule
296 335
297sub do_link_rule 336sub do_link_rule
298 { 337 {
299 local($target,$files,$dep_libs,$libs)=@_; 338 my($target,$files,$dep_libs,$libs,$standalone)=@_;
300 local($ret,$_); 339 local($ret,$_);
301
302 $file =~ s/\//$o/g if $o ne '/'; 340 $file =~ s/\//$o/g if $o ne '/';
303 $n=&bname($targer); 341 $n=&bname($targer);
304 $ret.="$target: $files $dep_libs\n"; 342 $ret.="$target: $files $dep_libs\n";
305 $ret.="\t\$(LINK) \$(LFLAGS) $efile$target @<<\n"; 343 if ($standalone == 1)
306 $ret.=" \$(APP_EX_OBJ) $files $libs\n<<\n"; 344 {
307 $ret.="\tIF EXIST \$@.manifest mt -nologo -manifest \$@.manifest -outputresource:\$@;1\n\n"; 345 $ret.=" \$(LINK) \$(LFLAGS) $efile$target @<<\n\t";
346 $ret.= "\$(EX_LIBS) " if ($files =~ /O_FIPSCANISTER/ && !$fipscanisterbuild);
347 $ret.="$files $libs\n<<\n";
348 }
349 elsif ($standalone == 2)
350 {
351 $ret.="\tSET FIPS_LINK=\$(LINK)\n";
352 $ret.="\tSET FIPS_CC=\$(CC)\n";
353 $ret.="\tSET FIPS_CC_ARGS=/Fo\$(OBJ_D)${o}fips_premain.obj \$(SHLIB_CFLAGS) -c\n";
354 $ret.="\tSET PREMAIN_DSO_EXE=\n";
355 $ret.="\tSET FIPS_TARGET=$target\n";
356 $ret.="\tSET FIPS_SHA1_EXE=\$(FIPS_SHA1_EXE)\n";
357 $ret.="\tSET FIPSLIB_D=\$(FIPSLIB_D)\n";
358 $ret.="\t\$(FIPSLINK) \$(LFLAGS) /map $efile$target @<<\n";
359 $ret.="\t\$(APP_EX_OBJ) $files \$(OBJ_D)${o}fips_premain.obj $libs\n<<\n";
360 }
361 else
362 {
363 $ret.="\t\$(LINK) \$(LFLAGS) $efile$target @<<\n";
364 $ret.="\t\$(APP_EX_OBJ) $files $libs\n<<\n";
365 }
366 $ret.="\tIF EXIST \$@.manifest mt -nologo -manifest \$@.manifest -outputresource:\$@;1\n\n";
308 return($ret); 367 return($ret);
309 } 368 }
310 369
diff --git a/src/lib/libcrypto/util/ssleay.num b/src/lib/libcrypto/util/ssleay.num
index 15a58e7b13..37655bc40a 100644
--- a/src/lib/libcrypto/util/ssleay.num
+++ b/src/lib/libcrypto/util/ssleay.num
@@ -259,3 +259,64 @@ SSL_set_session_secret_cb 307 EXIST::FUNCTION:
259SSL_set_session_ticket_ext_cb 308 EXIST::FUNCTION: 259SSL_set_session_ticket_ext_cb 308 EXIST::FUNCTION:
260SSL_set1_param 309 EXIST::FUNCTION: 260SSL_set1_param 309 EXIST::FUNCTION:
261SSL_CTX_set1_param 310 EXIST::FUNCTION: 261SSL_CTX_set1_param 310 EXIST::FUNCTION:
262SSL_tls1_key_exporter 311 NOEXIST::FUNCTION:
263SSL_renegotiate_abbreviated 312 EXIST::FUNCTION:
264TLSv1_1_method 313 EXIST::FUNCTION:
265TLSv1_1_client_method 314 EXIST::FUNCTION:
266TLSv1_1_server_method 315 EXIST::FUNCTION:
267SSL_CTX_set_srp_client_pwd_callback 316 EXIST:!VMS:FUNCTION:SRP
268SSL_CTX_set_srp_client_pwd_cb 316 EXIST:VMS:FUNCTION:SRP
269SSL_get_srp_g 317 EXIST::FUNCTION:SRP
270SSL_CTX_set_srp_username_callback 318 EXIST:!VMS:FUNCTION:SRP
271SSL_CTX_set_srp_un_cb 318 EXIST:VMS:FUNCTION:SRP
272SSL_get_srp_userinfo 319 EXIST::FUNCTION:SRP
273SSL_set_srp_server_param 320 EXIST::FUNCTION:SRP
274SSL_set_srp_server_param_pw 321 EXIST::FUNCTION:SRP
275SSL_get_srp_N 322 EXIST::FUNCTION:SRP
276SSL_get_srp_username 323 EXIST::FUNCTION:SRP
277SSL_CTX_set_srp_password 324 EXIST::FUNCTION:SRP
278SSL_CTX_set_srp_strength 325 EXIST::FUNCTION:SRP
279SSL_CTX_set_srp_verify_param_callback 326 EXIST:!VMS:FUNCTION:SRP
280SSL_CTX_set_srp_vfy_param_cb 326 EXIST:VMS:FUNCTION:SRP
281SSL_CTX_set_srp_miss_srp_un_cb 327 NOEXIST::FUNCTION:
282SSL_CTX_set_srp_missing_srp_username_callback 327 NOEXIST::FUNCTION:
283SSL_CTX_set_srp_cb_arg 328 EXIST::FUNCTION:SRP
284SSL_CTX_set_srp_username 329 EXIST::FUNCTION:SRP
285SSL_CTX_SRP_CTX_init 330 EXIST::FUNCTION:SRP
286SSL_SRP_CTX_init 331 EXIST::FUNCTION:SRP
287SRP_Calc_A_param 332 EXIST::FUNCTION:SRP
288SRP_generate_server_master_secret 333 EXIST:!VMS:FUNCTION:SRP
289SRP_gen_server_master_secret 333 EXIST:VMS:FUNCTION:SRP
290SSL_CTX_SRP_CTX_free 334 EXIST::FUNCTION:SRP
291SRP_generate_client_master_secret 335 EXIST:!VMS:FUNCTION:SRP
292SRP_gen_client_master_secret 335 EXIST:VMS:FUNCTION:SRP
293SSL_srp_server_param_with_username 336 EXIST:!VMS:FUNCTION:SRP
294SSL_srp_server_param_with_un 336 EXIST:VMS:FUNCTION:SRP
295SRP_have_to_put_srp_username 337 NOEXIST::FUNCTION:
296SSL_SRP_CTX_free 338 EXIST::FUNCTION:SRP
297SSL_set_debug 339 EXIST::FUNCTION:
298SSL_SESSION_get0_peer 340 EXIST::FUNCTION:
299TLSv1_2_client_method 341 EXIST::FUNCTION:
300SSL_SESSION_set1_id_context 342 EXIST::FUNCTION:
301TLSv1_2_server_method 343 EXIST::FUNCTION:
302SSL_cache_hit 344 EXIST::FUNCTION:
303SSL_get0_kssl_ctx 345 EXIST::FUNCTION:KRB5
304SSL_set0_kssl_ctx 346 EXIST::FUNCTION:KRB5
305SSL_SESSION_get0_id 347 NOEXIST::FUNCTION:
306SSL_set_state 348 EXIST::FUNCTION:
307SSL_CIPHER_get_id 349 EXIST::FUNCTION:
308TLSv1_2_method 350 EXIST::FUNCTION:
309SSL_SESSION_get_id_len 351 NOEXIST::FUNCTION:
310kssl_ctx_get0_client_princ 352 EXIST::FUNCTION:KRB5
311SSL_export_keying_material 353 EXIST::FUNCTION:TLSEXT
312SSL_set_tlsext_use_srtp 354 EXIST::FUNCTION:
313SSL_CTX_set_next_protos_advertised_cb 355 EXIST:!VMS:FUNCTION:NEXTPROTONEG
314SSL_CTX_set_next_protos_adv_cb 355 EXIST:VMS:FUNCTION:NEXTPROTONEG
315SSL_get0_next_proto_negotiated 356 EXIST::FUNCTION:NEXTPROTONEG
316SSL_get_selected_srtp_profile 357 EXIST::FUNCTION:
317SSL_CTX_set_tlsext_use_srtp 358 EXIST::FUNCTION:
318SSL_select_next_proto 359 EXIST::FUNCTION:NEXTPROTONEG
319SSL_get_srtp_profiles 360 EXIST::FUNCTION:
320SSL_CTX_set_next_proto_select_cb 361 EXIST:!VMS:FUNCTION:NEXTPROTONEG
321SSL_CTX_set_next_proto_sel_cb 361 EXIST:VMS:FUNCTION:NEXTPROTONEG
322SSL_SESSION_get_compress_id 362 EXIST::FUNCTION: