summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/asn1
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/asn1')
-rw-r--r--src/lib/libcrypto/asn1/Makefile930
-rw-r--r--src/lib/libcrypto/asn1/a_digest.c6
-rw-r--r--src/lib/libcrypto/asn1/a_gentm.c263
-rw-r--r--src/lib/libcrypto/asn1/a_int.c4
-rw-r--r--src/lib/libcrypto/asn1/a_sign.c111
-rw-r--r--src/lib/libcrypto/asn1/a_utctm.c318
-rw-r--r--src/lib/libcrypto/asn1/a_verify.c77
-rw-r--r--src/lib/libcrypto/asn1/asn1.h8
-rw-r--r--src/lib/libcrypto/asn1/asn1_err.c5
-rw-r--r--src/lib/libcrypto/asn1/asn_mime.c23
-rw-r--r--src/lib/libcrypto/asn1/n_pkey.c38
-rw-r--r--src/lib/libcrypto/asn1/p5_pbev2.c143
-rw-r--r--src/lib/libcrypto/asn1/t_crl.c3
-rw-r--r--src/lib/libcrypto/asn1/t_x509.c55
-rw-r--r--src/lib/libcrypto/asn1/tasn_prn.c12
-rw-r--r--src/lib/libcrypto/asn1/x_algor.c14
-rw-r--r--src/lib/libcrypto/asn1/x_name.c3
-rw-r--r--src/lib/libcrypto/asn1/x_pubkey.c11
18 files changed, 1671 insertions, 353 deletions
diff --git a/src/lib/libcrypto/asn1/Makefile b/src/lib/libcrypto/asn1/Makefile
new file mode 100644
index 0000000000..160544eede
--- /dev/null
+++ b/src/lib/libcrypto/asn1/Makefile
@@ -0,0 +1,930 @@
1#
2# OpenSSL/crypto/asn1/Makefile
3#
4
5DIR= asn1
6TOP= ../..
7CC= cc
8INCLUDES= -I.. -I$(TOP) -I../../include
9CFLAG=-g
10MAKEFILE= Makefile
11AR= ar r
12
13CFLAGS= $(INCLUDES) $(CFLAG)
14
15GENERAL=Makefile README
16TEST=
17APPS=
18
19LIB=$(TOP)/libcrypto.a
20LIBSRC= a_object.c a_bitstr.c a_utctm.c a_gentm.c a_time.c a_int.c a_octet.c \
21 a_print.c a_type.c a_set.c a_dup.c a_d2i_fp.c a_i2d_fp.c \
22 a_enum.c a_utf8.c a_sign.c a_digest.c a_verify.c a_mbstr.c a_strex.c \
23 x_algor.c x_val.c x_pubkey.c x_sig.c x_req.c x_attrib.c x_bignum.c \
24 x_long.c x_name.c x_x509.c x_x509a.c x_crl.c x_info.c x_spki.c nsseq.c \
25 x_nx509.c d2i_pu.c d2i_pr.c i2d_pu.c i2d_pr.c\
26 t_req.c t_x509.c t_x509a.c t_crl.c t_pkey.c t_spki.c t_bitst.c \
27 tasn_new.c tasn_fre.c tasn_enc.c tasn_dec.c tasn_utl.c tasn_typ.c \
28 tasn_prn.c ameth_lib.c \
29 f_int.c f_string.c n_pkey.c \
30 f_enum.c x_pkey.c a_bool.c x_exten.c bio_asn1.c bio_ndef.c asn_mime.c \
31 asn1_gen.c asn1_par.c asn1_lib.c asn1_err.c a_bytes.c a_strnid.c \
32 evp_asn1.c asn_pack.c p5_pbe.c p5_pbev2.c p8_pkey.c asn_moid.c
33LIBOBJ= a_object.o a_bitstr.o a_utctm.o a_gentm.o a_time.o a_int.o a_octet.o \
34 a_print.o a_type.o a_set.o a_dup.o a_d2i_fp.o a_i2d_fp.o \
35 a_enum.o a_utf8.o a_sign.o a_digest.o a_verify.o a_mbstr.o a_strex.o \
36 x_algor.o x_val.o x_pubkey.o x_sig.o x_req.o x_attrib.o x_bignum.o \
37 x_long.o x_name.o x_x509.o x_x509a.o x_crl.o x_info.o x_spki.o nsseq.o \
38 x_nx509.o d2i_pu.o d2i_pr.o i2d_pu.o i2d_pr.o \
39 t_req.o t_x509.o t_x509a.o t_crl.o t_pkey.o t_spki.o t_bitst.o \
40 tasn_new.o tasn_fre.o tasn_enc.o tasn_dec.o tasn_utl.o tasn_typ.o \
41 tasn_prn.o ameth_lib.o \
42 f_int.o f_string.o n_pkey.o \
43 f_enum.o x_pkey.o a_bool.o x_exten.o bio_asn1.o bio_ndef.o asn_mime.o \
44 asn1_gen.o asn1_par.o asn1_lib.o asn1_err.o a_bytes.o a_strnid.o \
45 evp_asn1.o asn_pack.o p5_pbe.o p5_pbev2.o p8_pkey.o asn_moid.o
46
47SRC= $(LIBSRC)
48
49EXHEADER= asn1.h asn1_mac.h asn1t.h
50HEADER= $(EXHEADER) asn1_locl.h
51
52ALL= $(GENERAL) $(SRC) $(HEADER)
53
54top:
55 (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
56
57test: test.c
58 cc -g -I../../include -c test.c
59 cc -g -I../../include -o test test.o -L../.. -lcrypto
60
61pk: pk.c
62 cc -g -I../../include -c pk.c
63 cc -g -I../../include -o pk pk.o -L../.. -lcrypto
64
65all: lib
66
67lib: $(LIBOBJ)
68 $(AR) $(LIB) $(LIBOBJ)
69 $(RANLIB) $(LIB) || echo Never mind.
70 @touch lib
71
72files:
73 $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
74
75links:
76 @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
77 @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
78 @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
79
80install:
81 @[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
82 @headerlist="$(EXHEADER)"; for i in $$headerlist ; \
83 do \
84 (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
85 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
86 done;
87
88tags:
89 ctags $(SRC)
90
91tests:
92
93lint:
94 lint -DLINT $(INCLUDES) $(SRC)>fluff
95
96depend:
97 @[ -n "$(MAKEDEPEND)" ] # should be set by top Makefile...
98 $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
99
100dclean:
101 $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
102 mv -f Makefile.new $(MAKEFILE)
103
104clean:
105 rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
106
107
108# DO NOT DELETE THIS LINE -- make depend depends on it.
109
110a_bitstr.o: ../../e_os.h ../../include/openssl/asn1.h
111a_bitstr.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
112a_bitstr.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
113a_bitstr.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
114a_bitstr.o: ../../include/openssl/opensslconf.h
115a_bitstr.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
116a_bitstr.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
117a_bitstr.o: ../../include/openssl/symhacks.h ../cryptlib.h a_bitstr.c
118a_bool.o: ../../e_os.h ../../include/openssl/asn1.h
119a_bool.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
120a_bool.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
121a_bool.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
122a_bool.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
123a_bool.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
124a_bool.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
125a_bool.o: ../../include/openssl/symhacks.h ../cryptlib.h a_bool.c
126a_bytes.o: ../../e_os.h ../../include/openssl/asn1.h
127a_bytes.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
128a_bytes.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
129a_bytes.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
130a_bytes.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
131a_bytes.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
132a_bytes.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
133a_bytes.o: ../cryptlib.h a_bytes.c
134a_d2i_fp.o: ../../e_os.h ../../include/openssl/asn1.h
135a_d2i_fp.o: ../../include/openssl/asn1_mac.h ../../include/openssl/bio.h
136a_d2i_fp.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
137a_d2i_fp.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
138a_d2i_fp.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
139a_d2i_fp.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
140a_d2i_fp.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
141a_d2i_fp.o: ../../include/openssl/symhacks.h ../cryptlib.h a_d2i_fp.c
142a_digest.o: ../../e_os.h ../../include/openssl/asn1.h
143a_digest.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
144a_digest.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
145a_digest.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
146a_digest.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h
147a_digest.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h
148a_digest.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
149a_digest.o: ../../include/openssl/opensslconf.h
150a_digest.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
151a_digest.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
152a_digest.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
153a_digest.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
154a_digest.o: ../../include/openssl/x509_vfy.h ../cryptlib.h a_digest.c
155a_dup.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
156a_dup.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
157a_dup.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
158a_dup.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
159a_dup.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
160a_dup.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
161a_dup.o: ../../include/openssl/symhacks.h ../cryptlib.h a_dup.c
162a_enum.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
163a_enum.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
164a_enum.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
165a_enum.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
166a_enum.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
167a_enum.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
168a_enum.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
169a_enum.o: ../cryptlib.h a_enum.c
170a_gentm.o: ../../e_os.h ../../include/openssl/asn1.h
171a_gentm.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
172a_gentm.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
173a_gentm.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
174a_gentm.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
175a_gentm.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
176a_gentm.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
177a_gentm.o: ../cryptlib.h ../o_time.h a_gentm.c
178a_i2d_fp.o: ../../e_os.h ../../include/openssl/asn1.h
179a_i2d_fp.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
180a_i2d_fp.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
181a_i2d_fp.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
182a_i2d_fp.o: ../../include/openssl/opensslconf.h
183a_i2d_fp.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
184a_i2d_fp.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
185a_i2d_fp.o: ../../include/openssl/symhacks.h ../cryptlib.h a_i2d_fp.c
186a_int.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
187a_int.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
188a_int.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
189a_int.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
190a_int.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
191a_int.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
192a_int.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
193a_int.o: ../cryptlib.h a_int.c
194a_mbstr.o: ../../e_os.h ../../include/openssl/asn1.h
195a_mbstr.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
196a_mbstr.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
197a_mbstr.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
198a_mbstr.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
199a_mbstr.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
200a_mbstr.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
201a_mbstr.o: ../cryptlib.h a_mbstr.c
202a_object.o: ../../e_os.h ../../include/openssl/asn1.h
203a_object.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
204a_object.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
205a_object.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
206a_object.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
207a_object.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
208a_object.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
209a_object.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
210a_object.o: ../../include/openssl/symhacks.h ../cryptlib.h a_object.c
211a_octet.o: ../../e_os.h ../../include/openssl/asn1.h
212a_octet.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
213a_octet.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
214a_octet.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
215a_octet.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
216a_octet.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
217a_octet.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
218a_octet.o: ../cryptlib.h a_octet.c
219a_print.o: ../../e_os.h ../../include/openssl/asn1.h
220a_print.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
221a_print.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
222a_print.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
223a_print.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
224a_print.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
225a_print.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
226a_print.o: ../cryptlib.h a_print.c
227a_set.o: ../../e_os.h ../../include/openssl/asn1.h
228a_set.o: ../../include/openssl/asn1_mac.h ../../include/openssl/bio.h
229a_set.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
230a_set.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
231a_set.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
232a_set.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
233a_set.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
234a_set.o: ../../include/openssl/symhacks.h ../cryptlib.h a_set.c
235a_sign.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
236a_sign.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
237a_sign.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
238a_sign.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
239a_sign.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h
240a_sign.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h
241a_sign.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
242a_sign.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
243a_sign.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
244a_sign.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
245a_sign.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
246a_sign.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
247a_sign.o: ../cryptlib.h a_sign.c asn1_locl.h
248a_strex.o: ../../e_os.h ../../include/openssl/asn1.h
249a_strex.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
250a_strex.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
251a_strex.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
252a_strex.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h
253a_strex.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h
254a_strex.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
255a_strex.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
256a_strex.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
257a_strex.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
258a_strex.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
259a_strex.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
260a_strex.o: ../cryptlib.h a_strex.c charmap.h
261a_strnid.o: ../../e_os.h ../../include/openssl/asn1.h
262a_strnid.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
263a_strnid.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
264a_strnid.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
265a_strnid.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
266a_strnid.o: ../../include/openssl/opensslconf.h
267a_strnid.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
268a_strnid.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
269a_strnid.o: ../../include/openssl/symhacks.h ../cryptlib.h a_strnid.c
270a_time.o: ../../e_os.h ../../include/openssl/asn1.h
271a_time.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
272a_time.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
273a_time.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
274a_time.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
275a_time.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
276a_time.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
277a_time.o: ../../include/openssl/symhacks.h ../cryptlib.h ../o_time.h a_time.c
278a_type.o: ../../e_os.h ../../include/openssl/asn1.h
279a_type.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
280a_type.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
281a_type.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
282a_type.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
283a_type.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
284a_type.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
285a_type.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
286a_type.o: ../../include/openssl/symhacks.h ../cryptlib.h a_type.c
287a_utctm.o: ../../e_os.h ../../include/openssl/asn1.h
288a_utctm.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
289a_utctm.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
290a_utctm.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
291a_utctm.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
292a_utctm.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
293a_utctm.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
294a_utctm.o: ../cryptlib.h ../o_time.h a_utctm.c
295a_utf8.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
296a_utf8.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
297a_utf8.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
298a_utf8.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
299a_utf8.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
300a_utf8.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
301a_utf8.o: ../../include/openssl/symhacks.h ../cryptlib.h a_utf8.c
302a_verify.o: ../../e_os.h ../../include/openssl/asn1.h
303a_verify.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
304a_verify.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
305a_verify.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
306a_verify.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
307a_verify.o: ../../include/openssl/err.h ../../include/openssl/evp.h
308a_verify.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
309a_verify.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
310a_verify.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
311a_verify.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
312a_verify.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
313a_verify.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
314a_verify.o: ../../include/openssl/x509_vfy.h ../cryptlib.h a_verify.c
315a_verify.o: asn1_locl.h
316ameth_lib.o: ../../e_os.h ../../include/openssl/asn1.h
317ameth_lib.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
318ameth_lib.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
319ameth_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
320ameth_lib.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
321ameth_lib.o: ../../include/openssl/engine.h ../../include/openssl/err.h
322ameth_lib.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h
323ameth_lib.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
324ameth_lib.o: ../../include/openssl/opensslconf.h
325ameth_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
326ameth_lib.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
327ameth_lib.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
328ameth_lib.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
329ameth_lib.o: ../../include/openssl/x509_vfy.h ../cryptlib.h ameth_lib.c
330ameth_lib.o: asn1_locl.h
331asn1_err.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
332asn1_err.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
333asn1_err.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
334asn1_err.o: ../../include/openssl/opensslconf.h
335asn1_err.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
336asn1_err.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
337asn1_err.o: ../../include/openssl/symhacks.h asn1_err.c
338asn1_gen.o: ../../e_os.h ../../include/openssl/asn1.h
339asn1_gen.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
340asn1_gen.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h
341asn1_gen.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
342asn1_gen.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
343asn1_gen.o: ../../include/openssl/err.h ../../include/openssl/evp.h
344asn1_gen.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
345asn1_gen.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
346asn1_gen.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
347asn1_gen.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
348asn1_gen.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
349asn1_gen.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
350asn1_gen.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h
351asn1_gen.o: ../cryptlib.h asn1_gen.c
352asn1_lib.o: ../../e_os.h ../../include/openssl/asn1.h
353asn1_lib.o: ../../include/openssl/asn1_mac.h ../../include/openssl/bio.h
354asn1_lib.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
355asn1_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
356asn1_lib.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
357asn1_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
358asn1_lib.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
359asn1_lib.o: ../../include/openssl/symhacks.h ../cryptlib.h asn1_lib.c
360asn1_par.o: ../../e_os.h ../../include/openssl/asn1.h
361asn1_par.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
362asn1_par.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
363asn1_par.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
364asn1_par.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
365asn1_par.o: ../../include/openssl/opensslconf.h
366asn1_par.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
367asn1_par.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
368asn1_par.o: ../../include/openssl/symhacks.h ../cryptlib.h asn1_par.c
369asn_mime.o: ../../e_os.h ../../include/openssl/asn1.h
370asn_mime.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
371asn_mime.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
372asn_mime.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
373asn_mime.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
374asn_mime.o: ../../include/openssl/err.h ../../include/openssl/evp.h
375asn_mime.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
376asn_mime.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
377asn_mime.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
378asn_mime.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h
379asn_mime.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
380asn_mime.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
381asn_mime.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
382asn_mime.o: ../cryptlib.h asn1_locl.h asn_mime.c
383asn_moid.o: ../../e_os.h ../../include/openssl/asn1.h
384asn_moid.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
385asn_moid.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h
386asn_moid.o: ../../include/openssl/dso.h ../../include/openssl/e_os2.h
387asn_moid.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
388asn_moid.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h
389asn_moid.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h
390asn_moid.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
391asn_moid.o: ../../include/openssl/opensslconf.h
392asn_moid.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
393asn_moid.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
394asn_moid.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
395asn_moid.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
396asn_moid.o: ../../include/openssl/x509_vfy.h ../cryptlib.h asn_moid.c
397asn_pack.o: ../../e_os.h ../../include/openssl/asn1.h
398asn_pack.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
399asn_pack.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
400asn_pack.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
401asn_pack.o: ../../include/openssl/opensslconf.h
402asn_pack.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
403asn_pack.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
404asn_pack.o: ../../include/openssl/symhacks.h ../cryptlib.h asn_pack.c
405bio_asn1.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
406bio_asn1.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
407bio_asn1.o: ../../include/openssl/opensslconf.h
408bio_asn1.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
409bio_asn1.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
410bio_asn1.o: ../../include/openssl/symhacks.h bio_asn1.c
411bio_ndef.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h
412bio_ndef.o: ../../include/openssl/bio.h ../../include/openssl/crypto.h
413bio_ndef.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
414bio_ndef.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
415bio_ndef.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
416bio_ndef.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
417bio_ndef.o: ../../include/openssl/symhacks.h bio_ndef.c
418d2i_pr.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
419d2i_pr.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
420d2i_pr.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
421d2i_pr.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
422d2i_pr.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h
423d2i_pr.o: ../../include/openssl/err.h ../../include/openssl/evp.h
424d2i_pr.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
425d2i_pr.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
426d2i_pr.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
427d2i_pr.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
428d2i_pr.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
429d2i_pr.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
430d2i_pr.o: ../../include/openssl/x509_vfy.h ../cryptlib.h asn1_locl.h d2i_pr.c
431d2i_pu.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
432d2i_pu.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
433d2i_pu.o: ../../include/openssl/crypto.h ../../include/openssl/dsa.h
434d2i_pu.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
435d2i_pu.o: ../../include/openssl/err.h ../../include/openssl/evp.h
436d2i_pu.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
437d2i_pu.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
438d2i_pu.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
439d2i_pu.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
440d2i_pu.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
441d2i_pu.o: ../cryptlib.h d2i_pu.c
442evp_asn1.o: ../../e_os.h ../../include/openssl/asn1.h
443evp_asn1.o: ../../include/openssl/asn1_mac.h ../../include/openssl/bio.h
444evp_asn1.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
445evp_asn1.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
446evp_asn1.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
447evp_asn1.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
448evp_asn1.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
449evp_asn1.o: ../../include/openssl/symhacks.h ../cryptlib.h evp_asn1.c
450f_enum.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
451f_enum.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
452f_enum.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
453f_enum.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
454f_enum.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
455f_enum.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
456f_enum.o: ../../include/openssl/symhacks.h ../cryptlib.h f_enum.c
457f_int.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
458f_int.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
459f_int.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
460f_int.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
461f_int.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
462f_int.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
463f_int.o: ../../include/openssl/symhacks.h ../cryptlib.h f_int.c
464f_string.o: ../../e_os.h ../../include/openssl/asn1.h
465f_string.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
466f_string.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
467f_string.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
468f_string.o: ../../include/openssl/opensslconf.h
469f_string.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
470f_string.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
471f_string.o: ../../include/openssl/symhacks.h ../cryptlib.h f_string.c
472i2d_pr.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
473i2d_pr.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
474i2d_pr.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
475i2d_pr.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
476i2d_pr.o: ../../include/openssl/err.h ../../include/openssl/evp.h
477i2d_pr.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
478i2d_pr.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
479i2d_pr.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
480i2d_pr.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
481i2d_pr.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
482i2d_pr.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
483i2d_pr.o: ../../include/openssl/x509_vfy.h ../cryptlib.h asn1_locl.h i2d_pr.c
484i2d_pu.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
485i2d_pu.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
486i2d_pu.o: ../../include/openssl/crypto.h ../../include/openssl/dsa.h
487i2d_pu.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
488i2d_pu.o: ../../include/openssl/err.h ../../include/openssl/evp.h
489i2d_pu.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
490i2d_pu.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
491i2d_pu.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
492i2d_pu.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
493i2d_pu.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
494i2d_pu.o: ../cryptlib.h i2d_pu.c
495n_pkey.o: ../../e_os.h ../../include/openssl/asn1.h
496n_pkey.o: ../../include/openssl/asn1_mac.h ../../include/openssl/asn1t.h
497n_pkey.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
498n_pkey.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
499n_pkey.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
500n_pkey.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h
501n_pkey.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h
502n_pkey.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
503n_pkey.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
504n_pkey.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
505n_pkey.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
506n_pkey.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
507n_pkey.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
508n_pkey.o: ../../include/openssl/x509_vfy.h ../cryptlib.h n_pkey.c
509nsseq.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h
510nsseq.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
511nsseq.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
512nsseq.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
513nsseq.o: ../../include/openssl/ecdsa.h ../../include/openssl/evp.h
514nsseq.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
515nsseq.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
516nsseq.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
517nsseq.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
518nsseq.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
519nsseq.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
520nsseq.o: ../../include/openssl/x509_vfy.h nsseq.c
521p5_pbe.o: ../../e_os.h ../../include/openssl/asn1.h
522p5_pbe.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
523p5_pbe.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
524p5_pbe.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
525p5_pbe.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
526p5_pbe.o: ../../include/openssl/err.h ../../include/openssl/evp.h
527p5_pbe.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
528p5_pbe.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
529p5_pbe.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
530p5_pbe.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h
531p5_pbe.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
532p5_pbe.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
533p5_pbe.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
534p5_pbe.o: ../cryptlib.h p5_pbe.c
535p5_pbev2.o: ../../e_os.h ../../include/openssl/asn1.h
536p5_pbev2.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
537p5_pbev2.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
538p5_pbev2.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
539p5_pbev2.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
540p5_pbev2.o: ../../include/openssl/err.h ../../include/openssl/evp.h
541p5_pbev2.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
542p5_pbev2.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
543p5_pbev2.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
544p5_pbev2.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h
545p5_pbev2.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
546p5_pbev2.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
547p5_pbev2.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
548p5_pbev2.o: ../cryptlib.h p5_pbev2.c
549p8_pkey.o: ../../e_os.h ../../include/openssl/asn1.h
550p8_pkey.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
551p8_pkey.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
552p8_pkey.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
553p8_pkey.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
554p8_pkey.o: ../../include/openssl/err.h ../../include/openssl/evp.h
555p8_pkey.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
556p8_pkey.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
557p8_pkey.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
558p8_pkey.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
559p8_pkey.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
560p8_pkey.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
561p8_pkey.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p8_pkey.c
562t_bitst.o: ../../e_os.h ../../include/openssl/asn1.h
563t_bitst.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
564t_bitst.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h
565t_bitst.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
566t_bitst.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
567t_bitst.o: ../../include/openssl/err.h ../../include/openssl/evp.h
568t_bitst.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
569t_bitst.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
570t_bitst.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
571t_bitst.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
572t_bitst.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
573t_bitst.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
574t_bitst.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h
575t_bitst.o: ../cryptlib.h t_bitst.c
576t_crl.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
577t_crl.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
578t_crl.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h
579t_crl.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
580t_crl.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
581t_crl.o: ../../include/openssl/err.h ../../include/openssl/evp.h
582t_crl.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
583t_crl.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
584t_crl.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
585t_crl.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
586t_crl.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
587t_crl.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
588t_crl.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h
589t_crl.o: ../cryptlib.h t_crl.c
590t_pkey.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
591t_pkey.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
592t_pkey.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
593t_pkey.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
594t_pkey.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
595t_pkey.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
596t_pkey.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
597t_pkey.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
598t_pkey.o: ../cryptlib.h t_pkey.c
599t_req.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
600t_req.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
601t_req.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h
602t_req.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
603t_req.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
604t_req.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h
605t_req.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h
606t_req.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
607t_req.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
608t_req.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
609t_req.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
610t_req.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
611t_req.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
612t_req.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h
613t_req.o: ../cryptlib.h t_req.c
614t_spki.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
615t_spki.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
616t_spki.o: ../../include/openssl/crypto.h ../../include/openssl/dsa.h
617t_spki.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
618t_spki.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
619t_spki.o: ../../include/openssl/err.h ../../include/openssl/evp.h
620t_spki.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
621t_spki.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
622t_spki.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
623t_spki.o: ../../include/openssl/pkcs7.h ../../include/openssl/rsa.h
624t_spki.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
625t_spki.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
626t_spki.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
627t_spki.o: ../cryptlib.h t_spki.c
628t_x509.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
629t_x509.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
630t_x509.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h
631t_x509.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
632t_x509.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
633t_x509.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h
634t_x509.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h
635t_x509.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
636t_x509.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
637t_x509.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
638t_x509.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
639t_x509.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
640t_x509.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
641t_x509.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h
642t_x509.o: ../cryptlib.h t_x509.c
643t_x509a.o: ../../e_os.h ../../include/openssl/asn1.h
644t_x509a.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
645t_x509a.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
646t_x509a.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
647t_x509a.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h
648t_x509a.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h
649t_x509a.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
650t_x509a.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
651t_x509a.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
652t_x509a.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
653t_x509a.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
654t_x509a.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
655t_x509a.o: ../cryptlib.h t_x509a.c
656tasn_dec.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h
657tasn_dec.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
658tasn_dec.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
659tasn_dec.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
660tasn_dec.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
661tasn_dec.o: ../../include/openssl/opensslconf.h
662tasn_dec.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
663tasn_dec.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
664tasn_dec.o: ../../include/openssl/symhacks.h tasn_dec.c
665tasn_enc.o: ../../e_os.h ../../include/openssl/asn1.h
666tasn_enc.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
667tasn_enc.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
668tasn_enc.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
669tasn_enc.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
670tasn_enc.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
671tasn_enc.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
672tasn_enc.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
673tasn_enc.o: ../../include/openssl/symhacks.h ../cryptlib.h tasn_enc.c
674tasn_fre.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h
675tasn_fre.o: ../../include/openssl/bio.h ../../include/openssl/crypto.h
676tasn_fre.o: ../../include/openssl/e_os2.h ../../include/openssl/obj_mac.h
677tasn_fre.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
678tasn_fre.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
679tasn_fre.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
680tasn_fre.o: ../../include/openssl/symhacks.h tasn_fre.c
681tasn_new.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h
682tasn_new.o: ../../include/openssl/bio.h ../../include/openssl/crypto.h
683tasn_new.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
684tasn_new.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
685tasn_new.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
686tasn_new.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
687tasn_new.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
688tasn_new.o: ../../include/openssl/symhacks.h tasn_new.c
689tasn_prn.o: ../../e_os.h ../../include/openssl/asn1.h
690tasn_prn.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
691tasn_prn.o: ../../include/openssl/buffer.h ../../include/openssl/conf.h
692tasn_prn.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
693tasn_prn.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
694tasn_prn.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h
695tasn_prn.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h
696tasn_prn.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
697tasn_prn.o: ../../include/openssl/opensslconf.h
698tasn_prn.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
699tasn_prn.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
700tasn_prn.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
701tasn_prn.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
702tasn_prn.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h
703tasn_prn.o: ../cryptlib.h asn1_locl.h tasn_prn.c
704tasn_typ.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h
705tasn_typ.o: ../../include/openssl/bio.h ../../include/openssl/crypto.h
706tasn_typ.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
707tasn_typ.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
708tasn_typ.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
709tasn_typ.o: ../../include/openssl/symhacks.h tasn_typ.c
710tasn_utl.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h
711tasn_utl.o: ../../include/openssl/bio.h ../../include/openssl/crypto.h
712tasn_utl.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
713tasn_utl.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
714tasn_utl.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
715tasn_utl.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
716tasn_utl.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
717tasn_utl.o: ../../include/openssl/symhacks.h tasn_utl.c
718x_algor.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h
719x_algor.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
720x_algor.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
721x_algor.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
722x_algor.o: ../../include/openssl/ecdsa.h ../../include/openssl/evp.h
723x_algor.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
724x_algor.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
725x_algor.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
726x_algor.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
727x_algor.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
728x_algor.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
729x_algor.o: ../../include/openssl/x509_vfy.h x_algor.c
730x_attrib.o: ../../e_os.h ../../include/openssl/asn1.h
731x_attrib.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
732x_attrib.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
733x_attrib.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
734x_attrib.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
735x_attrib.o: ../../include/openssl/err.h ../../include/openssl/evp.h
736x_attrib.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
737x_attrib.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
738x_attrib.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
739x_attrib.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
740x_attrib.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
741x_attrib.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
742x_attrib.o: ../../include/openssl/x509_vfy.h ../cryptlib.h x_attrib.c
743x_bignum.o: ../../e_os.h ../../include/openssl/asn1.h
744x_bignum.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
745x_bignum.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
746x_bignum.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
747x_bignum.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
748x_bignum.o: ../../include/openssl/opensslconf.h
749x_bignum.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
750x_bignum.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
751x_bignum.o: ../../include/openssl/symhacks.h ../cryptlib.h x_bignum.c
752x_crl.o: ../../e_os.h ../../include/openssl/asn1.h
753x_crl.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
754x_crl.o: ../../include/openssl/buffer.h ../../include/openssl/conf.h
755x_crl.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
756x_crl.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
757x_crl.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h
758x_crl.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h
759x_crl.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
760x_crl.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
761x_crl.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
762x_crl.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
763x_crl.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
764x_crl.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
765x_crl.o: ../../include/openssl/x509v3.h ../cryptlib.h asn1_locl.h x_crl.c
766x_exten.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h
767x_exten.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
768x_exten.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
769x_exten.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
770x_exten.o: ../../include/openssl/ecdsa.h ../../include/openssl/evp.h
771x_exten.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
772x_exten.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
773x_exten.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
774x_exten.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
775x_exten.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
776x_exten.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
777x_exten.o: ../../include/openssl/x509_vfy.h x_exten.c
778x_info.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
779x_info.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
780x_info.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
781x_info.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
782x_info.o: ../../include/openssl/err.h ../../include/openssl/evp.h
783x_info.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
784x_info.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
785x_info.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
786x_info.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
787x_info.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
788x_info.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
789x_info.o: ../../include/openssl/x509_vfy.h ../cryptlib.h x_info.c
790x_long.o: ../../e_os.h ../../include/openssl/asn1.h
791x_long.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
792x_long.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
793x_long.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
794x_long.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
795x_long.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
796x_long.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h
797x_long.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
798x_long.o: ../cryptlib.h x_long.c
799x_name.o: ../../e_os.h ../../include/openssl/asn1.h
800x_name.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
801x_name.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
802x_name.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
803x_name.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
804x_name.o: ../../include/openssl/err.h ../../include/openssl/evp.h
805x_name.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
806x_name.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
807x_name.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
808x_name.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
809x_name.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
810x_name.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
811x_name.o: ../../include/openssl/x509_vfy.h ../cryptlib.h asn1_locl.h x_name.c
812x_nx509.o: ../../include/openssl/asn1.h ../../include/openssl/asn1t.h
813x_nx509.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
814x_nx509.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
815x_nx509.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
816x_nx509.o: ../../include/openssl/ecdsa.h ../../include/openssl/evp.h
817x_nx509.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
818x_nx509.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
819x_nx509.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
820x_nx509.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
821x_nx509.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
822x_nx509.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
823x_nx509.o: ../../include/openssl/x509_vfy.h x_nx509.c
824x_pkey.o: ../../e_os.h ../../include/openssl/asn1.h
825x_pkey.o: ../../include/openssl/asn1_mac.h ../../include/openssl/bio.h
826x_pkey.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
827x_pkey.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
828x_pkey.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
829x_pkey.o: ../../include/openssl/err.h ../../include/openssl/evp.h
830x_pkey.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
831x_pkey.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
832x_pkey.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
833x_pkey.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
834x_pkey.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
835x_pkey.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
836x_pkey.o: ../../include/openssl/x509_vfy.h ../cryptlib.h x_pkey.c
837x_pubkey.o: ../../e_os.h ../../include/openssl/asn1.h
838x_pubkey.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
839x_pubkey.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
840x_pubkey.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
841x_pubkey.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
842x_pubkey.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h
843x_pubkey.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h
844x_pubkey.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
845x_pubkey.o: ../../include/openssl/opensslconf.h
846x_pubkey.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
847x_pubkey.o: ../../include/openssl/pkcs7.h ../../include/openssl/rsa.h
848x_pubkey.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
849x_pubkey.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
850x_pubkey.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
851x_pubkey.o: ../cryptlib.h asn1_locl.h x_pubkey.c
852x_req.o: ../../e_os.h ../../include/openssl/asn1.h
853x_req.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
854x_req.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
855x_req.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
856x_req.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
857x_req.o: ../../include/openssl/err.h ../../include/openssl/evp.h
858x_req.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
859x_req.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
860x_req.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
861x_req.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
862x_req.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
863x_req.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
864x_req.o: ../../include/openssl/x509_vfy.h ../cryptlib.h x_req.c
865x_sig.o: ../../e_os.h ../../include/openssl/asn1.h
866x_sig.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
867x_sig.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
868x_sig.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
869x_sig.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
870x_sig.o: ../../include/openssl/err.h ../../include/openssl/evp.h
871x_sig.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
872x_sig.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
873x_sig.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
874x_sig.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
875x_sig.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
876x_sig.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
877x_sig.o: ../../include/openssl/x509_vfy.h ../cryptlib.h x_sig.c
878x_spki.o: ../../e_os.h ../../include/openssl/asn1.h
879x_spki.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
880x_spki.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
881x_spki.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
882x_spki.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
883x_spki.o: ../../include/openssl/err.h ../../include/openssl/evp.h
884x_spki.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
885x_spki.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
886x_spki.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
887x_spki.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
888x_spki.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
889x_spki.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
890x_spki.o: ../../include/openssl/x509_vfy.h ../cryptlib.h x_spki.c
891x_val.o: ../../e_os.h ../../include/openssl/asn1.h
892x_val.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
893x_val.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
894x_val.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
895x_val.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
896x_val.o: ../../include/openssl/err.h ../../include/openssl/evp.h
897x_val.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
898x_val.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
899x_val.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
900x_val.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
901x_val.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
902x_val.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
903x_val.o: ../../include/openssl/x509_vfy.h ../cryptlib.h x_val.c
904x_x509.o: ../../e_os.h ../../include/openssl/asn1.h
905x_x509.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
906x_x509.o: ../../include/openssl/buffer.h ../../include/openssl/conf.h
907x_x509.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
908x_x509.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
909x_x509.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h
910x_x509.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h
911x_x509.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
912x_x509.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
913x_x509.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
914x_x509.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
915x_x509.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
916x_x509.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
917x_x509.o: ../../include/openssl/x509v3.h ../cryptlib.h x_x509.c
918x_x509a.o: ../../e_os.h ../../include/openssl/asn1.h
919x_x509a.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
920x_x509a.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
921x_x509a.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
922x_x509a.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
923x_x509a.o: ../../include/openssl/err.h ../../include/openssl/evp.h
924x_x509a.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
925x_x509a.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
926x_x509a.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
927x_x509a.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
928x_x509a.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
929x_x509a.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
930x_x509a.o: ../../include/openssl/x509_vfy.h ../cryptlib.h x_x509a.c
diff --git a/src/lib/libcrypto/asn1/a_digest.c b/src/lib/libcrypto/asn1/a_digest.c
index cbdeea6ac0..d00d9e22b1 100644
--- a/src/lib/libcrypto/asn1/a_digest.c
+++ b/src/lib/libcrypto/asn1/a_digest.c
@@ -87,8 +87,7 @@ int ASN1_digest(i2d_of_void *i2d, const EVP_MD *type, char *data,
87 p=str; 87 p=str;
88 i2d(data,&p); 88 i2d(data,&p);
89 89
90 if (!EVP_Digest(str, i, md, len, type, NULL)) 90 EVP_Digest(str, i, md, len, type, NULL);
91 return 0;
92 OPENSSL_free(str); 91 OPENSSL_free(str);
93 return(1); 92 return(1);
94 } 93 }
@@ -105,8 +104,7 @@ int ASN1_item_digest(const ASN1_ITEM *it, const EVP_MD *type, void *asn,
105 i=ASN1_item_i2d(asn,&str, it); 104 i=ASN1_item_i2d(asn,&str, it);
106 if (!str) return(0); 105 if (!str) return(0);
107 106
108 if (!EVP_Digest(str, i, md, len, type, NULL)) 107 EVP_Digest(str, i, md, len, type, NULL);
109 return 0;
110 OPENSSL_free(str); 108 OPENSSL_free(str);
111 return(1); 109 return(1);
112 } 110 }
diff --git a/src/lib/libcrypto/asn1/a_gentm.c b/src/lib/libcrypto/asn1/a_gentm.c
new file mode 100644
index 0000000000..c79c6f538c
--- /dev/null
+++ b/src/lib/libcrypto/asn1/a_gentm.c
@@ -0,0 +1,263 @@
1/* crypto/asn1/a_gentm.c */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved.
4 *
5 * This package is an SSL implementation written
6 * by Eric Young (eay@cryptsoft.com).
7 * The implementation was written so as to conform with Netscapes SSL.
8 *
9 * This library is free for commercial and non-commercial use as long as
10 * the following conditions are aheared to. The following conditions
11 * apply to all code found in this distribution, be it the RC4, RSA,
12 * lhash, DES, etc., code; not just the SSL code. The SSL documentation
13 * included with this distribution is covered by the same copyright terms
14 * except that the holder is Tim Hudson (tjh@cryptsoft.com).
15 *
16 * Copyright remains Eric Young's, and as such any Copyright notices in
17 * the code are not to be removed.
18 * If this package is used in a product, Eric Young should be given attribution
19 * as the author of the parts of the library used.
20 * This can be in the form of a textual message at program startup or
21 * in documentation (online or textual) provided with the package.
22 *
23 * Redistribution and use in source and binary forms, with or without
24 * modification, are permitted provided that the following conditions
25 * are met:
26 * 1. Redistributions of source code must retain the copyright
27 * notice, this list of conditions and the following disclaimer.
28 * 2. Redistributions in binary form must reproduce the above copyright
29 * notice, this list of conditions and the following disclaimer in the
30 * documentation and/or other materials provided with the distribution.
31 * 3. All advertising materials mentioning features or use of this software
32 * must display the following acknowledgement:
33 * "This product includes cryptographic software written by
34 * Eric Young (eay@cryptsoft.com)"
35 * The word 'cryptographic' can be left out if the rouines from the library
36 * being used are not cryptographic related :-).
37 * 4. If you include any Windows specific code (or a derivative thereof) from
38 * the apps directory (application code) you must include an acknowledgement:
39 * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
40 *
41 * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
42 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
43 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
44 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
45 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
46 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
47 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
48 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
49 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
50 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
51 * SUCH DAMAGE.
52 *
53 * The licence and distribution terms for any publically available version or
54 * derivative of this code cannot be changed. i.e. this code cannot simply be
55 * copied and put under another distribution licence
56 * [including the GNU Public Licence.]
57 */
58
59/* GENERALIZEDTIME implementation, written by Steve Henson. Based on UTCTIME */
60
61#include <stdio.h>
62#include <time.h>
63#include "cryptlib.h"
64#include "o_time.h"
65#include <openssl/asn1.h>
66
67#if 0
68
69int i2d_ASN1_GENERALIZEDTIME(ASN1_GENERALIZEDTIME *a, unsigned char **pp)
70 {
71#ifdef CHARSET_EBCDIC
72 /* KLUDGE! We convert to ascii before writing DER */
73 int len;
74 char tmp[24];
75 ASN1_STRING tmpstr = *(ASN1_STRING *)a;
76
77 len = tmpstr.length;
78 ebcdic2ascii(tmp, tmpstr.data, (len >= sizeof tmp) ? sizeof tmp : len);
79 tmpstr.data = tmp;
80
81 a = (ASN1_GENERALIZEDTIME *) &tmpstr;
82#endif
83 return(i2d_ASN1_bytes((ASN1_STRING *)a,pp,
84 V_ASN1_GENERALIZEDTIME,V_ASN1_UNIVERSAL));
85 }
86
87
88ASN1_GENERALIZEDTIME *d2i_ASN1_GENERALIZEDTIME(ASN1_GENERALIZEDTIME **a,
89 unsigned char **pp, long length)
90 {
91 ASN1_GENERALIZEDTIME *ret=NULL;
92
93 ret=(ASN1_GENERALIZEDTIME *)d2i_ASN1_bytes((ASN1_STRING **)a,pp,length,
94 V_ASN1_GENERALIZEDTIME,V_ASN1_UNIVERSAL);
95 if (ret == NULL)
96 {
97 ASN1err(ASN1_F_D2I_ASN1_GENERALIZEDTIME,ERR_R_NESTED_ASN1_ERROR);
98 return(NULL);
99 }
100#ifdef CHARSET_EBCDIC
101 ascii2ebcdic(ret->data, ret->data, ret->length);
102#endif
103 if (!ASN1_GENERALIZEDTIME_check(ret))
104 {
105 ASN1err(ASN1_F_D2I_ASN1_GENERALIZEDTIME,ASN1_R_INVALID_TIME_FORMAT);
106 goto err;
107 }
108
109 return(ret);
110err:
111 if ((ret != NULL) && ((a == NULL) || (*a != ret)))
112 M_ASN1_GENERALIZEDTIME_free(ret);
113 return(NULL);
114 }
115
116#endif
117
118int ASN1_GENERALIZEDTIME_check(ASN1_GENERALIZEDTIME *d)
119 {
120 static const int min[9]={ 0, 0, 1, 1, 0, 0, 0, 0, 0};
121 static const int max[9]={99, 99,12,31,23,59,59,12,59};
122 char *a;
123 int n,i,l,o;
124
125 if (d->type != V_ASN1_GENERALIZEDTIME) return(0);
126 l=d->length;
127 a=(char *)d->data;
128 o=0;
129 /* GENERALIZEDTIME is similar to UTCTIME except the year is
130 * represented as YYYY. This stuff treats everything as a two digit
131 * field so make first two fields 00 to 99
132 */
133 if (l < 13) goto err;
134 for (i=0; i<7; i++)
135 {
136 if ((i == 6) && ((a[o] == 'Z') ||
137 (a[o] == '+') || (a[o] == '-')))
138 { i++; break; }
139 if ((a[o] < '0') || (a[o] > '9')) goto err;
140 n= a[o]-'0';
141 if (++o > l) goto err;
142
143 if ((a[o] < '0') || (a[o] > '9')) goto err;
144 n=(n*10)+ a[o]-'0';
145 if (++o > l) goto err;
146
147 if ((n < min[i]) || (n > max[i])) goto err;
148 }
149 /* Optional fractional seconds: decimal point followed by one
150 * or more digits.
151 */
152 if (a[o] == '.')
153 {
154 if (++o > l) goto err;
155 i = o;
156 while ((a[o] >= '0') && (a[o] <= '9') && (o <= l))
157 o++;
158 /* Must have at least one digit after decimal point */
159 if (i == o) goto err;
160 }
161
162 if (a[o] == 'Z')
163 o++;
164 else if ((a[o] == '+') || (a[o] == '-'))
165 {
166 o++;
167 if (o+4 > l) goto err;
168 for (i=7; i<9; i++)
169 {
170 if ((a[o] < '0') || (a[o] > '9')) goto err;
171 n= a[o]-'0';
172 o++;
173 if ((a[o] < '0') || (a[o] > '9')) goto err;
174 n=(n*10)+ a[o]-'0';
175 if ((n < min[i]) || (n > max[i])) goto err;
176 o++;
177 }
178 }
179 else
180 {
181 /* Missing time zone information. */
182 goto err;
183 }
184 return(o == l);
185err:
186 return(0);
187 }
188
189int ASN1_GENERALIZEDTIME_set_string(ASN1_GENERALIZEDTIME *s, const char *str)
190 {
191 ASN1_GENERALIZEDTIME t;
192
193 t.type=V_ASN1_GENERALIZEDTIME;
194 t.length=strlen(str);
195 t.data=(unsigned char *)str;
196 if (ASN1_GENERALIZEDTIME_check(&t))
197 {
198 if (s != NULL)
199 {
200 if (!ASN1_STRING_set((ASN1_STRING *)s,
201 (unsigned char *)str,t.length))
202 return 0;
203 s->type=V_ASN1_GENERALIZEDTIME;
204 }
205 return(1);
206 }
207 else
208 return(0);
209 }
210
211ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_set(ASN1_GENERALIZEDTIME *s,
212 time_t t)
213 {
214 return ASN1_GENERALIZEDTIME_adj(s, t, 0, 0);
215 }
216
217ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_adj(ASN1_GENERALIZEDTIME *s,
218 time_t t, int offset_day, long offset_sec)
219 {
220 char *p;
221 struct tm *ts;
222 struct tm data;
223 size_t len = 20;
224
225 if (s == NULL)
226 s=M_ASN1_GENERALIZEDTIME_new();
227 if (s == NULL)
228 return(NULL);
229
230 ts=OPENSSL_gmtime(&t, &data);
231 if (ts == NULL)
232 return(NULL);
233
234 if (offset_day || offset_sec)
235 {
236 if (!OPENSSL_gmtime_adj(ts, offset_day, offset_sec))
237 return NULL;
238 }
239
240 p=(char *)s->data;
241 if ((p == NULL) || ((size_t)s->length < len))
242 {
243 p=OPENSSL_malloc(len);
244 if (p == NULL)
245 {
246 ASN1err(ASN1_F_ASN1_GENERALIZEDTIME_ADJ,
247 ERR_R_MALLOC_FAILURE);
248 return(NULL);
249 }
250 if (s->data != NULL)
251 OPENSSL_free(s->data);
252 s->data=(unsigned char *)p;
253 }
254
255 BIO_snprintf(p,len,"%04d%02d%02d%02d%02d%02dZ",ts->tm_year + 1900,
256 ts->tm_mon+1,ts->tm_mday,ts->tm_hour,ts->tm_min,ts->tm_sec);
257 s->length=strlen(p);
258 s->type=V_ASN1_GENERALIZEDTIME;
259#ifdef CHARSET_EBCDIC_not
260 ebcdic2ascii(s->data, s->data, s->length);
261#endif
262 return(s);
263 }
diff --git a/src/lib/libcrypto/asn1/a_int.c b/src/lib/libcrypto/asn1/a_int.c
index ad0d2506f6..3348b8762c 100644
--- a/src/lib/libcrypto/asn1/a_int.c
+++ b/src/lib/libcrypto/asn1/a_int.c
@@ -386,8 +386,8 @@ long ASN1_INTEGER_get(const ASN1_INTEGER *a)
386 386
387 if (a->length > (int)sizeof(long)) 387 if (a->length > (int)sizeof(long))
388 { 388 {
389 /* hmm... a bit ugly, return all ones */ 389 /* hmm... a bit ugly */
390 return -1; 390 return(0xffffffffL);
391 } 391 }
392 if (a->data == NULL) 392 if (a->data == NULL)
393 return 0; 393 return 0;
diff --git a/src/lib/libcrypto/asn1/a_sign.c b/src/lib/libcrypto/asn1/a_sign.c
index 7b4a193d6b..ff63bfc7be 100644
--- a/src/lib/libcrypto/asn1/a_sign.c
+++ b/src/lib/libcrypto/asn1/a_sign.c
@@ -184,9 +184,9 @@ int ASN1_sign(i2d_of_void *i2d, X509_ALGOR *algor1, X509_ALGOR *algor2,
184 p=buf_in; 184 p=buf_in;
185 185
186 i2d(data,&p); 186 i2d(data,&p);
187 if (!EVP_SignInit_ex(&ctx,type, NULL) 187 EVP_SignInit_ex(&ctx,type, NULL);
188 || !EVP_SignUpdate(&ctx,(unsigned char *)buf_in,inl) 188 EVP_SignUpdate(&ctx,(unsigned char *)buf_in,inl);
189 || !EVP_SignFinal(&ctx,(unsigned char *)buf_out, 189 if (!EVP_SignFinal(&ctx,(unsigned char *)buf_out,
190 (unsigned int *)&outl,pkey)) 190 (unsigned int *)&outl,pkey))
191 { 191 {
192 outl=0; 192 outl=0;
@@ -218,100 +218,65 @@ int ASN1_item_sign(const ASN1_ITEM *it, X509_ALGOR *algor1, X509_ALGOR *algor2,
218 const EVP_MD *type) 218 const EVP_MD *type)
219 { 219 {
220 EVP_MD_CTX ctx; 220 EVP_MD_CTX ctx;
221 EVP_MD_CTX_init(&ctx);
222 if (!EVP_DigestSignInit(&ctx, NULL, type, NULL, pkey))
223 {
224 EVP_MD_CTX_cleanup(&ctx);
225 return 0;
226 }
227 return ASN1_item_sign_ctx(it, algor1, algor2, signature, asn, &ctx);
228 }
229
230
231int ASN1_item_sign_ctx(const ASN1_ITEM *it,
232 X509_ALGOR *algor1, X509_ALGOR *algor2,
233 ASN1_BIT_STRING *signature, void *asn, EVP_MD_CTX *ctx)
234 {
235 const EVP_MD *type;
236 EVP_PKEY *pkey;
237 unsigned char *buf_in=NULL,*buf_out=NULL; 221 unsigned char *buf_in=NULL,*buf_out=NULL;
238 size_t inl=0,outl=0,outll=0; 222 int inl=0,outl=0,outll=0;
239 int signid, paramtype; 223 int signid, paramtype;
240 int rv;
241
242 type = EVP_MD_CTX_md(ctx);
243 pkey = EVP_PKEY_CTX_get0_pkey(ctx->pctx);
244 224
245 if (!type || !pkey) 225 if (type == NULL)
246 { 226 {
247 ASN1err(ASN1_F_ASN1_ITEM_SIGN_CTX, ASN1_R_CONTEXT_NOT_INITIALISED); 227 int def_nid;
248 return 0; 228 if (EVP_PKEY_get_default_digest_nid(pkey, &def_nid) > 0)
229 type = EVP_get_digestbynid(def_nid);
249 } 230 }
250 231
251 if (pkey->ameth->item_sign) 232 if (type == NULL)
252 { 233 {
253 rv = pkey->ameth->item_sign(ctx, it, asn, algor1, algor2, 234 ASN1err(ASN1_F_ASN1_ITEM_SIGN, ASN1_R_NO_DEFAULT_DIGEST);
254 signature); 235 return 0;
255 if (rv == 1)
256 outl = signature->length;
257 /* Return value meanings:
258 * <=0: error.
259 * 1: method does everything.
260 * 2: carry on as normal.
261 * 3: ASN1 method sets algorithm identifiers: just sign.
262 */
263 if (rv <= 0)
264 ASN1err(ASN1_F_ASN1_ITEM_SIGN_CTX, ERR_R_EVP_LIB);
265 if (rv <= 1)
266 goto err;
267 } 236 }
268 else
269 rv = 2;
270 237
271 if (rv == 2) 238 if (type->flags & EVP_MD_FLAG_PKEY_METHOD_SIGNATURE)
272 { 239 {
273 if (type->flags & EVP_MD_FLAG_PKEY_METHOD_SIGNATURE) 240 if (!pkey->ameth ||
241 !OBJ_find_sigid_by_algs(&signid, EVP_MD_nid(type),
242 pkey->ameth->pkey_id))
274 { 243 {
275 if (!pkey->ameth || 244 ASN1err(ASN1_F_ASN1_ITEM_SIGN,
276 !OBJ_find_sigid_by_algs(&signid, 245 ASN1_R_DIGEST_AND_KEY_TYPE_NOT_SUPPORTED);
277 EVP_MD_nid(type), 246 return 0;
278 pkey->ameth->pkey_id))
279 {
280 ASN1err(ASN1_F_ASN1_ITEM_SIGN_CTX,
281 ASN1_R_DIGEST_AND_KEY_TYPE_NOT_SUPPORTED);
282 return 0;
283 }
284 } 247 }
285 else 248 }
286 signid = type->pkey_type; 249 else
250 signid = type->pkey_type;
287 251
288 if (pkey->ameth->pkey_flags & ASN1_PKEY_SIGPARAM_NULL) 252 if (pkey->ameth->pkey_flags & ASN1_PKEY_SIGPARAM_NULL)
289 paramtype = V_ASN1_NULL; 253 paramtype = V_ASN1_NULL;
290 else 254 else
291 paramtype = V_ASN1_UNDEF; 255 paramtype = V_ASN1_UNDEF;
292 256
293 if (algor1) 257 if (algor1)
294 X509_ALGOR_set0(algor1, OBJ_nid2obj(signid), paramtype, NULL); 258 X509_ALGOR_set0(algor1, OBJ_nid2obj(signid), paramtype, NULL);
295 if (algor2) 259 if (algor2)
296 X509_ALGOR_set0(algor2, OBJ_nid2obj(signid), paramtype, NULL); 260 X509_ALGOR_set0(algor2, OBJ_nid2obj(signid), paramtype, NULL);
297
298 }
299 261
262 EVP_MD_CTX_init(&ctx);
300 inl=ASN1_item_i2d(asn,&buf_in, it); 263 inl=ASN1_item_i2d(asn,&buf_in, it);
301 outll=outl=EVP_PKEY_size(pkey); 264 outll=outl=EVP_PKEY_size(pkey);
302 buf_out=OPENSSL_malloc((unsigned int)outl); 265 buf_out=(unsigned char *)OPENSSL_malloc((unsigned int)outl);
303 if ((buf_in == NULL) || (buf_out == NULL)) 266 if ((buf_in == NULL) || (buf_out == NULL))
304 { 267 {
305 outl=0; 268 outl=0;
306 ASN1err(ASN1_F_ASN1_ITEM_SIGN_CTX,ERR_R_MALLOC_FAILURE); 269 ASN1err(ASN1_F_ASN1_ITEM_SIGN,ERR_R_MALLOC_FAILURE);
307 goto err; 270 goto err;
308 } 271 }
309 272
310 if (!EVP_DigestSignUpdate(ctx, buf_in, inl) 273 EVP_SignInit_ex(&ctx,type, NULL);
311 || !EVP_DigestSignFinal(ctx, buf_out, &outl)) 274 EVP_SignUpdate(&ctx,(unsigned char *)buf_in,inl);
275 if (!EVP_SignFinal(&ctx,(unsigned char *)buf_out,
276 (unsigned int *)&outl,pkey))
312 { 277 {
313 outl=0; 278 outl=0;
314 ASN1err(ASN1_F_ASN1_ITEM_SIGN_CTX,ERR_R_EVP_LIB); 279 ASN1err(ASN1_F_ASN1_ITEM_SIGN,ERR_R_EVP_LIB);
315 goto err; 280 goto err;
316 } 281 }
317 if (signature->data != NULL) OPENSSL_free(signature->data); 282 if (signature->data != NULL) OPENSSL_free(signature->data);
@@ -324,7 +289,7 @@ int ASN1_item_sign_ctx(const ASN1_ITEM *it,
324 signature->flags&= ~(ASN1_STRING_FLAG_BITS_LEFT|0x07); 289 signature->flags&= ~(ASN1_STRING_FLAG_BITS_LEFT|0x07);
325 signature->flags|=ASN1_STRING_FLAG_BITS_LEFT; 290 signature->flags|=ASN1_STRING_FLAG_BITS_LEFT;
326err: 291err:
327 EVP_MD_CTX_cleanup(ctx); 292 EVP_MD_CTX_cleanup(&ctx);
328 if (buf_in != NULL) 293 if (buf_in != NULL)
329 { OPENSSL_cleanse((char *)buf_in,(unsigned int)inl); OPENSSL_free(buf_in); } 294 { OPENSSL_cleanse((char *)buf_in,(unsigned int)inl); OPENSSL_free(buf_in); }
330 if (buf_out != NULL) 295 if (buf_out != NULL)
diff --git a/src/lib/libcrypto/asn1/a_utctm.c b/src/lib/libcrypto/asn1/a_utctm.c
new file mode 100644
index 0000000000..072e236592
--- /dev/null
+++ b/src/lib/libcrypto/asn1/a_utctm.c
@@ -0,0 +1,318 @@
1/* crypto/asn1/a_utctm.c */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved.
4 *
5 * This package is an SSL implementation written
6 * by Eric Young (eay@cryptsoft.com).
7 * The implementation was written so as to conform with Netscapes SSL.
8 *
9 * This library is free for commercial and non-commercial use as long as
10 * the following conditions are aheared to. The following conditions
11 * apply to all code found in this distribution, be it the RC4, RSA,
12 * lhash, DES, etc., code; not just the SSL code. The SSL documentation
13 * included with this distribution is covered by the same copyright terms
14 * except that the holder is Tim Hudson (tjh@cryptsoft.com).
15 *
16 * Copyright remains Eric Young's, and as such any Copyright notices in
17 * the code are not to be removed.
18 * If this package is used in a product, Eric Young should be given attribution
19 * as the author of the parts of the library used.
20 * This can be in the form of a textual message at program startup or
21 * in documentation (online or textual) provided with the package.
22 *
23 * Redistribution and use in source and binary forms, with or without
24 * modification, are permitted provided that the following conditions
25 * are met:
26 * 1. Redistributions of source code must retain the copyright
27 * notice, this list of conditions and the following disclaimer.
28 * 2. Redistributions in binary form must reproduce the above copyright
29 * notice, this list of conditions and the following disclaimer in the
30 * documentation and/or other materials provided with the distribution.
31 * 3. All advertising materials mentioning features or use of this software
32 * must display the following acknowledgement:
33 * "This product includes cryptographic software written by
34 * Eric Young (eay@cryptsoft.com)"
35 * The word 'cryptographic' can be left out if the rouines from the library
36 * being used are not cryptographic related :-).
37 * 4. If you include any Windows specific code (or a derivative thereof) from
38 * the apps directory (application code) you must include an acknowledgement:
39 * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
40 *
41 * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
42 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
43 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
44 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
45 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
46 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
47 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
48 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
49 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
50 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
51 * SUCH DAMAGE.
52 *
53 * The licence and distribution terms for any publically available version or
54 * derivative of this code cannot be changed. i.e. this code cannot simply be
55 * copied and put under another distribution licence
56 * [including the GNU Public Licence.]
57 */
58
59#include <stdio.h>
60#include <time.h>
61#include "cryptlib.h"
62#include "o_time.h"
63#include <openssl/asn1.h>
64
65#if 0
66int i2d_ASN1_UTCTIME(ASN1_UTCTIME *a, unsigned char **pp)
67 {
68#ifndef CHARSET_EBCDIC
69 return(i2d_ASN1_bytes((ASN1_STRING *)a,pp,
70 V_ASN1_UTCTIME,V_ASN1_UNIVERSAL));
71#else
72 /* KLUDGE! We convert to ascii before writing DER */
73 int len;
74 char tmp[24];
75 ASN1_STRING x = *(ASN1_STRING *)a;
76
77 len = x.length;
78 ebcdic2ascii(tmp, x.data, (len >= sizeof tmp) ? sizeof tmp : len);
79 x.data = tmp;
80 return i2d_ASN1_bytes(&x, pp, V_ASN1_UTCTIME,V_ASN1_UNIVERSAL);
81#endif
82 }
83
84
85ASN1_UTCTIME *d2i_ASN1_UTCTIME(ASN1_UTCTIME **a, unsigned char **pp,
86 long length)
87 {
88 ASN1_UTCTIME *ret=NULL;
89
90 ret=(ASN1_UTCTIME *)d2i_ASN1_bytes((ASN1_STRING **)a,pp,length,
91 V_ASN1_UTCTIME,V_ASN1_UNIVERSAL);
92 if (ret == NULL)
93 {
94 ASN1err(ASN1_F_D2I_ASN1_UTCTIME,ERR_R_NESTED_ASN1_ERROR);
95 return(NULL);
96 }
97#ifdef CHARSET_EBCDIC
98 ascii2ebcdic(ret->data, ret->data, ret->length);
99#endif
100 if (!ASN1_UTCTIME_check(ret))
101 {
102 ASN1err(ASN1_F_D2I_ASN1_UTCTIME,ASN1_R_INVALID_TIME_FORMAT);
103 goto err;
104 }
105
106 return(ret);
107err:
108 if ((ret != NULL) && ((a == NULL) || (*a != ret)))
109 M_ASN1_UTCTIME_free(ret);
110 return(NULL);
111 }
112
113#endif
114
115int ASN1_UTCTIME_check(ASN1_UTCTIME *d)
116 {
117 static const int min[8]={ 0, 1, 1, 0, 0, 0, 0, 0};
118 static const int max[8]={99,12,31,23,59,59,12,59};
119 char *a;
120 int n,i,l,o;
121
122 if (d->type != V_ASN1_UTCTIME) return(0);
123 l=d->length;
124 a=(char *)d->data;
125 o=0;
126
127 if (l < 11) goto err;
128 for (i=0; i<6; i++)
129 {
130 if ((i == 5) && ((a[o] == 'Z') ||
131 (a[o] == '+') || (a[o] == '-')))
132 { i++; break; }
133 if ((a[o] < '0') || (a[o] > '9')) goto err;
134 n= a[o]-'0';
135 if (++o > l) goto err;
136
137 if ((a[o] < '0') || (a[o] > '9')) goto err;
138 n=(n*10)+ a[o]-'0';
139 if (++o > l) goto err;
140
141 if ((n < min[i]) || (n > max[i])) goto err;
142 }
143 if (a[o] == 'Z')
144 o++;
145 else if ((a[o] == '+') || (a[o] == '-'))
146 {
147 o++;
148 if (o+4 > l) goto err;
149 for (i=6; i<8; i++)
150 {
151 if ((a[o] < '0') || (a[o] > '9')) goto err;
152 n= a[o]-'0';
153 o++;
154 if ((a[o] < '0') || (a[o] > '9')) goto err;
155 n=(n*10)+ a[o]-'0';
156 if ((n < min[i]) || (n > max[i])) goto err;
157 o++;
158 }
159 }
160 return(o == l);
161err:
162 return(0);
163 }
164
165int ASN1_UTCTIME_set_string(ASN1_UTCTIME *s, const char *str)
166 {
167 ASN1_UTCTIME t;
168
169 t.type=V_ASN1_UTCTIME;
170 t.length=strlen(str);
171 t.data=(unsigned char *)str;
172 if (ASN1_UTCTIME_check(&t))
173 {
174 if (s != NULL)
175 {
176 if (!ASN1_STRING_set((ASN1_STRING *)s,
177 (unsigned char *)str,t.length))
178 return 0;
179 s->type = V_ASN1_UTCTIME;
180 }
181 return(1);
182 }
183 else
184 return(0);
185 }
186
187ASN1_UTCTIME *ASN1_UTCTIME_set(ASN1_UTCTIME *s, time_t t)
188 {
189 return ASN1_UTCTIME_adj(s, t, 0, 0);
190 }
191
192ASN1_UTCTIME *ASN1_UTCTIME_adj(ASN1_UTCTIME *s, time_t t,
193 int offset_day, long offset_sec)
194 {
195 char *p;
196 struct tm *ts;
197 struct tm data;
198 size_t len = 20;
199
200 if (s == NULL)
201 s=M_ASN1_UTCTIME_new();
202 if (s == NULL)
203 return(NULL);
204
205 ts=OPENSSL_gmtime(&t, &data);
206 if (ts == NULL)
207 return(NULL);
208
209 if (offset_day || offset_sec)
210 {
211 if (!OPENSSL_gmtime_adj(ts, offset_day, offset_sec))
212 return NULL;
213 }
214
215 if((ts->tm_year < 50) || (ts->tm_year >= 150))
216 return NULL;
217
218 p=(char *)s->data;
219 if ((p == NULL) || ((size_t)s->length < len))
220 {
221 p=OPENSSL_malloc(len);
222 if (p == NULL)
223 {
224 ASN1err(ASN1_F_ASN1_UTCTIME_ADJ,ERR_R_MALLOC_FAILURE);
225 return(NULL);
226 }
227 if (s->data != NULL)
228 OPENSSL_free(s->data);
229 s->data=(unsigned char *)p;
230 }
231
232 BIO_snprintf(p,len,"%02d%02d%02d%02d%02d%02dZ",ts->tm_year%100,
233 ts->tm_mon+1,ts->tm_mday,ts->tm_hour,ts->tm_min,ts->tm_sec);
234 s->length=strlen(p);
235 s->type=V_ASN1_UTCTIME;
236#ifdef CHARSET_EBCDIC_not
237 ebcdic2ascii(s->data, s->data, s->length);
238#endif
239 return(s);
240 }
241
242
243int ASN1_UTCTIME_cmp_time_t(const ASN1_UTCTIME *s, time_t t)
244 {
245 struct tm *tm;
246 struct tm data;
247 int offset;
248 int year;
249
250#define g2(p) (((p)[0]-'0')*10+(p)[1]-'0')
251
252 if (s->data[12] == 'Z')
253 offset=0;
254 else
255 {
256 offset = g2(s->data+13)*60+g2(s->data+15);
257 if (s->data[12] == '-')
258 offset = -offset;
259 }
260
261 t -= offset*60; /* FIXME: may overflow in extreme cases */
262
263 tm = OPENSSL_gmtime(&t, &data);
264
265#define return_cmp(a,b) if ((a)<(b)) return -1; else if ((a)>(b)) return 1
266 year = g2(s->data);
267 if (year < 50)
268 year += 100;
269 return_cmp(year, tm->tm_year);
270 return_cmp(g2(s->data+2) - 1, tm->tm_mon);
271 return_cmp(g2(s->data+4), tm->tm_mday);
272 return_cmp(g2(s->data+6), tm->tm_hour);
273 return_cmp(g2(s->data+8), tm->tm_min);
274 return_cmp(g2(s->data+10), tm->tm_sec);
275#undef g2
276#undef return_cmp
277
278 return 0;
279 }
280
281
282#if 0
283time_t ASN1_UTCTIME_get(const ASN1_UTCTIME *s)
284 {
285 struct tm tm;
286 int offset;
287
288 memset(&tm,'\0',sizeof tm);
289
290#define g2(p) (((p)[0]-'0')*10+(p)[1]-'0')
291 tm.tm_year=g2(s->data);
292 if(tm.tm_year < 50)
293 tm.tm_year+=100;
294 tm.tm_mon=g2(s->data+2)-1;
295 tm.tm_mday=g2(s->data+4);
296 tm.tm_hour=g2(s->data+6);
297 tm.tm_min=g2(s->data+8);
298 tm.tm_sec=g2(s->data+10);
299 if(s->data[12] == 'Z')
300 offset=0;
301 else
302 {
303 offset=g2(s->data+13)*60+g2(s->data+15);
304 if(s->data[12] == '-')
305 offset= -offset;
306 }
307#undef g2
308
309 return mktime(&tm)-offset*60; /* FIXME: mktime assumes the current timezone
310 * instead of UTC, and unless we rewrite OpenSSL
311 * in Lisp we cannot locally change the timezone
312 * without possibly interfering with other parts
313 * of the program. timegm, which uses UTC, is
314 * non-standard.
315 * Also time_t is inappropriate for general
316 * UTC times because it may a 32 bit type. */
317 }
318#endif
diff --git a/src/lib/libcrypto/asn1/a_verify.c b/src/lib/libcrypto/asn1/a_verify.c
index 432722e409..cecdb13c70 100644
--- a/src/lib/libcrypto/asn1/a_verify.c
+++ b/src/lib/libcrypto/asn1/a_verify.c
@@ -101,13 +101,8 @@ int ASN1_verify(i2d_of_void *i2d, X509_ALGOR *a, ASN1_BIT_STRING *signature,
101 p=buf_in; 101 p=buf_in;
102 102
103 i2d(data,&p); 103 i2d(data,&p);
104 if (!EVP_VerifyInit_ex(&ctx,type, NULL) 104 EVP_VerifyInit_ex(&ctx,type, NULL);
105 || !EVP_VerifyUpdate(&ctx,(unsigned char *)buf_in,inl)) 105 EVP_VerifyUpdate(&ctx,(unsigned char *)buf_in,inl);
106 {
107 ASN1err(ASN1_F_ASN1_VERIFY,ERR_R_EVP_LIB);
108 ret=0;
109 goto err;
110 }
111 106
112 OPENSSL_cleanse(buf_in,(unsigned int)inl); 107 OPENSSL_cleanse(buf_in,(unsigned int)inl);
113 OPENSSL_free(buf_in); 108 OPENSSL_free(buf_in);
@@ -131,10 +126,11 @@ err:
131#endif 126#endif
132 127
133 128
134int ASN1_item_verify(const ASN1_ITEM *it, X509_ALGOR *a, 129int ASN1_item_verify(const ASN1_ITEM *it, X509_ALGOR *a, ASN1_BIT_STRING *signature,
135 ASN1_BIT_STRING *signature, void *asn, EVP_PKEY *pkey) 130 void *asn, EVP_PKEY *pkey)
136 { 131 {
137 EVP_MD_CTX ctx; 132 EVP_MD_CTX ctx;
133 const EVP_MD *type = NULL;
138 unsigned char *buf_in=NULL; 134 unsigned char *buf_in=NULL;
139 int ret= -1,inl; 135 int ret= -1,inl;
140 136
@@ -148,47 +144,25 @@ int ASN1_item_verify(const ASN1_ITEM *it, X509_ALGOR *a,
148 ASN1err(ASN1_F_ASN1_ITEM_VERIFY,ASN1_R_UNKNOWN_SIGNATURE_ALGORITHM); 144 ASN1err(ASN1_F_ASN1_ITEM_VERIFY,ASN1_R_UNKNOWN_SIGNATURE_ALGORITHM);
149 goto err; 145 goto err;
150 } 146 }
151 if (mdnid == NID_undef) 147 type=EVP_get_digestbynid(mdnid);
148 if (type == NULL)
152 { 149 {
153 if (!pkey->ameth || !pkey->ameth->item_verify) 150 ASN1err(ASN1_F_ASN1_ITEM_VERIFY,ASN1_R_UNKNOWN_MESSAGE_DIGEST_ALGORITHM);
154 { 151 goto err;
155 ASN1err(ASN1_F_ASN1_ITEM_VERIFY,ASN1_R_UNKNOWN_SIGNATURE_ALGORITHM);
156 goto err;
157 }
158 ret = pkey->ameth->item_verify(&ctx, it, asn, a,
159 signature, pkey);
160 /* Return value of 2 means carry on, anything else means we
161 * exit straight away: either a fatal error of the underlying
162 * verification routine handles all verification.
163 */
164 if (ret != 2)
165 goto err;
166 ret = -1;
167 } 152 }
168 else 153
154 /* Check public key OID matches public key type */
155 if (EVP_PKEY_type(pknid) != pkey->ameth->pkey_id)
169 { 156 {
170 const EVP_MD *type; 157 ASN1err(ASN1_F_ASN1_ITEM_VERIFY,ASN1_R_WRONG_PUBLIC_KEY_TYPE);
171 type=EVP_get_digestbynid(mdnid); 158 goto err;
172 if (type == NULL) 159 }
173 {
174 ASN1err(ASN1_F_ASN1_ITEM_VERIFY,ASN1_R_UNKNOWN_MESSAGE_DIGEST_ALGORITHM);
175 goto err;
176 }
177
178 /* Check public key OID matches public key type */
179 if (EVP_PKEY_type(pknid) != pkey->ameth->pkey_id)
180 {
181 ASN1err(ASN1_F_ASN1_ITEM_VERIFY,ASN1_R_WRONG_PUBLIC_KEY_TYPE);
182 goto err;
183 }
184
185 if (!EVP_DigestVerifyInit(&ctx, NULL, type, NULL, pkey))
186 {
187 ASN1err(ASN1_F_ASN1_ITEM_VERIFY,ERR_R_EVP_LIB);
188 ret=0;
189 goto err;
190 }
191 160
161 if (!EVP_VerifyInit_ex(&ctx,type, NULL))
162 {
163 ASN1err(ASN1_F_ASN1_ITEM_VERIFY,ERR_R_EVP_LIB);
164 ret=0;
165 goto err;
192 } 166 }
193 167
194 inl = ASN1_item_i2d(asn, &buf_in, it); 168 inl = ASN1_item_i2d(asn, &buf_in, it);
@@ -199,18 +173,13 @@ int ASN1_item_verify(const ASN1_ITEM *it, X509_ALGOR *a,
199 goto err; 173 goto err;
200 } 174 }
201 175
202 if (!EVP_DigestVerifyUpdate(&ctx,buf_in,inl)) 176 EVP_VerifyUpdate(&ctx,(unsigned char *)buf_in,inl);
203 {
204 ASN1err(ASN1_F_ASN1_ITEM_VERIFY,ERR_R_EVP_LIB);
205 ret=0;
206 goto err;
207 }
208 177
209 OPENSSL_cleanse(buf_in,(unsigned int)inl); 178 OPENSSL_cleanse(buf_in,(unsigned int)inl);
210 OPENSSL_free(buf_in); 179 OPENSSL_free(buf_in);
211 180
212 if (EVP_DigestVerifyFinal(&ctx,signature->data, 181 if (EVP_VerifyFinal(&ctx,(unsigned char *)signature->data,
213 (size_t)signature->length) <= 0) 182 (unsigned int)signature->length,pkey) <= 0)
214 { 183 {
215 ASN1err(ASN1_F_ASN1_ITEM_VERIFY,ERR_R_EVP_LIB); 184 ASN1err(ASN1_F_ASN1_ITEM_VERIFY,ERR_R_EVP_LIB);
216 ret=0; 185 ret=0;
diff --git a/src/lib/libcrypto/asn1/asn1.h b/src/lib/libcrypto/asn1/asn1.h
index 220a0c8c63..59540e4e79 100644
--- a/src/lib/libcrypto/asn1/asn1.h
+++ b/src/lib/libcrypto/asn1/asn1.h
@@ -235,7 +235,7 @@ typedef struct asn1_object_st
235 */ 235 */
236#define ASN1_STRING_FLAG_MSTRING 0x040 236#define ASN1_STRING_FLAG_MSTRING 0x040
237/* This is the base type that holds just about everything :-) */ 237/* This is the base type that holds just about everything :-) */
238struct asn1_string_st 238typedef struct asn1_string_st
239 { 239 {
240 int length; 240 int length;
241 int type; 241 int type;
@@ -245,7 +245,7 @@ struct asn1_string_st
245 * input data has a non-zero 'unused bits' value, it will be 245 * input data has a non-zero 'unused bits' value, it will be
246 * handled correctly */ 246 * handled correctly */
247 long flags; 247 long flags;
248 }; 248 } ASN1_STRING;
249 249
250/* ASN1_ENCODING structure: this is used to save the received 250/* ASN1_ENCODING structure: this is used to save the received
251 * encoding of an ASN1 type. This is useful to get round 251 * encoding of an ASN1 type. This is useful to get round
@@ -293,6 +293,7 @@ DECLARE_STACK_OF(ASN1_STRING_TABLE)
293 * see asn1t.h 293 * see asn1t.h
294 */ 294 */
295typedef struct ASN1_TEMPLATE_st ASN1_TEMPLATE; 295typedef struct ASN1_TEMPLATE_st ASN1_TEMPLATE;
296typedef struct ASN1_ITEM_st ASN1_ITEM;
296typedef struct ASN1_TLC_st ASN1_TLC; 297typedef struct ASN1_TLC_st ASN1_TLC;
297/* This is just an opaque pointer */ 298/* This is just an opaque pointer */
298typedef struct ASN1_VALUE_st ASN1_VALUE; 299typedef struct ASN1_VALUE_st ASN1_VALUE;
@@ -1193,7 +1194,6 @@ void ERR_load_ASN1_strings(void);
1193#define ASN1_F_ASN1_ITEM_I2D_FP 193 1194#define ASN1_F_ASN1_ITEM_I2D_FP 193
1194#define ASN1_F_ASN1_ITEM_PACK 198 1195#define ASN1_F_ASN1_ITEM_PACK 198
1195#define ASN1_F_ASN1_ITEM_SIGN 195 1196#define ASN1_F_ASN1_ITEM_SIGN 195
1196#define ASN1_F_ASN1_ITEM_SIGN_CTX 220
1197#define ASN1_F_ASN1_ITEM_UNPACK 199 1197#define ASN1_F_ASN1_ITEM_UNPACK 199
1198#define ASN1_F_ASN1_ITEM_VERIFY 197 1198#define ASN1_F_ASN1_ITEM_VERIFY 197
1199#define ASN1_F_ASN1_MBSTRING_NCOPY 122 1199#define ASN1_F_ASN1_MBSTRING_NCOPY 122
@@ -1266,7 +1266,6 @@ void ERR_load_ASN1_strings(void);
1266#define ASN1_F_PKCS5_PBE2_SET_IV 167 1266#define ASN1_F_PKCS5_PBE2_SET_IV 167
1267#define ASN1_F_PKCS5_PBE_SET 202 1267#define ASN1_F_PKCS5_PBE_SET 202
1268#define ASN1_F_PKCS5_PBE_SET0_ALGOR 215 1268#define ASN1_F_PKCS5_PBE_SET0_ALGOR 215
1269#define ASN1_F_PKCS5_PBKDF2_SET 219
1270#define ASN1_F_SMIME_READ_ASN1 212 1269#define ASN1_F_SMIME_READ_ASN1 212
1271#define ASN1_F_SMIME_TEXT 213 1270#define ASN1_F_SMIME_TEXT 213
1272#define ASN1_F_X509_CINF_NEW 168 1271#define ASN1_F_X509_CINF_NEW 168
@@ -1292,7 +1291,6 @@ void ERR_load_ASN1_strings(void);
1292#define ASN1_R_BOOLEAN_IS_WRONG_LENGTH 106 1291#define ASN1_R_BOOLEAN_IS_WRONG_LENGTH 106
1293#define ASN1_R_BUFFER_TOO_SMALL 107 1292#define ASN1_R_BUFFER_TOO_SMALL 107
1294#define ASN1_R_CIPHER_HAS_NO_OBJECT_IDENTIFIER 108 1293#define ASN1_R_CIPHER_HAS_NO_OBJECT_IDENTIFIER 108
1295#define ASN1_R_CONTEXT_NOT_INITIALISED 217
1296#define ASN1_R_DATA_IS_WRONG 109 1294#define ASN1_R_DATA_IS_WRONG 109
1297#define ASN1_R_DECODE_ERROR 110 1295#define ASN1_R_DECODE_ERROR 110
1298#define ASN1_R_DECODING_ERROR 111 1296#define ASN1_R_DECODING_ERROR 111
diff --git a/src/lib/libcrypto/asn1/asn1_err.c b/src/lib/libcrypto/asn1/asn1_err.c
index 1a30bf119b..6e04d08f31 100644
--- a/src/lib/libcrypto/asn1/asn1_err.c
+++ b/src/lib/libcrypto/asn1/asn1_err.c
@@ -1,6 +1,6 @@
1/* crypto/asn1/asn1_err.c */ 1/* crypto/asn1/asn1_err.c */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2009 The OpenSSL Project. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
@@ -107,7 +107,6 @@ static ERR_STRING_DATA ASN1_str_functs[]=
107{ERR_FUNC(ASN1_F_ASN1_ITEM_I2D_FP), "ASN1_item_i2d_fp"}, 107{ERR_FUNC(ASN1_F_ASN1_ITEM_I2D_FP), "ASN1_item_i2d_fp"},
108{ERR_FUNC(ASN1_F_ASN1_ITEM_PACK), "ASN1_item_pack"}, 108{ERR_FUNC(ASN1_F_ASN1_ITEM_PACK), "ASN1_item_pack"},
109{ERR_FUNC(ASN1_F_ASN1_ITEM_SIGN), "ASN1_item_sign"}, 109{ERR_FUNC(ASN1_F_ASN1_ITEM_SIGN), "ASN1_item_sign"},
110{ERR_FUNC(ASN1_F_ASN1_ITEM_SIGN_CTX), "ASN1_item_sign_ctx"},
111{ERR_FUNC(ASN1_F_ASN1_ITEM_UNPACK), "ASN1_item_unpack"}, 110{ERR_FUNC(ASN1_F_ASN1_ITEM_UNPACK), "ASN1_item_unpack"},
112{ERR_FUNC(ASN1_F_ASN1_ITEM_VERIFY), "ASN1_item_verify"}, 111{ERR_FUNC(ASN1_F_ASN1_ITEM_VERIFY), "ASN1_item_verify"},
113{ERR_FUNC(ASN1_F_ASN1_MBSTRING_NCOPY), "ASN1_mbstring_ncopy"}, 112{ERR_FUNC(ASN1_F_ASN1_MBSTRING_NCOPY), "ASN1_mbstring_ncopy"},
@@ -180,7 +179,6 @@ static ERR_STRING_DATA ASN1_str_functs[]=
180{ERR_FUNC(ASN1_F_PKCS5_PBE2_SET_IV), "PKCS5_pbe2_set_iv"}, 179{ERR_FUNC(ASN1_F_PKCS5_PBE2_SET_IV), "PKCS5_pbe2_set_iv"},
181{ERR_FUNC(ASN1_F_PKCS5_PBE_SET), "PKCS5_pbe_set"}, 180{ERR_FUNC(ASN1_F_PKCS5_PBE_SET), "PKCS5_pbe_set"},
182{ERR_FUNC(ASN1_F_PKCS5_PBE_SET0_ALGOR), "PKCS5_pbe_set0_algor"}, 181{ERR_FUNC(ASN1_F_PKCS5_PBE_SET0_ALGOR), "PKCS5_pbe_set0_algor"},
183{ERR_FUNC(ASN1_F_PKCS5_PBKDF2_SET), "PKCS5_pbkdf2_set"},
184{ERR_FUNC(ASN1_F_SMIME_READ_ASN1), "SMIME_read_ASN1"}, 182{ERR_FUNC(ASN1_F_SMIME_READ_ASN1), "SMIME_read_ASN1"},
185{ERR_FUNC(ASN1_F_SMIME_TEXT), "SMIME_text"}, 183{ERR_FUNC(ASN1_F_SMIME_TEXT), "SMIME_text"},
186{ERR_FUNC(ASN1_F_X509_CINF_NEW), "X509_CINF_NEW"}, 184{ERR_FUNC(ASN1_F_X509_CINF_NEW), "X509_CINF_NEW"},
@@ -209,7 +207,6 @@ static ERR_STRING_DATA ASN1_str_reasons[]=
209{ERR_REASON(ASN1_R_BOOLEAN_IS_WRONG_LENGTH),"boolean is wrong length"}, 207{ERR_REASON(ASN1_R_BOOLEAN_IS_WRONG_LENGTH),"boolean is wrong length"},
210{ERR_REASON(ASN1_R_BUFFER_TOO_SMALL) ,"buffer too small"}, 208{ERR_REASON(ASN1_R_BUFFER_TOO_SMALL) ,"buffer too small"},
211{ERR_REASON(ASN1_R_CIPHER_HAS_NO_OBJECT_IDENTIFIER),"cipher has no object identifier"}, 209{ERR_REASON(ASN1_R_CIPHER_HAS_NO_OBJECT_IDENTIFIER),"cipher has no object identifier"},
212{ERR_REASON(ASN1_R_CONTEXT_NOT_INITIALISED),"context not initialised"},
213{ERR_REASON(ASN1_R_DATA_IS_WRONG) ,"data is wrong"}, 210{ERR_REASON(ASN1_R_DATA_IS_WRONG) ,"data is wrong"},
214{ERR_REASON(ASN1_R_DECODE_ERROR) ,"decode error"}, 211{ERR_REASON(ASN1_R_DECODE_ERROR) ,"decode error"},
215{ERR_REASON(ASN1_R_DECODING_ERROR) ,"decoding error"}, 212{ERR_REASON(ASN1_R_DECODING_ERROR) ,"decoding error"},
diff --git a/src/lib/libcrypto/asn1/asn_mime.c b/src/lib/libcrypto/asn1/asn_mime.c
index 54a704a969..c1d1b12291 100644
--- a/src/lib/libcrypto/asn1/asn_mime.c
+++ b/src/lib/libcrypto/asn1/asn_mime.c
@@ -377,12 +377,8 @@ static int asn1_output_data(BIO *out, BIO *data, ASN1_VALUE *val, int flags,
377 BIO *tmpbio; 377 BIO *tmpbio;
378 const ASN1_AUX *aux = it->funcs; 378 const ASN1_AUX *aux = it->funcs;
379 ASN1_STREAM_ARG sarg; 379 ASN1_STREAM_ARG sarg;
380 int rv = 1;
381 380
382 /* If data is not deteched or resigning then the output BIO is 381 if (!(flags & SMIME_DETACHED))
383 * already set up to finalise when it is written through.
384 */
385 if (!(flags & SMIME_DETACHED) || (flags & PKCS7_REUSE_DIGEST))
386 { 382 {
387 SMIME_crlf_copy(data, out, flags); 383 SMIME_crlf_copy(data, out, flags);
388 return 1; 384 return 1;
@@ -409,7 +405,7 @@ static int asn1_output_data(BIO *out, BIO *data, ASN1_VALUE *val, int flags,
409 405
410 /* Finalize structure */ 406 /* Finalize structure */
411 if (aux->asn1_cb(ASN1_OP_DETACHED_POST, &val, it, &sarg) <= 0) 407 if (aux->asn1_cb(ASN1_OP_DETACHED_POST, &val, it, &sarg) <= 0)
412 rv = 0; 408 return 0;
413 409
414 /* Now remove any digests prepended to the BIO */ 410 /* Now remove any digests prepended to the BIO */
415 411
@@ -420,7 +416,7 @@ static int asn1_output_data(BIO *out, BIO *data, ASN1_VALUE *val, int flags,
420 sarg.ndef_bio = tmpbio; 416 sarg.ndef_bio = tmpbio;
421 } 417 }
422 418
423 return rv; 419 return 1;
424 420
425 } 421 }
426 422
@@ -490,9 +486,9 @@ ASN1_VALUE *SMIME_read_ASN1(BIO *bio, BIO **bcont, const ASN1_ITEM *it)
490 486
491 if(strcmp(hdr->value, "application/x-pkcs7-signature") && 487 if(strcmp(hdr->value, "application/x-pkcs7-signature") &&
492 strcmp(hdr->value, "application/pkcs7-signature")) { 488 strcmp(hdr->value, "application/pkcs7-signature")) {
489 sk_MIME_HEADER_pop_free(headers, mime_hdr_free);
493 ASN1err(ASN1_F_SMIME_READ_ASN1,ASN1_R_SIG_INVALID_MIME_TYPE); 490 ASN1err(ASN1_F_SMIME_READ_ASN1,ASN1_R_SIG_INVALID_MIME_TYPE);
494 ERR_add_error_data(2, "type: ", hdr->value); 491 ERR_add_error_data(2, "type: ", hdr->value);
495 sk_MIME_HEADER_pop_free(headers, mime_hdr_free);
496 sk_BIO_pop_free(parts, BIO_vfree); 492 sk_BIO_pop_free(parts, BIO_vfree);
497 return NULL; 493 return NULL;
498 } 494 }
@@ -805,7 +801,7 @@ static MIME_HEADER *mime_hdr_new(char *name, char *value)
805 if(name) { 801 if(name) {
806 if(!(tmpname = BUF_strdup(name))) return NULL; 802 if(!(tmpname = BUF_strdup(name))) return NULL;
807 for(p = tmpname ; *p; p++) { 803 for(p = tmpname ; *p; p++) {
808 c = (unsigned char)*p; 804 c = *p;
809 if(isupper(c)) { 805 if(isupper(c)) {
810 c = tolower(c); 806 c = tolower(c);
811 *p = c; 807 *p = c;
@@ -815,7 +811,7 @@ static MIME_HEADER *mime_hdr_new(char *name, char *value)
815 if(value) { 811 if(value) {
816 if(!(tmpval = BUF_strdup(value))) return NULL; 812 if(!(tmpval = BUF_strdup(value))) return NULL;
817 for(p = tmpval ; *p; p++) { 813 for(p = tmpval ; *p; p++) {
818 c = (unsigned char)*p; 814 c = *p;
819 if(isupper(c)) { 815 if(isupper(c)) {
820 c = tolower(c); 816 c = tolower(c);
821 *p = c; 817 *p = c;
@@ -839,7 +835,7 @@ static int mime_hdr_addparam(MIME_HEADER *mhdr, char *name, char *value)
839 tmpname = BUF_strdup(name); 835 tmpname = BUF_strdup(name);
840 if(!tmpname) return 0; 836 if(!tmpname) return 0;
841 for(p = tmpname ; *p; p++) { 837 for(p = tmpname ; *p; p++) {
842 c = (unsigned char)*p; 838 c = *p;
843 if(isupper(c)) { 839 if(isupper(c)) {
844 c = tolower(c); 840 c = tolower(c);
845 *p = c; 841 *p = c;
@@ -862,17 +858,12 @@ static int mime_hdr_addparam(MIME_HEADER *mhdr, char *name, char *value)
862static int mime_hdr_cmp(const MIME_HEADER * const *a, 858static int mime_hdr_cmp(const MIME_HEADER * const *a,
863 const MIME_HEADER * const *b) 859 const MIME_HEADER * const *b)
864{ 860{
865 if (!(*a)->name || !(*b)->name)
866 return !!(*a)->name - !!(*b)->name;
867
868 return(strcmp((*a)->name, (*b)->name)); 861 return(strcmp((*a)->name, (*b)->name));
869} 862}
870 863
871static int mime_param_cmp(const MIME_PARAM * const *a, 864static int mime_param_cmp(const MIME_PARAM * const *a,
872 const MIME_PARAM * const *b) 865 const MIME_PARAM * const *b)
873{ 866{
874 if (!(*a)->param_name || !(*b)->param_name)
875 return !!(*a)->param_name - !!(*b)->param_name;
876 return(strcmp((*a)->param_name, (*b)->param_name)); 867 return(strcmp((*a)->param_name, (*b)->param_name));
877} 868}
878 869
diff --git a/src/lib/libcrypto/asn1/n_pkey.c b/src/lib/libcrypto/asn1/n_pkey.c
index e251739933..e7d0439062 100644
--- a/src/lib/libcrypto/asn1/n_pkey.c
+++ b/src/lib/libcrypto/asn1/n_pkey.c
@@ -129,7 +129,6 @@ int i2d_RSA_NET(const RSA *a, unsigned char **pp,
129 unsigned char buf[256],*zz; 129 unsigned char buf[256],*zz;
130 unsigned char key[EVP_MAX_KEY_LENGTH]; 130 unsigned char key[EVP_MAX_KEY_LENGTH];
131 EVP_CIPHER_CTX ctx; 131 EVP_CIPHER_CTX ctx;
132 EVP_CIPHER_CTX_init(&ctx);
133 132
134 if (a == NULL) return(0); 133 if (a == NULL) return(0);
135 134
@@ -207,28 +206,24 @@ int i2d_RSA_NET(const RSA *a, unsigned char **pp,
207 i = strlen((char *)buf); 206 i = strlen((char *)buf);
208 /* If the key is used for SGC the algorithm is modified a little. */ 207 /* If the key is used for SGC the algorithm is modified a little. */
209 if(sgckey) { 208 if(sgckey) {
210 if (!EVP_Digest(buf, i, buf, NULL, EVP_md5(), NULL)) 209 EVP_Digest(buf, i, buf, NULL, EVP_md5(), NULL);
211 goto err;
212 memcpy(buf + 16, "SGCKEYSALT", 10); 210 memcpy(buf + 16, "SGCKEYSALT", 10);
213 i = 26; 211 i = 26;
214 } 212 }
215 213
216 if (!EVP_BytesToKey(EVP_rc4(),EVP_md5(),NULL,buf,i,1,key,NULL)) 214 EVP_BytesToKey(EVP_rc4(),EVP_md5(),NULL,buf,i,1,key,NULL);
217 goto err;
218 OPENSSL_cleanse(buf,256); 215 OPENSSL_cleanse(buf,256);
219 216
220 /* Encrypt private key in place */ 217 /* Encrypt private key in place */
221 zz = enckey->enckey->digest->data; 218 zz = enckey->enckey->digest->data;
222 if (!EVP_EncryptInit_ex(&ctx,EVP_rc4(),NULL,key,NULL)) 219 EVP_CIPHER_CTX_init(&ctx);
223 goto err; 220 EVP_EncryptInit_ex(&ctx,EVP_rc4(),NULL,key,NULL);
224 if (!EVP_EncryptUpdate(&ctx,zz,&i,zz,pkeylen)) 221 EVP_EncryptUpdate(&ctx,zz,&i,zz,pkeylen);
225 goto err; 222 EVP_EncryptFinal_ex(&ctx,zz + i,&j);
226 if (!EVP_EncryptFinal_ex(&ctx,zz + i,&j)) 223 EVP_CIPHER_CTX_cleanup(&ctx);
227 goto err;
228 224
229 ret = i2d_NETSCAPE_ENCRYPTED_PKEY(enckey, pp); 225 ret = i2d_NETSCAPE_ENCRYPTED_PKEY(enckey, pp);
230err: 226err:
231 EVP_CIPHER_CTX_cleanup(&ctx);
232 NETSCAPE_ENCRYPTED_PKEY_free(enckey); 227 NETSCAPE_ENCRYPTED_PKEY_free(enckey);
233 NETSCAPE_PKEY_free(pkey); 228 NETSCAPE_PKEY_free(pkey);
234 return(ret); 229 return(ret);
@@ -293,7 +288,6 @@ static RSA *d2i_RSA_NET_2(RSA **a, ASN1_OCTET_STRING *os,
293 const unsigned char *zz; 288 const unsigned char *zz;
294 unsigned char key[EVP_MAX_KEY_LENGTH]; 289 unsigned char key[EVP_MAX_KEY_LENGTH];
295 EVP_CIPHER_CTX ctx; 290 EVP_CIPHER_CTX ctx;
296 EVP_CIPHER_CTX_init(&ctx);
297 291
298 i=cb((char *)buf,256,"Enter Private Key password:",0); 292 i=cb((char *)buf,256,"Enter Private Key password:",0);
299 if (i != 0) 293 if (i != 0)
@@ -304,22 +298,19 @@ static RSA *d2i_RSA_NET_2(RSA **a, ASN1_OCTET_STRING *os,
304 298
305 i = strlen((char *)buf); 299 i = strlen((char *)buf);
306 if(sgckey){ 300 if(sgckey){
307 if (!EVP_Digest(buf, i, buf, NULL, EVP_md5(), NULL)) 301 EVP_Digest(buf, i, buf, NULL, EVP_md5(), NULL);
308 goto err;
309 memcpy(buf + 16, "SGCKEYSALT", 10); 302 memcpy(buf + 16, "SGCKEYSALT", 10);
310 i = 26; 303 i = 26;
311 } 304 }
312 305
313 if (!EVP_BytesToKey(EVP_rc4(),EVP_md5(),NULL,buf,i,1,key,NULL)) 306 EVP_BytesToKey(EVP_rc4(),EVP_md5(),NULL,buf,i,1,key,NULL);
314 goto err;
315 OPENSSL_cleanse(buf,256); 307 OPENSSL_cleanse(buf,256);
316 308
317 if (!EVP_DecryptInit_ex(&ctx,EVP_rc4(),NULL, key,NULL)) 309 EVP_CIPHER_CTX_init(&ctx);
318 goto err; 310 EVP_DecryptInit_ex(&ctx,EVP_rc4(),NULL, key,NULL);
319 if (!EVP_DecryptUpdate(&ctx,os->data,&i,os->data,os->length)) 311 EVP_DecryptUpdate(&ctx,os->data,&i,os->data,os->length);
320 goto err; 312 EVP_DecryptFinal_ex(&ctx,&(os->data[i]),&j);
321 if (!EVP_DecryptFinal_ex(&ctx,&(os->data[i]),&j)) 313 EVP_CIPHER_CTX_cleanup(&ctx);
322 goto err;
323 os->length=i+j; 314 os->length=i+j;
324 315
325 zz=os->data; 316 zz=os->data;
@@ -337,7 +328,6 @@ static RSA *d2i_RSA_NET_2(RSA **a, ASN1_OCTET_STRING *os,
337 goto err; 328 goto err;
338 } 329 }
339err: 330err:
340 EVP_CIPHER_CTX_cleanup(&ctx);
341 NETSCAPE_PKEY_free(pkey); 331 NETSCAPE_PKEY_free(pkey);
342 return(ret); 332 return(ret);
343 } 333 }
diff --git a/src/lib/libcrypto/asn1/p5_pbev2.c b/src/lib/libcrypto/asn1/p5_pbev2.c
index 4ea683036b..cb49b6651d 100644
--- a/src/lib/libcrypto/asn1/p5_pbev2.c
+++ b/src/lib/libcrypto/asn1/p5_pbev2.c
@@ -91,10 +91,12 @@ X509_ALGOR *PKCS5_pbe2_set_iv(const EVP_CIPHER *cipher, int iter,
91 unsigned char *aiv, int prf_nid) 91 unsigned char *aiv, int prf_nid)
92{ 92{
93 X509_ALGOR *scheme = NULL, *kalg = NULL, *ret = NULL; 93 X509_ALGOR *scheme = NULL, *kalg = NULL, *ret = NULL;
94 int alg_nid, keylen; 94 int alg_nid;
95 EVP_CIPHER_CTX ctx; 95 EVP_CIPHER_CTX ctx;
96 unsigned char iv[EVP_MAX_IV_LENGTH]; 96 unsigned char iv[EVP_MAX_IV_LENGTH];
97 PBKDF2PARAM *kdf = NULL;
97 PBE2PARAM *pbe2 = NULL; 98 PBE2PARAM *pbe2 = NULL;
99 ASN1_OCTET_STRING *osalt = NULL;
98 ASN1_OBJECT *obj; 100 ASN1_OBJECT *obj;
99 101
100 alg_nid = EVP_CIPHER_type(cipher); 102 alg_nid = EVP_CIPHER_type(cipher);
@@ -125,8 +127,7 @@ X509_ALGOR *PKCS5_pbe2_set_iv(const EVP_CIPHER *cipher, int iter,
125 EVP_CIPHER_CTX_init(&ctx); 127 EVP_CIPHER_CTX_init(&ctx);
126 128
127 /* Dummy cipherinit to just setup the IV, and PRF */ 129 /* Dummy cipherinit to just setup the IV, and PRF */
128 if (!EVP_CipherInit_ex(&ctx, cipher, NULL, NULL, iv, 0)) 130 EVP_CipherInit_ex(&ctx, cipher, NULL, NULL, iv, 0);
129 goto err;
130 if(EVP_CIPHER_param_to_asn1(&ctx, scheme->parameter) < 0) { 131 if(EVP_CIPHER_param_to_asn1(&ctx, scheme->parameter) < 0) {
131 ASN1err(ASN1_F_PKCS5_PBE2_SET_IV, 132 ASN1err(ASN1_F_PKCS5_PBE2_SET_IV,
132 ASN1_R_ERROR_SETTING_CIPHER_PARAMS); 133 ASN1_R_ERROR_SETTING_CIPHER_PARAMS);
@@ -144,21 +145,55 @@ X509_ALGOR *PKCS5_pbe2_set_iv(const EVP_CIPHER *cipher, int iter,
144 } 145 }
145 EVP_CIPHER_CTX_cleanup(&ctx); 146 EVP_CIPHER_CTX_cleanup(&ctx);
146 147
148 if(!(kdf = PBKDF2PARAM_new())) goto merr;
149 if(!(osalt = M_ASN1_OCTET_STRING_new())) goto merr;
150
151 if (!saltlen) saltlen = PKCS5_SALT_LEN;
152 if (!(osalt->data = OPENSSL_malloc (saltlen))) goto merr;
153 osalt->length = saltlen;
154 if (salt) memcpy (osalt->data, salt, saltlen);
155 else if (RAND_pseudo_bytes (osalt->data, saltlen) < 0) goto merr;
156
157 if(iter <= 0) iter = PKCS5_DEFAULT_ITER;
158 if(!ASN1_INTEGER_set(kdf->iter, iter)) goto merr;
159
160 /* Now include salt in kdf structure */
161 kdf->salt->value.octet_string = osalt;
162 kdf->salt->type = V_ASN1_OCTET_STRING;
163 osalt = NULL;
164
147 /* If its RC2 then we'd better setup the key length */ 165 /* If its RC2 then we'd better setup the key length */
148 166
149 if(alg_nid == NID_rc2_cbc) 167 if(alg_nid == NID_rc2_cbc) {
150 keylen = EVP_CIPHER_key_length(cipher); 168 if(!(kdf->keylength = M_ASN1_INTEGER_new())) goto merr;
151 else 169 if(!ASN1_INTEGER_set (kdf->keylength,
152 keylen = -1; 170 EVP_CIPHER_key_length(cipher))) goto merr;
171 }
172
173 /* prf can stay NULL if we are using hmacWithSHA1 */
174 if (prf_nid != NID_hmacWithSHA1)
175 {
176 kdf->prf = X509_ALGOR_new();
177 if (!kdf->prf)
178 goto merr;
179 X509_ALGOR_set0(kdf->prf, OBJ_nid2obj(prf_nid),
180 V_ASN1_NULL, NULL);
181 }
182
183 /* Now setup the PBE2PARAM keyfunc structure */
153 184
154 /* Setup keyfunc */ 185 pbe2->keyfunc->algorithm = OBJ_nid2obj(NID_id_pbkdf2);
155 186
156 X509_ALGOR_free(pbe2->keyfunc); 187 /* Encode PBKDF2PARAM into parameter of pbe2 */
157 188
158 pbe2->keyfunc = PKCS5_pbkdf2_set(iter, salt, saltlen, prf_nid, keylen); 189 if(!(pbe2->keyfunc->parameter = ASN1_TYPE_new())) goto merr;
159 190
160 if (!pbe2->keyfunc) 191 if(!ASN1_item_pack(kdf, ASN1_ITEM_rptr(PBKDF2PARAM),
161 goto merr; 192 &pbe2->keyfunc->parameter->value.sequence)) goto merr;
193 pbe2->keyfunc->parameter->type = V_ASN1_SEQUENCE;
194
195 PBKDF2PARAM_free(kdf);
196 kdf = NULL;
162 197
163 /* Now set up top level AlgorithmIdentifier */ 198 /* Now set up top level AlgorithmIdentifier */
164 199
@@ -184,6 +219,8 @@ X509_ALGOR *PKCS5_pbe2_set_iv(const EVP_CIPHER *cipher, int iter,
184 err: 219 err:
185 PBE2PARAM_free(pbe2); 220 PBE2PARAM_free(pbe2);
186 /* Note 'scheme' is freed as part of pbe2 */ 221 /* Note 'scheme' is freed as part of pbe2 */
222 M_ASN1_OCTET_STRING_free(osalt);
223 PBKDF2PARAM_free(kdf);
187 X509_ALGOR_free(kalg); 224 X509_ALGOR_free(kalg);
188 X509_ALGOR_free(ret); 225 X509_ALGOR_free(ret);
189 226
@@ -196,85 +233,3 @@ X509_ALGOR *PKCS5_pbe2_set(const EVP_CIPHER *cipher, int iter,
196 { 233 {
197 return PKCS5_pbe2_set_iv(cipher, iter, salt, saltlen, NULL, -1); 234 return PKCS5_pbe2_set_iv(cipher, iter, salt, saltlen, NULL, -1);
198 } 235 }
199
200X509_ALGOR *PKCS5_pbkdf2_set(int iter, unsigned char *salt, int saltlen,
201 int prf_nid, int keylen)
202 {
203 X509_ALGOR *keyfunc = NULL;
204 PBKDF2PARAM *kdf = NULL;
205 ASN1_OCTET_STRING *osalt = NULL;
206
207 if(!(kdf = PBKDF2PARAM_new()))
208 goto merr;
209 if(!(osalt = M_ASN1_OCTET_STRING_new()))
210 goto merr;
211
212 kdf->salt->value.octet_string = osalt;
213 kdf->salt->type = V_ASN1_OCTET_STRING;
214
215 if (!saltlen)
216 saltlen = PKCS5_SALT_LEN;
217 if (!(osalt->data = OPENSSL_malloc (saltlen)))
218 goto merr;
219
220 osalt->length = saltlen;
221
222 if (salt)
223 memcpy (osalt->data, salt, saltlen);
224 else if (RAND_pseudo_bytes (osalt->data, saltlen) < 0)
225 goto merr;
226
227 if(iter <= 0)
228 iter = PKCS5_DEFAULT_ITER;
229
230 if(!ASN1_INTEGER_set(kdf->iter, iter))
231 goto merr;
232
233 /* If have a key len set it up */
234
235 if(keylen > 0)
236 {
237 if(!(kdf->keylength = M_ASN1_INTEGER_new()))
238 goto merr;
239 if(!ASN1_INTEGER_set (kdf->keylength, keylen))
240 goto merr;
241 }
242
243 /* prf can stay NULL if we are using hmacWithSHA1 */
244 if (prf_nid > 0 && prf_nid != NID_hmacWithSHA1)
245 {
246 kdf->prf = X509_ALGOR_new();
247 if (!kdf->prf)
248 goto merr;
249 X509_ALGOR_set0(kdf->prf, OBJ_nid2obj(prf_nid),
250 V_ASN1_NULL, NULL);
251 }
252
253 /* Finally setup the keyfunc structure */
254
255 keyfunc = X509_ALGOR_new();
256 if (!keyfunc)
257 goto merr;
258
259 keyfunc->algorithm = OBJ_nid2obj(NID_id_pbkdf2);
260
261 /* Encode PBKDF2PARAM into parameter of pbe2 */
262
263 if(!(keyfunc->parameter = ASN1_TYPE_new()))
264 goto merr;
265
266 if(!ASN1_item_pack(kdf, ASN1_ITEM_rptr(PBKDF2PARAM),
267 &keyfunc->parameter->value.sequence))
268 goto merr;
269 keyfunc->parameter->type = V_ASN1_SEQUENCE;
270
271 PBKDF2PARAM_free(kdf);
272 return keyfunc;
273
274 merr:
275 ASN1err(ASN1_F_PKCS5_PBKDF2_SET,ERR_R_MALLOC_FAILURE);
276 PBKDF2PARAM_free(kdf);
277 X509_ALGOR_free(keyfunc);
278 return NULL;
279 }
280
diff --git a/src/lib/libcrypto/asn1/t_crl.c b/src/lib/libcrypto/asn1/t_crl.c
index c61169208a..ee5a687ce8 100644
--- a/src/lib/libcrypto/asn1/t_crl.c
+++ b/src/lib/libcrypto/asn1/t_crl.c
@@ -94,7 +94,8 @@ int X509_CRL_print(BIO *out, X509_CRL *x)
94 l = X509_CRL_get_version(x); 94 l = X509_CRL_get_version(x);
95 BIO_printf(out, "%8sVersion %lu (0x%lx)\n", "", l+1, l); 95 BIO_printf(out, "%8sVersion %lu (0x%lx)\n", "", l+1, l);
96 i = OBJ_obj2nid(x->sig_alg->algorithm); 96 i = OBJ_obj2nid(x->sig_alg->algorithm);
97 X509_signature_print(out, x->sig_alg, NULL); 97 BIO_printf(out, "%8sSignature Algorithm: %s\n", "",
98 (i == NID_undef) ? "NONE" : OBJ_nid2ln(i));
98 p=X509_NAME_oneline(X509_CRL_get_issuer(x),NULL,0); 99 p=X509_NAME_oneline(X509_CRL_get_issuer(x),NULL,0);
99 BIO_printf(out,"%8sIssuer: %s\n","",p); 100 BIO_printf(out,"%8sIssuer: %s\n","",p);
100 OPENSSL_free(p); 101 OPENSSL_free(p);
diff --git a/src/lib/libcrypto/asn1/t_x509.c b/src/lib/libcrypto/asn1/t_x509.c
index edbb39a02f..e061f2ffad 100644
--- a/src/lib/libcrypto/asn1/t_x509.c
+++ b/src/lib/libcrypto/asn1/t_x509.c
@@ -72,7 +72,6 @@
72#include <openssl/objects.h> 72#include <openssl/objects.h>
73#include <openssl/x509.h> 73#include <openssl/x509.h>
74#include <openssl/x509v3.h> 74#include <openssl/x509v3.h>
75#include "asn1_locl.h"
76 75
77#ifndef OPENSSL_NO_FP_API 76#ifndef OPENSSL_NO_FP_API
78int X509_print_fp(FILE *fp, X509 *x) 77int X509_print_fp(FILE *fp, X509 *x)
@@ -138,10 +137,10 @@ int X509_print_ex(BIO *bp, X509 *x, unsigned long nmflags, unsigned long cflag)
138 if (BIO_write(bp," Serial Number:",22) <= 0) goto err; 137 if (BIO_write(bp," Serial Number:",22) <= 0) goto err;
139 138
140 bs=X509_get_serialNumber(x); 139 bs=X509_get_serialNumber(x);
141 if (bs->length <= (int)sizeof(long)) 140 if (bs->length <= 4)
142 { 141 {
143 l=ASN1_INTEGER_get(bs); 142 l=ASN1_INTEGER_get(bs);
144 if (bs->type == V_ASN1_NEG_INTEGER) 143 if (l < 0)
145 { 144 {
146 l= -l; 145 l= -l;
147 neg="-"; 146 neg="-";
@@ -168,16 +167,12 @@ int X509_print_ex(BIO *bp, X509 *x, unsigned long nmflags, unsigned long cflag)
168 167
169 if(!(cflag & X509_FLAG_NO_SIGNAME)) 168 if(!(cflag & X509_FLAG_NO_SIGNAME))
170 { 169 {
171 if(X509_signature_print(bp, x->sig_alg, NULL) <= 0)
172 goto err;
173#if 0
174 if (BIO_printf(bp,"%8sSignature Algorithm: ","") <= 0) 170 if (BIO_printf(bp,"%8sSignature Algorithm: ","") <= 0)
175 goto err; 171 goto err;
176 if (i2a_ASN1_OBJECT(bp, ci->signature->algorithm) <= 0) 172 if (i2a_ASN1_OBJECT(bp, ci->signature->algorithm) <= 0)
177 goto err; 173 goto err;
178 if (BIO_puts(bp, "\n") <= 0) 174 if (BIO_puts(bp, "\n") <= 0)
179 goto err; 175 goto err;
180#endif
181 } 176 }
182 177
183 if(!(cflag & X509_FLAG_NO_ISSUER)) 178 if(!(cflag & X509_FLAG_NO_ISSUER))
@@ -260,8 +255,7 @@ int X509_ocspid_print (BIO *bp, X509 *x)
260 goto err; 255 goto err;
261 i2d_X509_NAME(x->cert_info->subject, &dertmp); 256 i2d_X509_NAME(x->cert_info->subject, &dertmp);
262 257
263 if (!EVP_Digest(der, derlen, SHA1md, NULL, EVP_sha1(), NULL)) 258 EVP_Digest(der, derlen, SHA1md, NULL, EVP_sha1(), NULL);
264 goto err;
265 for (i=0; i < SHA_DIGEST_LENGTH; i++) 259 for (i=0; i < SHA_DIGEST_LENGTH; i++)
266 { 260 {
267 if (BIO_printf(bp,"%02X",SHA1md[i]) <= 0) goto err; 261 if (BIO_printf(bp,"%02X",SHA1md[i]) <= 0) goto err;
@@ -274,10 +268,8 @@ int X509_ocspid_print (BIO *bp, X509 *x)
274 if (BIO_printf(bp,"\n Public key OCSP hash: ") <= 0) 268 if (BIO_printf(bp,"\n Public key OCSP hash: ") <= 0)
275 goto err; 269 goto err;
276 270
277 if (!EVP_Digest(x->cert_info->key->public_key->data, 271 EVP_Digest(x->cert_info->key->public_key->data,
278 x->cert_info->key->public_key->length, 272 x->cert_info->key->public_key->length, SHA1md, NULL, EVP_sha1(), NULL);
279 SHA1md, NULL, EVP_sha1(), NULL))
280 goto err;
281 for (i=0; i < SHA_DIGEST_LENGTH; i++) 273 for (i=0; i < SHA_DIGEST_LENGTH; i++)
282 { 274 {
283 if (BIO_printf(bp,"%02X",SHA1md[i]) <= 0) 275 if (BIO_printf(bp,"%02X",SHA1md[i]) <= 0)
@@ -291,50 +283,23 @@ err:
291 return(0); 283 return(0);
292 } 284 }
293 285
294int X509_signature_dump(BIO *bp, const ASN1_STRING *sig, int indent) 286int X509_signature_print(BIO *bp, X509_ALGOR *sigalg, ASN1_STRING *sig)
295{ 287{
296 const unsigned char *s; 288 unsigned char *s;
297 int i, n; 289 int i, n;
290 if (BIO_puts(bp," Signature Algorithm: ") <= 0) return 0;
291 if (i2a_ASN1_OBJECT(bp, sigalg->algorithm) <= 0) return 0;
298 292
299 n=sig->length; 293 n=sig->length;
300 s=sig->data; 294 s=sig->data;
301 for (i=0; i<n; i++) 295 for (i=0; i<n; i++)
302 { 296 {
303 if ((i%18) == 0) 297 if ((i%18) == 0)
304 { 298 if (BIO_write(bp,"\n ",9) <= 0) return 0;
305 if (BIO_write(bp,"\n",1) <= 0) return 0;
306 if (BIO_indent(bp, indent, indent) <= 0) return 0;
307 }
308 if (BIO_printf(bp,"%02x%s",s[i], 299 if (BIO_printf(bp,"%02x%s",s[i],
309 ((i+1) == n)?"":":") <= 0) return 0; 300 ((i+1) == n)?"":":") <= 0) return 0;
310 } 301 }
311 if (BIO_write(bp,"\n",1) != 1) return 0; 302 if (BIO_write(bp,"\n",1) != 1) return 0;
312
313 return 1;
314}
315
316int X509_signature_print(BIO *bp, X509_ALGOR *sigalg, ASN1_STRING *sig)
317{
318 int sig_nid;
319 if (BIO_puts(bp," Signature Algorithm: ") <= 0) return 0;
320 if (i2a_ASN1_OBJECT(bp, sigalg->algorithm) <= 0) return 0;
321
322 sig_nid = OBJ_obj2nid(sigalg->algorithm);
323 if (sig_nid != NID_undef)
324 {
325 int pkey_nid, dig_nid;
326 const EVP_PKEY_ASN1_METHOD *ameth;
327 if (OBJ_find_sigid_algs(sig_nid, &dig_nid, &pkey_nid))
328 {
329 ameth = EVP_PKEY_asn1_find(NULL, pkey_nid);
330 if (ameth && ameth->sig_print)
331 return ameth->sig_print(bp, sigalg, sig, 9, 0);
332 }
333 }
334 if (sig)
335 return X509_signature_dump(bp, sig, 9);
336 else if (BIO_puts(bp, "\n") <= 0)
337 return 0;
338 return 1; 303 return 1;
339} 304}
340 305
diff --git a/src/lib/libcrypto/asn1/tasn_prn.c b/src/lib/libcrypto/asn1/tasn_prn.c
index 542a091a66..453698012d 100644
--- a/src/lib/libcrypto/asn1/tasn_prn.c
+++ b/src/lib/libcrypto/asn1/tasn_prn.c
@@ -446,11 +446,11 @@ static int asn1_print_fsname(BIO *out, int indent,
446 return 1; 446 return 1;
447 } 447 }
448 448
449static int asn1_print_boolean_ctx(BIO *out, int boolval, 449static int asn1_print_boolean_ctx(BIO *out, const int bool,
450 const ASN1_PCTX *pctx) 450 const ASN1_PCTX *pctx)
451 { 451 {
452 const char *str; 452 const char *str;
453 switch (boolval) 453 switch (bool)
454 { 454 {
455 case -1: 455 case -1:
456 str = "BOOL ABSENT"; 456 str = "BOOL ABSENT";
@@ -574,10 +574,10 @@ static int asn1_primitive_print(BIO *out, ASN1_VALUE **fld,
574 { 574 {
575 case V_ASN1_BOOLEAN: 575 case V_ASN1_BOOLEAN:
576 { 576 {
577 int boolval = *(int *)fld; 577 int bool = *(int *)fld;
578 if (boolval == -1) 578 if (bool == -1)
579 boolval = it->size; 579 bool = it->size;
580 ret = asn1_print_boolean_ctx(out, boolval, pctx); 580 ret = asn1_print_boolean_ctx(out, bool, pctx);
581 } 581 }
582 break; 582 break;
583 583
diff --git a/src/lib/libcrypto/asn1/x_algor.c b/src/lib/libcrypto/asn1/x_algor.c
index 274e456c73..99e53429b7 100644
--- a/src/lib/libcrypto/asn1/x_algor.c
+++ b/src/lib/libcrypto/asn1/x_algor.c
@@ -128,17 +128,3 @@ void X509_ALGOR_get0(ASN1_OBJECT **paobj, int *pptype, void **ppval,
128 } 128 }
129 } 129 }
130 130
131/* Set up an X509_ALGOR DigestAlgorithmIdentifier from an EVP_MD */
132
133void X509_ALGOR_set_md(X509_ALGOR *alg, const EVP_MD *md)
134 {
135 int param_type;
136
137 if (md->flags & EVP_MD_FLAG_DIGALGID_ABSENT)
138 param_type = V_ASN1_UNDEF;
139 else
140 param_type = V_ASN1_NULL;
141
142 X509_ALGOR_set0(alg, OBJ_nid2obj(EVP_MD_type(md)), param_type, NULL);
143
144 }
diff --git a/src/lib/libcrypto/asn1/x_name.c b/src/lib/libcrypto/asn1/x_name.c
index d7c2318693..49be08b4da 100644
--- a/src/lib/libcrypto/asn1/x_name.c
+++ b/src/lib/libcrypto/asn1/x_name.c
@@ -399,7 +399,8 @@ static int asn1_string_canon(ASN1_STRING *out, ASN1_STRING *in)
399 /* If type not in bitmask just copy string across */ 399 /* If type not in bitmask just copy string across */
400 if (!(ASN1_tag2bit(in->type) & ASN1_MASK_CANON)) 400 if (!(ASN1_tag2bit(in->type) & ASN1_MASK_CANON))
401 { 401 {
402 if (!ASN1_STRING_copy(out, in)) 402 out->type = in->type;
403 if (!ASN1_STRING_set(out, in->data, in->length))
403 return 0; 404 return 0;
404 return 1; 405 return 1;
405 } 406 }
diff --git a/src/lib/libcrypto/asn1/x_pubkey.c b/src/lib/libcrypto/asn1/x_pubkey.c
index 627ec87f9f..d42b6a2c54 100644
--- a/src/lib/libcrypto/asn1/x_pubkey.c
+++ b/src/lib/libcrypto/asn1/x_pubkey.c
@@ -171,16 +171,7 @@ EVP_PKEY *X509_PUBKEY_get(X509_PUBKEY *key)
171 goto error; 171 goto error;
172 } 172 }
173 173
174 /* Check to see if another thread set key->pkey first */ 174 key->pkey = ret;
175 CRYPTO_w_lock(CRYPTO_LOCK_EVP_PKEY);
176 if (key->pkey)
177 {
178 EVP_PKEY_free(ret);
179 ret = key->pkey;
180 }
181 else
182 key->pkey = ret;
183 CRYPTO_w_unlock(CRYPTO_LOCK_EVP_PKEY);
184 CRYPTO_add(&ret->references, 1, CRYPTO_LOCK_EVP_PKEY); 175 CRYPTO_add(&ret->references, 1, CRYPTO_LOCK_EVP_PKEY);
185 176
186 return ret; 177 return ret;