summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/x509
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/x509')
-rw-r--r--src/lib/libcrypto/x509/Makefile407
-rw-r--r--src/lib/libcrypto/x509/x509.h11
-rw-r--r--src/lib/libcrypto/x509/x509_cmp.c27
-rw-r--r--src/lib/libcrypto/x509/x509_lu.c2
-rw-r--r--src/lib/libcrypto/x509/x509_vfy.c5
-rw-r--r--src/lib/libcrypto/x509/x509type.c32
-rw-r--r--src/lib/libcrypto/x509/x_all.c19
7 files changed, 433 insertions, 70 deletions
diff --git a/src/lib/libcrypto/x509/Makefile b/src/lib/libcrypto/x509/Makefile
new file mode 100644
index 0000000000..72c82278f4
--- /dev/null
+++ b/src/lib/libcrypto/x509/Makefile
@@ -0,0 +1,407 @@
1#
2# OpenSSL/crypto/x509/Makefile
3#
4
5DIR= x509
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= x509_def.c x509_d2.c x509_r2x.c x509_cmp.c \
21 x509_obj.c x509_req.c x509spki.c x509_vfy.c \
22 x509_set.c x509cset.c x509rset.c x509_err.c \
23 x509name.c x509_v3.c x509_ext.c x509_att.c \
24 x509type.c x509_lu.c x_all.c x509_txt.c \
25 x509_trs.c by_file.c by_dir.c x509_vpm.c
26LIBOBJ= x509_def.o x509_d2.o x509_r2x.o x509_cmp.o \
27 x509_obj.o x509_req.o x509spki.o x509_vfy.o \
28 x509_set.o x509cset.o x509rset.o x509_err.o \
29 x509name.o x509_v3.o x509_ext.o x509_att.o \
30 x509type.o x509_lu.o x_all.o x509_txt.o \
31 x509_trs.o by_file.o by_dir.o x509_vpm.o
32
33SRC= $(LIBSRC)
34
35EXHEADER= x509.h x509_vfy.h
36HEADER= $(EXHEADER)
37
38ALL= $(GENERAL) $(SRC) $(HEADER)
39
40top:
41 (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
42
43all: lib
44
45lib: $(LIBOBJ)
46 $(AR) $(LIB) $(LIBOBJ)
47 $(RANLIB) $(LIB) || echo Never mind.
48 @touch lib
49
50files:
51 $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
52
53links:
54 @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
55 @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
56 @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
57
58install:
59 @[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
60 @headerlist="$(EXHEADER)"; for i in $$headerlist ; \
61 do \
62 (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
63 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
64 done;
65
66tags:
67 ctags $(SRC)
68
69tests:
70
71lint:
72 lint -DLINT $(INCLUDES) $(SRC)>fluff
73
74depend:
75 @[ -n "$(MAKEDEPEND)" ] # should be set by upper Makefile...
76 $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
77
78dclean:
79 $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
80 mv -f Makefile.new $(MAKEFILE)
81
82clean:
83 rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
84
85# DO NOT DELETE THIS LINE -- make depend depends on it.
86
87by_dir.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
88by_dir.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
89by_dir.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
90by_dir.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
91by_dir.o: ../../include/openssl/err.h ../../include/openssl/evp.h
92by_dir.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
93by_dir.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
94by_dir.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
95by_dir.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
96by_dir.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
97by_dir.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
98by_dir.o: ../../include/openssl/x509_vfy.h ../cryptlib.h by_dir.c
99by_file.o: ../../e_os.h ../../include/openssl/asn1.h
100by_file.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
101by_file.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
102by_file.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
103by_file.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h
104by_file.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h
105by_file.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
106by_file.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
107by_file.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pem.h
108by_file.o: ../../include/openssl/pem2.h ../../include/openssl/pkcs7.h
109by_file.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
110by_file.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
111by_file.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
112by_file.o: ../cryptlib.h by_file.c
113x509_att.o: ../../e_os.h ../../include/openssl/asn1.h
114x509_att.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
115x509_att.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h
116x509_att.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
117x509_att.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
118x509_att.o: ../../include/openssl/err.h ../../include/openssl/evp.h
119x509_att.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
120x509_att.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
121x509_att.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
122x509_att.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
123x509_att.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
124x509_att.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
125x509_att.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h
126x509_att.o: ../cryptlib.h x509_att.c
127x509_cmp.o: ../../e_os.h ../../include/openssl/asn1.h
128x509_cmp.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
129x509_cmp.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h
130x509_cmp.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
131x509_cmp.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
132x509_cmp.o: ../../include/openssl/err.h ../../include/openssl/evp.h
133x509_cmp.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
134x509_cmp.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
135x509_cmp.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
136x509_cmp.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
137x509_cmp.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
138x509_cmp.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
139x509_cmp.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h
140x509_cmp.o: ../cryptlib.h x509_cmp.c
141x509_d2.o: ../../e_os.h ../../include/openssl/asn1.h
142x509_d2.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
143x509_d2.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
144x509_d2.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
145x509_d2.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h
146x509_d2.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h
147x509_d2.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
148x509_d2.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
149x509_d2.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
150x509_d2.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
151x509_d2.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
152x509_d2.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
153x509_d2.o: ../cryptlib.h x509_d2.c
154x509_def.o: ../../e_os.h ../../include/openssl/asn1.h
155x509_def.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
156x509_def.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
157x509_def.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
158x509_def.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h
159x509_def.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h
160x509_def.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
161x509_def.o: ../../include/openssl/opensslconf.h
162x509_def.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
163x509_def.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
164x509_def.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
165x509_def.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
166x509_def.o: ../../include/openssl/x509_vfy.h ../cryptlib.h x509_def.c
167x509_err.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
168x509_err.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
169x509_err.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
170x509_err.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
171x509_err.o: ../../include/openssl/err.h ../../include/openssl/evp.h
172x509_err.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
173x509_err.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
174x509_err.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
175x509_err.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
176x509_err.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
177x509_err.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
178x509_err.o: ../../include/openssl/x509_vfy.h x509_err.c
179x509_ext.o: ../../e_os.h ../../include/openssl/asn1.h
180x509_ext.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
181x509_ext.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h
182x509_ext.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
183x509_ext.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
184x509_ext.o: ../../include/openssl/err.h ../../include/openssl/evp.h
185x509_ext.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
186x509_ext.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
187x509_ext.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
188x509_ext.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
189x509_ext.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
190x509_ext.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
191x509_ext.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h
192x509_ext.o: ../cryptlib.h x509_ext.c
193x509_lu.o: ../../e_os.h ../../include/openssl/asn1.h
194x509_lu.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
195x509_lu.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h
196x509_lu.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
197x509_lu.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
198x509_lu.o: ../../include/openssl/err.h ../../include/openssl/evp.h
199x509_lu.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
200x509_lu.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
201x509_lu.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
202x509_lu.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
203x509_lu.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
204x509_lu.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
205x509_lu.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h
206x509_lu.o: ../cryptlib.h x509_lu.c
207x509_obj.o: ../../e_os.h ../../include/openssl/asn1.h
208x509_obj.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
209x509_obj.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
210x509_obj.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
211x509_obj.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h
212x509_obj.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h
213x509_obj.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
214x509_obj.o: ../../include/openssl/opensslconf.h
215x509_obj.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
216x509_obj.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
217x509_obj.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
218x509_obj.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
219x509_obj.o: ../../include/openssl/x509_vfy.h ../cryptlib.h x509_obj.c
220x509_r2x.o: ../../e_os.h ../../include/openssl/asn1.h
221x509_r2x.o: ../../include/openssl/bio.h ../../include/openssl/bn.h
222x509_r2x.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
223x509_r2x.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
224x509_r2x.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
225x509_r2x.o: ../../include/openssl/err.h ../../include/openssl/evp.h
226x509_r2x.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
227x509_r2x.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
228x509_r2x.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
229x509_r2x.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
230x509_r2x.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
231x509_r2x.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
232x509_r2x.o: ../../include/openssl/x509_vfy.h ../cryptlib.h x509_r2x.c
233x509_req.o: ../../e_os.h ../../include/openssl/asn1.h
234x509_req.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h
235x509_req.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
236x509_req.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
237x509_req.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
238x509_req.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h
239x509_req.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h
240x509_req.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
241x509_req.o: ../../include/openssl/opensslconf.h
242x509_req.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
243x509_req.o: ../../include/openssl/pem.h ../../include/openssl/pem2.h
244x509_req.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
245x509_req.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
246x509_req.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
247x509_req.o: ../../include/openssl/x509_vfy.h ../cryptlib.h x509_req.c
248x509_set.o: ../../e_os.h ../../include/openssl/asn1.h
249x509_set.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
250x509_set.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
251x509_set.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
252x509_set.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h
253x509_set.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h
254x509_set.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
255x509_set.o: ../../include/openssl/opensslconf.h
256x509_set.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
257x509_set.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
258x509_set.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
259x509_set.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
260x509_set.o: ../../include/openssl/x509_vfy.h ../cryptlib.h x509_set.c
261x509_trs.o: ../../e_os.h ../../include/openssl/asn1.h
262x509_trs.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
263x509_trs.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h
264x509_trs.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
265x509_trs.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
266x509_trs.o: ../../include/openssl/err.h ../../include/openssl/evp.h
267x509_trs.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
268x509_trs.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
269x509_trs.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
270x509_trs.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
271x509_trs.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
272x509_trs.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
273x509_trs.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h
274x509_trs.o: ../cryptlib.h x509_trs.c
275x509_txt.o: ../../e_os.h ../../include/openssl/asn1.h
276x509_txt.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
277x509_txt.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
278x509_txt.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
279x509_txt.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h
280x509_txt.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h
281x509_txt.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
282x509_txt.o: ../../include/openssl/opensslconf.h
283x509_txt.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
284x509_txt.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
285x509_txt.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
286x509_txt.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
287x509_txt.o: ../../include/openssl/x509_vfy.h ../cryptlib.h x509_txt.c
288x509_v3.o: ../../e_os.h ../../include/openssl/asn1.h
289x509_v3.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
290x509_v3.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h
291x509_v3.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
292x509_v3.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
293x509_v3.o: ../../include/openssl/err.h ../../include/openssl/evp.h
294x509_v3.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
295x509_v3.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
296x509_v3.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
297x509_v3.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
298x509_v3.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
299x509_v3.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
300x509_v3.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h
301x509_v3.o: ../cryptlib.h x509_v3.c
302x509_vfy.o: ../../e_os.h ../../include/openssl/asn1.h
303x509_vfy.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
304x509_vfy.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h
305x509_vfy.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
306x509_vfy.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
307x509_vfy.o: ../../include/openssl/err.h ../../include/openssl/evp.h
308x509_vfy.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
309x509_vfy.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
310x509_vfy.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
311x509_vfy.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
312x509_vfy.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
313x509_vfy.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
314x509_vfy.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h
315x509_vfy.o: ../cryptlib.h x509_vfy.c
316x509_vpm.o: ../../e_os.h ../../include/openssl/asn1.h
317x509_vpm.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
318x509_vpm.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h
319x509_vpm.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h
320x509_vpm.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h
321x509_vpm.o: ../../include/openssl/err.h ../../include/openssl/evp.h
322x509_vpm.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
323x509_vpm.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
324x509_vpm.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
325x509_vpm.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
326x509_vpm.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
327x509_vpm.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
328x509_vpm.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h
329x509_vpm.o: ../cryptlib.h x509_vpm.c
330x509cset.o: ../../e_os.h ../../include/openssl/asn1.h
331x509cset.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
332x509cset.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
333x509cset.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
334x509cset.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h
335x509cset.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h
336x509cset.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
337x509cset.o: ../../include/openssl/opensslconf.h
338x509cset.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
339x509cset.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
340x509cset.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
341x509cset.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
342x509cset.o: ../../include/openssl/x509_vfy.h ../cryptlib.h x509cset.c
343x509name.o: ../../e_os.h ../../include/openssl/asn1.h
344x509name.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
345x509name.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
346x509name.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
347x509name.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h
348x509name.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h
349x509name.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
350x509name.o: ../../include/openssl/opensslconf.h
351x509name.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
352x509name.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
353x509name.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
354x509name.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
355x509name.o: ../../include/openssl/x509_vfy.h ../cryptlib.h x509name.c
356x509rset.o: ../../e_os.h ../../include/openssl/asn1.h
357x509rset.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
358x509rset.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
359x509rset.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
360x509rset.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h
361x509rset.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h
362x509rset.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
363x509rset.o: ../../include/openssl/opensslconf.h
364x509rset.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
365x509rset.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
366x509rset.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
367x509rset.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
368x509rset.o: ../../include/openssl/x509_vfy.h ../cryptlib.h x509rset.c
369x509spki.o: ../../e_os.h ../../include/openssl/asn1.h
370x509spki.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
371x509spki.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
372x509spki.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
373x509spki.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h
374x509spki.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h
375x509spki.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
376x509spki.o: ../../include/openssl/opensslconf.h
377x509spki.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
378x509spki.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
379x509spki.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
380x509spki.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
381x509spki.o: ../../include/openssl/x509_vfy.h ../cryptlib.h x509spki.c
382x509type.o: ../../e_os.h ../../include/openssl/asn1.h
383x509type.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
384x509type.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
385x509type.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
386x509type.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h
387x509type.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h
388x509type.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
389x509type.o: ../../include/openssl/opensslconf.h
390x509type.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
391x509type.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h
392x509type.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
393x509type.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
394x509type.o: ../../include/openssl/x509_vfy.h ../cryptlib.h x509type.c
395x_all.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
396x_all.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
397x_all.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
398x_all.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h
399x_all.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h
400x_all.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h
401x_all.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
402x_all.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
403x_all.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h
404x_all.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
405x_all.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
406x_all.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
407x_all.o: ../../include/openssl/x509_vfy.h ../cryptlib.h x_all.c
diff --git a/src/lib/libcrypto/x509/x509.h b/src/lib/libcrypto/x509/x509.h
index 092dd7450d..e6f8a40395 100644
--- a/src/lib/libcrypto/x509/x509.h
+++ b/src/lib/libcrypto/x509/x509.h
@@ -657,15 +657,11 @@ int NETSCAPE_SPKI_set_pubkey(NETSCAPE_SPKI *x, EVP_PKEY *pkey);
657 657
658int NETSCAPE_SPKI_print(BIO *out, NETSCAPE_SPKI *spki); 658int NETSCAPE_SPKI_print(BIO *out, NETSCAPE_SPKI *spki);
659 659
660int X509_signature_dump(BIO *bp,const ASN1_STRING *sig, int indent);
661int X509_signature_print(BIO *bp,X509_ALGOR *alg, ASN1_STRING *sig); 660int X509_signature_print(BIO *bp,X509_ALGOR *alg, ASN1_STRING *sig);
662 661
663int X509_sign(X509 *x, EVP_PKEY *pkey, const EVP_MD *md); 662int X509_sign(X509 *x, EVP_PKEY *pkey, const EVP_MD *md);
664int X509_sign_ctx(X509 *x, EVP_MD_CTX *ctx);
665int X509_REQ_sign(X509_REQ *x, EVP_PKEY *pkey, const EVP_MD *md); 663int X509_REQ_sign(X509_REQ *x, EVP_PKEY *pkey, const EVP_MD *md);
666int X509_REQ_sign_ctx(X509_REQ *x, EVP_MD_CTX *ctx);
667int X509_CRL_sign(X509_CRL *x, EVP_PKEY *pkey, const EVP_MD *md); 664int X509_CRL_sign(X509_CRL *x, EVP_PKEY *pkey, const EVP_MD *md);
668int X509_CRL_sign_ctx(X509_CRL *x, EVP_MD_CTX *ctx);
669int NETSCAPE_SPKI_sign(NETSCAPE_SPKI *x, EVP_PKEY *pkey, const EVP_MD *md); 665int NETSCAPE_SPKI_sign(NETSCAPE_SPKI *x, EVP_PKEY *pkey, const EVP_MD *md);
670 666
671int X509_pubkey_digest(const X509 *data,const EVP_MD *type, 667int X509_pubkey_digest(const X509 *data,const EVP_MD *type,
@@ -767,7 +763,6 @@ X509_ALGOR *X509_ALGOR_dup(X509_ALGOR *xn);
767int X509_ALGOR_set0(X509_ALGOR *alg, ASN1_OBJECT *aobj, int ptype, void *pval); 763int X509_ALGOR_set0(X509_ALGOR *alg, ASN1_OBJECT *aobj, int ptype, void *pval);
768void X509_ALGOR_get0(ASN1_OBJECT **paobj, int *pptype, void **ppval, 764void X509_ALGOR_get0(ASN1_OBJECT **paobj, int *pptype, void **ppval,
769 X509_ALGOR *algor); 765 X509_ALGOR *algor);
770void X509_ALGOR_set_md(X509_ALGOR *alg, const EVP_MD *md);
771 766
772X509_NAME *X509_NAME_dup(X509_NAME *xn); 767X509_NAME *X509_NAME_dup(X509_NAME *xn);
773X509_NAME_ENTRY *X509_NAME_ENTRY_dup(X509_NAME_ENTRY *ne); 768X509_NAME_ENTRY *X509_NAME_ENTRY_dup(X509_NAME_ENTRY *ne);
@@ -901,9 +896,6 @@ int ASN1_item_verify(const ASN1_ITEM *it, X509_ALGOR *algor1,
901int ASN1_item_sign(const ASN1_ITEM *it, X509_ALGOR *algor1, X509_ALGOR *algor2, 896int ASN1_item_sign(const ASN1_ITEM *it, X509_ALGOR *algor1, X509_ALGOR *algor2,
902 ASN1_BIT_STRING *signature, 897 ASN1_BIT_STRING *signature,
903 void *data, EVP_PKEY *pkey, const EVP_MD *type); 898 void *data, EVP_PKEY *pkey, const EVP_MD *type);
904int ASN1_item_sign_ctx(const ASN1_ITEM *it,
905 X509_ALGOR *algor1, X509_ALGOR *algor2,
906 ASN1_BIT_STRING *signature, void *asn, EVP_MD_CTX *ctx);
907#endif 899#endif
908 900
909int X509_set_version(X509 *x,long version); 901int X509_set_version(X509 *x,long version);
@@ -1169,9 +1161,6 @@ X509_ALGOR *PKCS5_pbe2_set_iv(const EVP_CIPHER *cipher, int iter,
1169 unsigned char *salt, int saltlen, 1161 unsigned char *salt, int saltlen,
1170 unsigned char *aiv, int prf_nid); 1162 unsigned char *aiv, int prf_nid);
1171 1163
1172X509_ALGOR *PKCS5_pbkdf2_set(int iter, unsigned char *salt, int saltlen,
1173 int prf_nid, int keylen);
1174
1175/* PKCS#8 utilities */ 1164/* PKCS#8 utilities */
1176 1165
1177DECLARE_ASN1_FUNCTIONS(PKCS8_PRIV_KEY_INFO) 1166DECLARE_ASN1_FUNCTIONS(PKCS8_PRIV_KEY_INFO)
diff --git a/src/lib/libcrypto/x509/x509_cmp.c b/src/lib/libcrypto/x509/x509_cmp.c
index 7c2aaee2e9..4bc9da07e0 100644
--- a/src/lib/libcrypto/x509/x509_cmp.c
+++ b/src/lib/libcrypto/x509/x509_cmp.c
@@ -87,20 +87,15 @@ unsigned long X509_issuer_and_serial_hash(X509 *a)
87 EVP_MD_CTX_init(&ctx); 87 EVP_MD_CTX_init(&ctx);
88 f=X509_NAME_oneline(a->cert_info->issuer,NULL,0); 88 f=X509_NAME_oneline(a->cert_info->issuer,NULL,0);
89 ret=strlen(f); 89 ret=strlen(f);
90 if (!EVP_DigestInit_ex(&ctx, EVP_md5(), NULL)) 90 EVP_DigestInit_ex(&ctx, EVP_md5(), NULL);
91 goto err; 91 EVP_DigestUpdate(&ctx,(unsigned char *)f,ret);
92 if (!EVP_DigestUpdate(&ctx,(unsigned char *)f,ret))
93 goto err;
94 OPENSSL_free(f); 92 OPENSSL_free(f);
95 if(!EVP_DigestUpdate(&ctx,(unsigned char *)a->cert_info->serialNumber->data, 93 EVP_DigestUpdate(&ctx,(unsigned char *)a->cert_info->serialNumber->data,
96 (unsigned long)a->cert_info->serialNumber->length)) 94 (unsigned long)a->cert_info->serialNumber->length);
97 goto err; 95 EVP_DigestFinal_ex(&ctx,&(md[0]),NULL);
98 if (!EVP_DigestFinal_ex(&ctx,&(md[0]),NULL))
99 goto err;
100 ret=( ((unsigned long)md[0] )|((unsigned long)md[1]<<8L)| 96 ret=( ((unsigned long)md[0] )|((unsigned long)md[1]<<8L)|
101 ((unsigned long)md[2]<<16L)|((unsigned long)md[3]<<24L) 97 ((unsigned long)md[2]<<16L)|((unsigned long)md[3]<<24L)
102 )&0xffffffffL; 98 )&0xffffffffL;
103 err:
104 EVP_MD_CTX_cleanup(&ctx); 99 EVP_MD_CTX_cleanup(&ctx);
105 return(ret); 100 return(ret);
106 } 101 }
@@ -224,9 +219,7 @@ unsigned long X509_NAME_hash(X509_NAME *x)
224 219
225 /* Make sure X509_NAME structure contains valid cached encoding */ 220 /* Make sure X509_NAME structure contains valid cached encoding */
226 i2d_X509_NAME(x,NULL); 221 i2d_X509_NAME(x,NULL);
227 if (!EVP_Digest(x->canon_enc, x->canon_enclen, md, NULL, EVP_sha1(), 222 EVP_Digest(x->canon_enc, x->canon_enclen, md, NULL, EVP_sha1(), NULL);
228 NULL))
229 return 0;
230 223
231 ret=( ((unsigned long)md[0] )|((unsigned long)md[1]<<8L)| 224 ret=( ((unsigned long)md[0] )|((unsigned long)md[1]<<8L)|
232 ((unsigned long)md[2]<<16L)|((unsigned long)md[3]<<24L) 225 ((unsigned long)md[2]<<16L)|((unsigned long)md[3]<<24L)
@@ -241,18 +234,12 @@ unsigned long X509_NAME_hash(X509_NAME *x)
241 234
242unsigned long X509_NAME_hash_old(X509_NAME *x) 235unsigned long X509_NAME_hash_old(X509_NAME *x)
243 { 236 {
244 EVP_MD_CTX md_ctx;
245 unsigned long ret=0; 237 unsigned long ret=0;
246 unsigned char md[16]; 238 unsigned char md[16];
247 239
248 /* Make sure X509_NAME structure contains valid cached encoding */ 240 /* Make sure X509_NAME structure contains valid cached encoding */
249 i2d_X509_NAME(x,NULL); 241 i2d_X509_NAME(x,NULL);
250 EVP_MD_CTX_init(&md_ctx); 242 EVP_Digest(x->bytes->data, x->bytes->length, md, NULL, EVP_md5(), NULL);
251 EVP_MD_CTX_set_flags(&md_ctx, EVP_MD_CTX_FLAG_NON_FIPS_ALLOW);
252 EVP_DigestInit_ex(&md_ctx, EVP_md5(), NULL);
253 EVP_DigestUpdate(&md_ctx, x->bytes->data, x->bytes->length);
254 EVP_DigestFinal_ex(&md_ctx,md,NULL);
255 EVP_MD_CTX_cleanup(&md_ctx);
256 243
257 ret=( ((unsigned long)md[0] )|((unsigned long)md[1]<<8L)| 244 ret=( ((unsigned long)md[0] )|((unsigned long)md[1]<<8L)|
258 ((unsigned long)md[2]<<16L)|((unsigned long)md[3]<<24L) 245 ((unsigned long)md[2]<<16L)|((unsigned long)md[3]<<24L)
diff --git a/src/lib/libcrypto/x509/x509_lu.c b/src/lib/libcrypto/x509/x509_lu.c
index 38525a8cdd..3a6e04a1de 100644
--- a/src/lib/libcrypto/x509/x509_lu.c
+++ b/src/lib/libcrypto/x509/x509_lu.c
@@ -87,7 +87,7 @@ void X509_LOOKUP_free(X509_LOOKUP *ctx)
87 if (ctx == NULL) return; 87 if (ctx == NULL) return;
88 if ( (ctx->method != NULL) && 88 if ( (ctx->method != NULL) &&
89 (ctx->method->free != NULL)) 89 (ctx->method->free != NULL))
90 (*ctx->method->free)(ctx); 90 ctx->method->free(ctx);
91 OPENSSL_free(ctx); 91 OPENSSL_free(ctx);
92 } 92 }
93 93
diff --git a/src/lib/libcrypto/x509/x509_vfy.c b/src/lib/libcrypto/x509/x509_vfy.c
index b0779db023..701ec565e9 100644
--- a/src/lib/libcrypto/x509/x509_vfy.c
+++ b/src/lib/libcrypto/x509/x509_vfy.c
@@ -153,6 +153,7 @@ static int x509_subject_cmp(X509 **a, X509 **b)
153int X509_verify_cert(X509_STORE_CTX *ctx) 153int X509_verify_cert(X509_STORE_CTX *ctx)
154 { 154 {
155 X509 *x,*xtmp,*chain_ss=NULL; 155 X509 *x,*xtmp,*chain_ss=NULL;
156 X509_NAME *xn;
156 int bad_chain = 0; 157 int bad_chain = 0;
157 X509_VERIFY_PARAM *param = ctx->param; 158 X509_VERIFY_PARAM *param = ctx->param;
158 int depth,i,ok=0; 159 int depth,i,ok=0;
@@ -204,6 +205,7 @@ int X509_verify_cert(X509_STORE_CTX *ctx)
204 */ 205 */
205 206
206 /* If we are self signed, we break */ 207 /* If we are self signed, we break */
208 xn=X509_get_issuer_name(x);
207 if (ctx->check_issued(ctx, x,x)) break; 209 if (ctx->check_issued(ctx, x,x)) break;
208 210
209 /* If we were passed a cert chain, use it first */ 211 /* If we were passed a cert chain, use it first */
@@ -240,6 +242,7 @@ int X509_verify_cert(X509_STORE_CTX *ctx)
240 242
241 i=sk_X509_num(ctx->chain); 243 i=sk_X509_num(ctx->chain);
242 x=sk_X509_value(ctx->chain,i-1); 244 x=sk_X509_value(ctx->chain,i-1);
245 xn = X509_get_subject_name(x);
243 if (ctx->check_issued(ctx, x, x)) 246 if (ctx->check_issued(ctx, x, x))
244 { 247 {
245 /* we have a self signed certificate */ 248 /* we have a self signed certificate */
@@ -288,6 +291,7 @@ int X509_verify_cert(X509_STORE_CTX *ctx)
288 if (depth < num) break; 291 if (depth < num) break;
289 292
290 /* If we are self signed, we break */ 293 /* If we are self signed, we break */
294 xn=X509_get_issuer_name(x);
291 if (ctx->check_issued(ctx,x,x)) break; 295 if (ctx->check_issued(ctx,x,x)) break;
292 296
293 ok = ctx->get_issuer(&xtmp, ctx, x); 297 ok = ctx->get_issuer(&xtmp, ctx, x);
@@ -306,6 +310,7 @@ int X509_verify_cert(X509_STORE_CTX *ctx)
306 } 310 }
307 311
308 /* we now have our chain, lets check it... */ 312 /* we now have our chain, lets check it... */
313 xn=X509_get_issuer_name(x);
309 314
310 /* Is last certificate looked up self signed? */ 315 /* Is last certificate looked up self signed? */
311 if (!ctx->check_issued(ctx,x,x)) 316 if (!ctx->check_issued(ctx,x,x))
diff --git a/src/lib/libcrypto/x509/x509type.c b/src/lib/libcrypto/x509/x509type.c
index 9702ec5310..3385ad3f67 100644
--- a/src/lib/libcrypto/x509/x509type.c
+++ b/src/lib/libcrypto/x509/x509type.c
@@ -100,26 +100,20 @@ int X509_certificate_type(X509 *x, EVP_PKEY *pkey)
100 break; 100 break;
101 } 101 }
102 102
103 i=OBJ_obj2nid(x->sig_alg->algorithm); 103 i=X509_get_signature_type(x);
104 if (i && OBJ_find_sigid_algs(i, NULL, &i)) 104 switch (i)
105 { 105 {
106 106 case EVP_PKEY_RSA:
107 switch (i) 107 ret|=EVP_PKS_RSA;
108 { 108 break;
109 case NID_rsaEncryption: 109 case EVP_PKEY_DSA:
110 case NID_rsa: 110 ret|=EVP_PKS_DSA;
111 ret|=EVP_PKS_RSA; 111 break;
112 break; 112 case EVP_PKEY_EC:
113 case NID_dsa: 113 ret|=EVP_PKS_EC;
114 case NID_dsa_2: 114 break;
115 ret|=EVP_PKS_DSA; 115 default:
116 break; 116 break;
117 case NID_X9_62_id_ecPublicKey:
118 ret|=EVP_PKS_EC;
119 break;
120 default:
121 break;
122 }
123 } 117 }
124 118
125 if (EVP_PKEY_size(pk) <= 1024/8)/* /8 because it's 1024 bits we look 119 if (EVP_PKEY_size(pk) <= 1024/8)/* /8 because it's 1024 bits we look
diff --git a/src/lib/libcrypto/x509/x_all.c b/src/lib/libcrypto/x509/x_all.c
index b94aeeb873..8ec88c215a 100644
--- a/src/lib/libcrypto/x509/x_all.c
+++ b/src/lib/libcrypto/x509/x_all.c
@@ -95,25 +95,12 @@ int X509_sign(X509 *x, EVP_PKEY *pkey, const EVP_MD *md)
95 x->sig_alg, x->signature, x->cert_info,pkey,md)); 95 x->sig_alg, x->signature, x->cert_info,pkey,md));
96 } 96 }
97 97
98int X509_sign_ctx(X509 *x, EVP_MD_CTX *ctx)
99 {
100 return ASN1_item_sign_ctx(ASN1_ITEM_rptr(X509_CINF),
101 x->cert_info->signature,
102 x->sig_alg, x->signature, x->cert_info, ctx);
103 }
104
105int X509_REQ_sign(X509_REQ *x, EVP_PKEY *pkey, const EVP_MD *md) 98int X509_REQ_sign(X509_REQ *x, EVP_PKEY *pkey, const EVP_MD *md)
106 { 99 {
107 return(ASN1_item_sign(ASN1_ITEM_rptr(X509_REQ_INFO),x->sig_alg, NULL, 100 return(ASN1_item_sign(ASN1_ITEM_rptr(X509_REQ_INFO),x->sig_alg, NULL,
108 x->signature, x->req_info,pkey,md)); 101 x->signature, x->req_info,pkey,md));
109 } 102 }
110 103
111int X509_REQ_sign_ctx(X509_REQ *x, EVP_MD_CTX *ctx)
112 {
113 return ASN1_item_sign_ctx(ASN1_ITEM_rptr(X509_REQ_INFO),
114 x->sig_alg, NULL, x->signature, x->req_info, ctx);
115 }
116
117int X509_CRL_sign(X509_CRL *x, EVP_PKEY *pkey, const EVP_MD *md) 104int X509_CRL_sign(X509_CRL *x, EVP_PKEY *pkey, const EVP_MD *md)
118 { 105 {
119 x->crl->enc.modified = 1; 106 x->crl->enc.modified = 1;
@@ -121,12 +108,6 @@ int X509_CRL_sign(X509_CRL *x, EVP_PKEY *pkey, const EVP_MD *md)
121 x->sig_alg, x->signature, x->crl,pkey,md)); 108 x->sig_alg, x->signature, x->crl,pkey,md));
122 } 109 }
123 110
124int X509_CRL_sign_ctx(X509_CRL *x, EVP_MD_CTX *ctx)
125 {
126 return ASN1_item_sign_ctx(ASN1_ITEM_rptr(X509_CRL_INFO),
127 x->crl->sig_alg, x->sig_alg, x->signature, x->crl, ctx);
128 }
129
130int NETSCAPE_SPKI_sign(NETSCAPE_SPKI *x, EVP_PKEY *pkey, const EVP_MD *md) 111int NETSCAPE_SPKI_sign(NETSCAPE_SPKI *x, EVP_PKEY *pkey, const EVP_MD *md)
131 { 112 {
132 return(ASN1_item_sign(ASN1_ITEM_rptr(NETSCAPE_SPKAC), x->sig_algor,NULL, 113 return(ASN1_item_sign(ASN1_ITEM_rptr(NETSCAPE_SPKAC), x->sig_algor,NULL,