diff options
author | beck <> | 2002-05-15 02:29:21 +0000 |
---|---|---|
committer | beck <> | 2002-05-15 02:29:21 +0000 |
commit | b64270d1e45fe7f3241e4c9b6ce60d5ac89bc2e9 (patch) | |
tree | fa27cf82a1250b64ed3bf5f4a18c7354d470bbcc /src/lib/libcrypto/x509v3 | |
parent | e471e1ea98d673597b182ea85f29e30c97cd08b5 (diff) | |
download | openbsd-b64270d1e45fe7f3241e4c9b6ce60d5ac89bc2e9.tar.gz openbsd-b64270d1e45fe7f3241e4c9b6ce60d5ac89bc2e9.tar.bz2 openbsd-b64270d1e45fe7f3241e4c9b6ce60d5ac89bc2e9.zip |
OpenSSL 0.9.7 stable 2002 05 08 merge
Diffstat (limited to 'src/lib/libcrypto/x509v3')
27 files changed, 1637 insertions, 1799 deletions
diff --git a/src/lib/libcrypto/x509v3/Makefile.ssl b/src/lib/libcrypto/x509v3/Makefile.ssl index 236e13af4e..8620992280 100644 --- a/src/lib/libcrypto/x509v3/Makefile.ssl +++ b/src/lib/libcrypto/x509v3/Makefile.ssl | |||
@@ -5,13 +5,14 @@ | |||
5 | DIR= x509v3 | 5 | DIR= x509v3 |
6 | TOP= ../.. | 6 | TOP= ../.. |
7 | CC= cc | 7 | CC= cc |
8 | INCLUDES= -I.. -I../../include | 8 | INCLUDES= -I.. -I$(TOP) -I../../include |
9 | CFLAG=-g | 9 | CFLAG=-g |
10 | INSTALL_PREFIX= | 10 | INSTALL_PREFIX= |
11 | OPENSSLDIR= /usr/local/ssl | 11 | OPENSSLDIR= /usr/local/ssl |
12 | INSTALLTOP=/usr/local/ssl | 12 | INSTALLTOP=/usr/local/ssl |
13 | MAKE= make -f Makefile.ssl | 13 | MAKE= make -f Makefile.ssl |
14 | MAKEDEPEND= $(TOP)/util/domd $(TOP) | 14 | MAKEDEPPROG= makedepend |
15 | MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) | ||
15 | MAKEFILE= Makefile.ssl | 16 | MAKEFILE= Makefile.ssl |
16 | AR= ar r | 17 | AR= ar r |
17 | 18 | ||
@@ -22,12 +23,14 @@ TEST= | |||
22 | APPS= | 23 | APPS= |
23 | 24 | ||
24 | LIB=$(TOP)/libcrypto.a | 25 | LIB=$(TOP)/libcrypto.a |
25 | LIBSRC= v3_bcons.c v3_bitst.c v3_conf.c v3_extku.c v3_ia5.c \ | 26 | LIBSRC= v3_bcons.c v3_bitst.c v3_conf.c v3_extku.c v3_ia5.c v3_lib.c \ |
26 | v3_lib.c v3_prn.c v3_utl.c v3err.c v3_genn.c v3_alt.c v3_skey.c v3_akey.c \ | 27 | v3_prn.c v3_utl.c v3err.c v3_genn.c v3_alt.c v3_skey.c v3_akey.c v3_pku.c \ |
27 | v3_pku.c v3_int.c v3_enum.c v3_sxnet.c v3_cpols.c v3_crld.c v3_purp.c v3_info.c | 28 | v3_int.c v3_enum.c v3_sxnet.c v3_cpols.c v3_crld.c v3_purp.c v3_info.c \ |
29 | v3_ocsp.c v3_akeya.c | ||
28 | LIBOBJ= v3_bcons.o v3_bitst.o v3_conf.o v3_extku.o v3_ia5.o v3_lib.o \ | 30 | LIBOBJ= v3_bcons.o v3_bitst.o v3_conf.o v3_extku.o v3_ia5.o v3_lib.o \ |
29 | v3_prn.o v3_utl.o v3err.o v3_genn.o v3_alt.o v3_skey.o v3_akey.o v3_pku.o \ | 31 | v3_prn.o v3_utl.o v3err.o v3_genn.o v3_alt.o v3_skey.o v3_akey.o v3_pku.o \ |
30 | v3_int.o v3_enum.o v3_sxnet.o v3_cpols.o v3_crld.o v3_purp.o v3_info.o | 32 | v3_int.o v3_enum.o v3_sxnet.o v3_cpols.o v3_crld.o v3_purp.o v3_info.o \ |
33 | v3_ocsp.o v3_akeya.o | ||
31 | 34 | ||
32 | SRC= $(LIBSRC) | 35 | SRC= $(LIBSRC) |
33 | 36 | ||
@@ -43,8 +46,7 @@ all: lib | |||
43 | 46 | ||
44 | lib: $(LIBOBJ) | 47 | lib: $(LIBOBJ) |
45 | $(AR) $(LIB) $(LIBOBJ) | 48 | $(AR) $(LIB) $(LIBOBJ) |
46 | @echo You may get an error following this line. Please ignore. | 49 | $(RANLIB) $(LIB) || echo Never mind. |
47 | - $(RANLIB) $(LIB) | ||
48 | @touch lib | 50 | @touch lib |
49 | 51 | ||
50 | files: | 52 | files: |
@@ -83,432 +85,336 @@ clean: | |||
83 | 85 | ||
84 | # DO NOT DELETE THIS LINE -- make depend depends on it. | 86 | # DO NOT DELETE THIS LINE -- make depend depends on it. |
85 | 87 | ||
86 | v3_akey.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h | 88 | v3_akey.o: ../../e_os.h ../../include/openssl/asn1.h |
87 | v3_akey.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h | 89 | v3_akey.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h |
88 | v3_akey.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | 90 | v3_akey.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h |
89 | v3_akey.o: ../../include/openssl/cast.h ../../include/openssl/conf.h | 91 | v3_akey.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h |
90 | v3_akey.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | ||
91 | v3_akey.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 92 | v3_akey.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
92 | v3_akey.o: ../../include/openssl/e_os.h ../../include/openssl/e_os.h | ||
93 | v3_akey.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 93 | v3_akey.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
94 | v3_akey.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | 94 | v3_akey.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h |
95 | v3_akey.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h | 95 | v3_akey.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
96 | v3_akey.o: ../../include/openssl/md4.h ../../include/openssl/md5.h | 96 | v3_akey.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
97 | v3_akey.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h | 97 | v3_akey.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h |
98 | v3_akey.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
99 | v3_akey.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | ||
100 | v3_akey.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | ||
101 | v3_akey.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | ||
102 | v3_akey.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 98 | v3_akey.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
103 | v3_akey.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 99 | v3_akey.o: ../../include/openssl/sha.h ../../include/openssl/stack.h |
104 | v3_akey.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | 100 | v3_akey.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h |
105 | v3_akey.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h | 101 | v3_akey.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h |
106 | v3_akey.o: ../cryptlib.h | 102 | v3_akey.o: ../cryptlib.h v3_akey.c |
107 | v3_alt.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 103 | v3_akeya.o: ../../e_os.h ../../include/openssl/asn1.h |
108 | v3_alt.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 104 | v3_akeya.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h |
109 | v3_alt.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | 105 | v3_akeya.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h |
106 | v3_akeya.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h | ||
107 | v3_akeya.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | ||
108 | v3_akeya.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | ||
109 | v3_akeya.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h | ||
110 | v3_akeya.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | ||
111 | v3_akeya.o: ../../include/openssl/opensslconf.h | ||
112 | v3_akeya.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
113 | v3_akeya.o: ../../include/openssl/pkcs7.h ../../include/openssl/rsa.h | ||
114 | v3_akeya.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | ||
115 | v3_akeya.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
116 | v3_akeya.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | ||
117 | v3_akeya.o: ../../include/openssl/x509v3.h ../cryptlib.h v3_akeya.c | ||
118 | v3_alt.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
119 | v3_alt.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | ||
110 | v3_alt.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h | 120 | v3_alt.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h |
111 | v3_alt.o: ../../include/openssl/des.h ../../include/openssl/dh.h | 121 | v3_alt.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
112 | v3_alt.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h | 122 | v3_alt.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
113 | v3_alt.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 123 | v3_alt.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h |
114 | v3_alt.o: ../../include/openssl/err.h ../../include/openssl/evp.h | ||
115 | v3_alt.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h | ||
116 | v3_alt.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
117 | v3_alt.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | ||
118 | v3_alt.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | 124 | v3_alt.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
119 | v3_alt.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 125 | v3_alt.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
120 | v3_alt.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h | 126 | v3_alt.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h |
121 | v3_alt.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 127 | v3_alt.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
122 | v3_alt.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 128 | v3_alt.o: ../../include/openssl/sha.h ../../include/openssl/stack.h |
123 | v3_alt.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 129 | v3_alt.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h |
124 | v3_alt.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | 130 | v3_alt.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h |
125 | v3_alt.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 131 | v3_alt.o: ../cryptlib.h v3_alt.c |
126 | v3_alt.o: ../../include/openssl/x509v3.h ../cryptlib.h | 132 | v3_bcons.o: ../../e_os.h ../../include/openssl/asn1.h |
127 | v3_bcons.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h | 133 | v3_bcons.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h |
128 | v3_bcons.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h | ||
129 | v3_bcons.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | 134 | v3_bcons.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h |
130 | v3_bcons.o: ../../include/openssl/cast.h ../../include/openssl/conf.h | 135 | v3_bcons.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h |
131 | v3_bcons.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | ||
132 | v3_bcons.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 136 | v3_bcons.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
133 | v3_bcons.o: ../../include/openssl/e_os.h ../../include/openssl/e_os.h | ||
134 | v3_bcons.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 137 | v3_bcons.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
135 | v3_bcons.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | 138 | v3_bcons.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h |
136 | v3_bcons.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h | 139 | v3_bcons.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
137 | v3_bcons.o: ../../include/openssl/md4.h ../../include/openssl/md5.h | 140 | v3_bcons.o: ../../include/openssl/opensslconf.h |
138 | v3_bcons.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h | 141 | v3_bcons.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h |
139 | v3_bcons.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 142 | v3_bcons.o: ../../include/openssl/pkcs7.h ../../include/openssl/rsa.h |
140 | v3_bcons.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 143 | v3_bcons.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h |
141 | v3_bcons.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 144 | v3_bcons.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h |
142 | v3_bcons.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 145 | v3_bcons.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h |
143 | v3_bcons.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 146 | v3_bcons.o: ../../include/openssl/x509v3.h ../cryptlib.h v3_bcons.c |
144 | v3_bcons.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 147 | v3_bitst.o: ../../e_os.h ../../include/openssl/asn1.h |
145 | v3_bcons.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | 148 | v3_bitst.o: ../../include/openssl/bio.h ../../include/openssl/bn.h |
146 | v3_bcons.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h | 149 | v3_bitst.o: ../../include/openssl/buffer.h ../../include/openssl/conf.h |
147 | v3_bcons.o: ../cryptlib.h | 150 | v3_bitst.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h |
148 | v3_bitst.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 151 | v3_bitst.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h |
149 | v3_bitst.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | ||
150 | v3_bitst.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | ||
151 | v3_bitst.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h | ||
152 | v3_bitst.o: ../../include/openssl/des.h ../../include/openssl/dh.h | ||
153 | v3_bitst.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h | ||
154 | v3_bitst.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | ||
155 | v3_bitst.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 152 | v3_bitst.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
156 | v3_bitst.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h | 153 | v3_bitst.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h |
157 | v3_bitst.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | 154 | v3_bitst.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h |
158 | v3_bitst.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 155 | v3_bitst.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h |
159 | v3_bitst.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | 156 | v3_bitst.o: ../../include/openssl/pkcs7.h ../../include/openssl/rsa.h |
160 | v3_bitst.o: ../../include/openssl/opensslconf.h | 157 | v3_bitst.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h |
161 | v3_bitst.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 158 | v3_bitst.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h |
162 | v3_bitst.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 159 | v3_bitst.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h |
163 | v3_bitst.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 160 | v3_bitst.o: ../../include/openssl/x509v3.h ../cryptlib.h v3_bitst.c |
164 | v3_bitst.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 161 | v3_conf.o: ../../e_os.h ../../include/openssl/asn1.h |
165 | v3_bitst.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 162 | v3_conf.o: ../../include/openssl/bio.h ../../include/openssl/bn.h |
166 | v3_bitst.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | 163 | v3_conf.o: ../../include/openssl/buffer.h ../../include/openssl/conf.h |
167 | v3_bitst.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h | 164 | v3_conf.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h |
168 | v3_bitst.o: ../cryptlib.h | 165 | v3_conf.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h |
169 | v3_conf.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
170 | v3_conf.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | ||
171 | v3_conf.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | ||
172 | v3_conf.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h | ||
173 | v3_conf.o: ../../include/openssl/des.h ../../include/openssl/dh.h | ||
174 | v3_conf.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h | ||
175 | v3_conf.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | ||
176 | v3_conf.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 166 | v3_conf.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
177 | v3_conf.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h | 167 | v3_conf.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h |
178 | v3_conf.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | 168 | v3_conf.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h |
179 | v3_conf.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 169 | v3_conf.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h |
180 | v3_conf.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | 170 | v3_conf.o: ../../include/openssl/pkcs7.h ../../include/openssl/rsa.h |
181 | v3_conf.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | ||
182 | v3_conf.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h | ||
183 | v3_conf.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | ||
184 | v3_conf.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | ||
185 | v3_conf.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 171 | v3_conf.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h |
186 | v3_conf.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | 172 | v3_conf.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h |
187 | v3_conf.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 173 | v3_conf.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h |
188 | v3_conf.o: ../../include/openssl/x509v3.h ../cryptlib.h | 174 | v3_conf.o: ../../include/openssl/x509v3.h ../cryptlib.h v3_conf.c |
189 | v3_cpols.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h | 175 | v3_cpols.o: ../../e_os.h ../../include/openssl/asn1.h |
190 | v3_cpols.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h | 176 | v3_cpols.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h |
191 | v3_cpols.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | 177 | v3_cpols.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h |
192 | v3_cpols.o: ../../include/openssl/cast.h ../../include/openssl/conf.h | 178 | v3_cpols.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h |
193 | v3_cpols.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | ||
194 | v3_cpols.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 179 | v3_cpols.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
195 | v3_cpols.o: ../../include/openssl/e_os.h ../../include/openssl/e_os.h | ||
196 | v3_cpols.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 180 | v3_cpols.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
197 | v3_cpols.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | 181 | v3_cpols.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h |
198 | v3_cpols.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h | 182 | v3_cpols.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
199 | v3_cpols.o: ../../include/openssl/md4.h ../../include/openssl/md5.h | 183 | v3_cpols.o: ../../include/openssl/opensslconf.h |
200 | v3_cpols.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h | 184 | v3_cpols.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h |
201 | v3_cpols.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 185 | v3_cpols.o: ../../include/openssl/pkcs7.h ../../include/openssl/rsa.h |
202 | v3_cpols.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 186 | v3_cpols.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h |
203 | v3_cpols.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 187 | v3_cpols.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h |
204 | v3_cpols.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 188 | v3_cpols.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h |
205 | v3_cpols.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 189 | v3_cpols.o: ../../include/openssl/x509v3.h ../cryptlib.h v3_cpols.c |
206 | v3_cpols.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 190 | v3_crld.o: ../../e_os.h ../../include/openssl/asn1.h |
207 | v3_cpols.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | 191 | v3_crld.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h |
208 | v3_cpols.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h | ||
209 | v3_cpols.o: ../cryptlib.h | ||
210 | v3_crld.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h | ||
211 | v3_crld.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h | ||
212 | v3_crld.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | 192 | v3_crld.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h |
213 | v3_crld.o: ../../include/openssl/cast.h ../../include/openssl/conf.h | 193 | v3_crld.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h |
214 | v3_crld.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | ||
215 | v3_crld.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 194 | v3_crld.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
216 | v3_crld.o: ../../include/openssl/e_os.h ../../include/openssl/e_os.h | ||
217 | v3_crld.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 195 | v3_crld.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
218 | v3_crld.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | 196 | v3_crld.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h |
219 | v3_crld.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h | 197 | v3_crld.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
220 | v3_crld.o: ../../include/openssl/md4.h ../../include/openssl/md5.h | 198 | v3_crld.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
221 | v3_crld.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h | 199 | v3_crld.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h |
222 | v3_crld.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
223 | v3_crld.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | ||
224 | v3_crld.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | ||
225 | v3_crld.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | ||
226 | v3_crld.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 200 | v3_crld.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
227 | v3_crld.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 201 | v3_crld.o: ../../include/openssl/sha.h ../../include/openssl/stack.h |
228 | v3_crld.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | 202 | v3_crld.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h |
229 | v3_crld.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h | 203 | v3_crld.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h |
230 | v3_crld.o: ../cryptlib.h | 204 | v3_crld.o: ../cryptlib.h v3_crld.c |
231 | v3_enum.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 205 | v3_enum.o: ../../e_os.h ../../include/openssl/asn1.h |
232 | v3_enum.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 206 | v3_enum.o: ../../include/openssl/bio.h ../../include/openssl/bn.h |
233 | v3_enum.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | 207 | v3_enum.o: ../../include/openssl/buffer.h ../../include/openssl/conf.h |
234 | v3_enum.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h | 208 | v3_enum.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h |
235 | v3_enum.o: ../../include/openssl/des.h ../../include/openssl/dh.h | 209 | v3_enum.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h |
236 | v3_enum.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h | ||
237 | v3_enum.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | ||
238 | v3_enum.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 210 | v3_enum.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
239 | v3_enum.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h | 211 | v3_enum.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h |
240 | v3_enum.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | 212 | v3_enum.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h |
241 | v3_enum.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 213 | v3_enum.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h |
242 | v3_enum.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | 214 | v3_enum.o: ../../include/openssl/pkcs7.h ../../include/openssl/rsa.h |
243 | v3_enum.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | ||
244 | v3_enum.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h | ||
245 | v3_enum.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | ||
246 | v3_enum.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | ||
247 | v3_enum.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 215 | v3_enum.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h |
248 | v3_enum.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | 216 | v3_enum.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h |
249 | v3_enum.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 217 | v3_enum.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h |
250 | v3_enum.o: ../../include/openssl/x509v3.h ../cryptlib.h | 218 | v3_enum.o: ../../include/openssl/x509v3.h ../cryptlib.h v3_enum.c |
251 | v3_extku.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 219 | v3_extku.o: ../../e_os.h ../../include/openssl/asn1.h |
252 | v3_extku.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 220 | v3_extku.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h |
253 | v3_extku.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | 221 | v3_extku.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h |
254 | v3_extku.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h | 222 | v3_extku.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h |
255 | v3_extku.o: ../../include/openssl/des.h ../../include/openssl/dh.h | 223 | v3_extku.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
256 | v3_extku.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h | 224 | v3_extku.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
257 | v3_extku.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 225 | v3_extku.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h |
258 | v3_extku.o: ../../include/openssl/err.h ../../include/openssl/evp.h | ||
259 | v3_extku.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h | ||
260 | v3_extku.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
261 | v3_extku.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | ||
262 | v3_extku.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | 226 | v3_extku.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
263 | v3_extku.o: ../../include/openssl/opensslconf.h | 227 | v3_extku.o: ../../include/openssl/opensslconf.h |
264 | v3_extku.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 228 | v3_extku.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h |
265 | v3_extku.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 229 | v3_extku.o: ../../include/openssl/pkcs7.h ../../include/openssl/rsa.h |
266 | v3_extku.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 230 | v3_extku.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h |
267 | v3_extku.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 231 | v3_extku.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h |
268 | v3_extku.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 232 | v3_extku.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h |
269 | v3_extku.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | 233 | v3_extku.o: ../../include/openssl/x509v3.h ../cryptlib.h v3_extku.c |
270 | v3_extku.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h | 234 | v3_genn.o: ../../e_os.h ../../include/openssl/asn1.h |
271 | v3_extku.o: ../cryptlib.h | 235 | v3_genn.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h |
272 | v3_genn.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h | ||
273 | v3_genn.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h | ||
274 | v3_genn.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | 236 | v3_genn.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h |
275 | v3_genn.o: ../../include/openssl/cast.h ../../include/openssl/conf.h | 237 | v3_genn.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h |
276 | v3_genn.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | ||
277 | v3_genn.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 238 | v3_genn.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
278 | v3_genn.o: ../../include/openssl/e_os.h ../../include/openssl/e_os.h | ||
279 | v3_genn.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 239 | v3_genn.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
280 | v3_genn.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | 240 | v3_genn.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h |
281 | v3_genn.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h | 241 | v3_genn.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
282 | v3_genn.o: ../../include/openssl/md4.h ../../include/openssl/md5.h | 242 | v3_genn.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
283 | v3_genn.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h | 243 | v3_genn.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h |
284 | v3_genn.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
285 | v3_genn.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | ||
286 | v3_genn.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | ||
287 | v3_genn.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | ||
288 | v3_genn.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 244 | v3_genn.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
289 | v3_genn.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 245 | v3_genn.o: ../../include/openssl/sha.h ../../include/openssl/stack.h |
290 | v3_genn.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | 246 | v3_genn.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h |
291 | v3_genn.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h | 247 | v3_genn.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h |
292 | v3_genn.o: ../cryptlib.h | 248 | v3_genn.o: ../cryptlib.h v3_genn.c |
293 | v3_ia5.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 249 | v3_ia5.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h |
294 | v3_ia5.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 250 | v3_ia5.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h |
295 | v3_ia5.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | ||
296 | v3_ia5.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h | 251 | v3_ia5.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h |
297 | v3_ia5.o: ../../include/openssl/des.h ../../include/openssl/dh.h | 252 | v3_ia5.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
298 | v3_ia5.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h | 253 | v3_ia5.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
299 | v3_ia5.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 254 | v3_ia5.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h |
300 | v3_ia5.o: ../../include/openssl/err.h ../../include/openssl/evp.h | ||
301 | v3_ia5.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h | ||
302 | v3_ia5.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
303 | v3_ia5.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | ||
304 | v3_ia5.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | 255 | v3_ia5.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
305 | v3_ia5.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 256 | v3_ia5.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
306 | v3_ia5.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h | 257 | v3_ia5.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h |
307 | v3_ia5.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 258 | v3_ia5.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
308 | v3_ia5.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 259 | v3_ia5.o: ../../include/openssl/sha.h ../../include/openssl/stack.h |
309 | v3_ia5.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 260 | v3_ia5.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h |
310 | v3_ia5.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | 261 | v3_ia5.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h |
311 | v3_ia5.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 262 | v3_ia5.o: ../cryptlib.h v3_ia5.c |
312 | v3_ia5.o: ../../include/openssl/x509v3.h ../cryptlib.h | 263 | v3_info.o: ../../e_os.h ../../include/openssl/asn1.h |
313 | v3_info.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h | 264 | v3_info.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h |
314 | v3_info.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h | ||
315 | v3_info.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | 265 | v3_info.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h |
316 | v3_info.o: ../../include/openssl/cast.h ../../include/openssl/conf.h | 266 | v3_info.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h |
317 | v3_info.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | ||
318 | v3_info.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 267 | v3_info.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
319 | v3_info.o: ../../include/openssl/e_os.h ../../include/openssl/e_os.h | ||
320 | v3_info.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 268 | v3_info.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
321 | v3_info.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | 269 | v3_info.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h |
322 | v3_info.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h | 270 | v3_info.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
323 | v3_info.o: ../../include/openssl/md4.h ../../include/openssl/md5.h | 271 | v3_info.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
324 | v3_info.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h | 272 | v3_info.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h |
325 | v3_info.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
326 | v3_info.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | ||
327 | v3_info.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | ||
328 | v3_info.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | ||
329 | v3_info.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 273 | v3_info.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
330 | v3_info.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 274 | v3_info.o: ../../include/openssl/sha.h ../../include/openssl/stack.h |
331 | v3_info.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | 275 | v3_info.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h |
332 | v3_info.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h | 276 | v3_info.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h |
333 | v3_info.o: ../cryptlib.h | 277 | v3_info.o: ../cryptlib.h v3_info.c |
334 | v3_int.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 278 | v3_int.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h |
335 | v3_int.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 279 | v3_int.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h |
336 | v3_int.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | ||
337 | v3_int.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h | 280 | v3_int.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h |
338 | v3_int.o: ../../include/openssl/des.h ../../include/openssl/dh.h | 281 | v3_int.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
339 | v3_int.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h | 282 | v3_int.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
340 | v3_int.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 283 | v3_int.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h |
341 | v3_int.o: ../../include/openssl/err.h ../../include/openssl/evp.h | ||
342 | v3_int.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h | ||
343 | v3_int.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
344 | v3_int.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | ||
345 | v3_int.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | 284 | v3_int.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
346 | v3_int.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 285 | v3_int.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
347 | v3_int.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h | 286 | v3_int.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h |
348 | v3_int.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 287 | v3_int.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
349 | v3_int.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 288 | v3_int.o: ../../include/openssl/sha.h ../../include/openssl/stack.h |
350 | v3_int.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 289 | v3_int.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h |
351 | v3_int.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | 290 | v3_int.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h |
352 | v3_int.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 291 | v3_int.o: ../cryptlib.h v3_int.c |
353 | v3_int.o: ../../include/openssl/x509v3.h ../cryptlib.h | 292 | v3_lib.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h |
354 | v3_lib.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 293 | v3_lib.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h |
355 | v3_lib.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | ||
356 | v3_lib.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | ||
357 | v3_lib.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h | 294 | v3_lib.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h |
358 | v3_lib.o: ../../include/openssl/des.h ../../include/openssl/dh.h | 295 | v3_lib.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
359 | v3_lib.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h | 296 | v3_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
360 | v3_lib.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 297 | v3_lib.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h |
361 | v3_lib.o: ../../include/openssl/err.h ../../include/openssl/evp.h | ||
362 | v3_lib.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h | ||
363 | v3_lib.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
364 | v3_lib.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | ||
365 | v3_lib.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | 298 | v3_lib.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
366 | v3_lib.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 299 | v3_lib.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
367 | v3_lib.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h | 300 | v3_lib.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h |
368 | v3_lib.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 301 | v3_lib.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
369 | v3_lib.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 302 | v3_lib.o: ../../include/openssl/sha.h ../../include/openssl/stack.h |
370 | v3_lib.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 303 | v3_lib.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h |
371 | v3_lib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | 304 | v3_lib.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h |
372 | v3_lib.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 305 | v3_lib.o: ../cryptlib.h ext_dat.h v3_lib.c |
373 | v3_lib.o: ../../include/openssl/x509v3.h ../cryptlib.h ext_dat.h | 306 | v3_ocsp.o: ../../e_os.h ../../include/openssl/asn1.h |
374 | v3_pku.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h | 307 | v3_ocsp.o: ../../include/openssl/bio.h ../../include/openssl/bn.h |
375 | v3_pku.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h | 308 | v3_ocsp.o: ../../include/openssl/buffer.h ../../include/openssl/conf.h |
309 | v3_ocsp.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h | ||
310 | v3_ocsp.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h | ||
311 | v3_ocsp.o: ../../include/openssl/err.h ../../include/openssl/evp.h | ||
312 | v3_ocsp.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h | ||
313 | v3_ocsp.o: ../../include/openssl/objects.h ../../include/openssl/ocsp.h | ||
314 | v3_ocsp.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | ||
315 | v3_ocsp.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h | ||
316 | v3_ocsp.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | ||
317 | v3_ocsp.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
318 | v3_ocsp.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | ||
319 | v3_ocsp.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h | ||
320 | v3_ocsp.o: ../cryptlib.h v3_ocsp.c | ||
321 | v3_pku.o: ../../e_os.h ../../include/openssl/asn1.h | ||
322 | v3_pku.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h | ||
376 | v3_pku.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | 323 | v3_pku.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h |
377 | v3_pku.o: ../../include/openssl/cast.h ../../include/openssl/conf.h | 324 | v3_pku.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h |
378 | v3_pku.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | ||
379 | v3_pku.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 325 | v3_pku.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
380 | v3_pku.o: ../../include/openssl/e_os.h ../../include/openssl/e_os.h | ||
381 | v3_pku.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 326 | v3_pku.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
382 | v3_pku.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | 327 | v3_pku.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h |
383 | v3_pku.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h | 328 | v3_pku.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
384 | v3_pku.o: ../../include/openssl/md4.h ../../include/openssl/md5.h | 329 | v3_pku.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
385 | v3_pku.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h | 330 | v3_pku.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h |
386 | v3_pku.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
387 | v3_pku.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | ||
388 | v3_pku.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | ||
389 | v3_pku.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | ||
390 | v3_pku.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 331 | v3_pku.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
391 | v3_pku.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 332 | v3_pku.o: ../../include/openssl/sha.h ../../include/openssl/stack.h |
392 | v3_pku.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | 333 | v3_pku.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h |
393 | v3_pku.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h | 334 | v3_pku.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h |
394 | v3_pku.o: ../cryptlib.h | 335 | v3_pku.o: ../cryptlib.h v3_pku.c |
395 | v3_prn.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 336 | v3_prn.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h |
396 | v3_prn.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 337 | v3_prn.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h |
397 | v3_prn.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | ||
398 | v3_prn.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h | 338 | v3_prn.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h |
399 | v3_prn.o: ../../include/openssl/des.h ../../include/openssl/dh.h | 339 | v3_prn.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
400 | v3_prn.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h | 340 | v3_prn.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
401 | v3_prn.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 341 | v3_prn.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h |
402 | v3_prn.o: ../../include/openssl/err.h ../../include/openssl/evp.h | ||
403 | v3_prn.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h | ||
404 | v3_prn.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
405 | v3_prn.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | ||
406 | v3_prn.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | 342 | v3_prn.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
407 | v3_prn.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 343 | v3_prn.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
408 | v3_prn.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h | 344 | v3_prn.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h |
409 | v3_prn.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 345 | v3_prn.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
410 | v3_prn.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 346 | v3_prn.o: ../../include/openssl/sha.h ../../include/openssl/stack.h |
411 | v3_prn.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 347 | v3_prn.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h |
412 | v3_prn.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | 348 | v3_prn.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h |
413 | v3_prn.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 349 | v3_prn.o: ../cryptlib.h v3_prn.c |
414 | v3_prn.o: ../../include/openssl/x509v3.h ../cryptlib.h | 350 | v3_purp.o: ../../e_os.h ../../include/openssl/asn1.h |
415 | v3_purp.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 351 | v3_purp.o: ../../include/openssl/bio.h ../../include/openssl/bn.h |
416 | v3_purp.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 352 | v3_purp.o: ../../include/openssl/buffer.h ../../include/openssl/conf.h |
417 | v3_purp.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | 353 | v3_purp.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h |
418 | v3_purp.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h | 354 | v3_purp.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h |
419 | v3_purp.o: ../../include/openssl/des.h ../../include/openssl/dh.h | ||
420 | v3_purp.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h | ||
421 | v3_purp.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | ||
422 | v3_purp.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 355 | v3_purp.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
423 | v3_purp.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h | 356 | v3_purp.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h |
424 | v3_purp.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | 357 | v3_purp.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h |
425 | v3_purp.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 358 | v3_purp.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h |
426 | v3_purp.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | 359 | v3_purp.o: ../../include/openssl/pkcs7.h ../../include/openssl/rsa.h |
427 | v3_purp.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | ||
428 | v3_purp.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h | ||
429 | v3_purp.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | ||
430 | v3_purp.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | ||
431 | v3_purp.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 360 | v3_purp.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h |
432 | v3_purp.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | 361 | v3_purp.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h |
433 | v3_purp.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 362 | v3_purp.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h |
434 | v3_purp.o: ../../include/openssl/x509v3.h ../cryptlib.h | 363 | v3_purp.o: ../../include/openssl/x509v3.h ../cryptlib.h v3_purp.c |
435 | v3_skey.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 364 | v3_skey.o: ../../e_os.h ../../include/openssl/asn1.h |
436 | v3_skey.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 365 | v3_skey.o: ../../include/openssl/bio.h ../../include/openssl/bn.h |
437 | v3_skey.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | 366 | v3_skey.o: ../../include/openssl/buffer.h ../../include/openssl/conf.h |
438 | v3_skey.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h | 367 | v3_skey.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h |
439 | v3_skey.o: ../../include/openssl/des.h ../../include/openssl/dh.h | 368 | v3_skey.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h |
440 | v3_skey.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h | ||
441 | v3_skey.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | ||
442 | v3_skey.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 369 | v3_skey.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
443 | v3_skey.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h | 370 | v3_skey.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h |
444 | v3_skey.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | 371 | v3_skey.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h |
445 | v3_skey.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 372 | v3_skey.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h |
446 | v3_skey.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | 373 | v3_skey.o: ../../include/openssl/pkcs7.h ../../include/openssl/rsa.h |
447 | v3_skey.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | ||
448 | v3_skey.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h | ||
449 | v3_skey.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | ||
450 | v3_skey.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | ||
451 | v3_skey.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 374 | v3_skey.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h |
452 | v3_skey.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | 375 | v3_skey.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h |
453 | v3_skey.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 376 | v3_skey.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h |
454 | v3_skey.o: ../../include/openssl/x509v3.h ../cryptlib.h | 377 | v3_skey.o: ../../include/openssl/x509v3.h ../cryptlib.h v3_skey.c |
455 | v3_sxnet.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h | 378 | v3_sxnet.o: ../../e_os.h ../../include/openssl/asn1.h |
456 | v3_sxnet.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h | 379 | v3_sxnet.o: ../../include/openssl/asn1t.h ../../include/openssl/bio.h |
457 | v3_sxnet.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | 380 | v3_sxnet.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h |
458 | v3_sxnet.o: ../../include/openssl/cast.h ../../include/openssl/conf.h | 381 | v3_sxnet.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h |
459 | v3_sxnet.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | ||
460 | v3_sxnet.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 382 | v3_sxnet.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
461 | v3_sxnet.o: ../../include/openssl/e_os.h ../../include/openssl/e_os.h | ||
462 | v3_sxnet.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 383 | v3_sxnet.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
463 | v3_sxnet.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | 384 | v3_sxnet.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h |
464 | v3_sxnet.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h | 385 | v3_sxnet.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
465 | v3_sxnet.o: ../../include/openssl/md4.h ../../include/openssl/md5.h | 386 | v3_sxnet.o: ../../include/openssl/opensslconf.h |
466 | v3_sxnet.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h | 387 | v3_sxnet.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h |
467 | v3_sxnet.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 388 | v3_sxnet.o: ../../include/openssl/pkcs7.h ../../include/openssl/rsa.h |
468 | v3_sxnet.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 389 | v3_sxnet.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h |
469 | v3_sxnet.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 390 | v3_sxnet.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h |
470 | v3_sxnet.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 391 | v3_sxnet.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h |
471 | v3_sxnet.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 392 | v3_sxnet.o: ../../include/openssl/x509v3.h ../cryptlib.h v3_sxnet.c |
472 | v3_sxnet.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 393 | v3_utl.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h |
473 | v3_sxnet.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | 394 | v3_utl.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h |
474 | v3_sxnet.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h | ||
475 | v3_sxnet.o: ../cryptlib.h | ||
476 | v3_utl.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
477 | v3_utl.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | ||
478 | v3_utl.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | ||
479 | v3_utl.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h | 395 | v3_utl.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h |
480 | v3_utl.o: ../../include/openssl/des.h ../../include/openssl/dh.h | 396 | v3_utl.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
481 | v3_utl.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h | 397 | v3_utl.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
482 | v3_utl.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 398 | v3_utl.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h |
483 | v3_utl.o: ../../include/openssl/err.h ../../include/openssl/evp.h | ||
484 | v3_utl.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h | ||
485 | v3_utl.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
486 | v3_utl.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | ||
487 | v3_utl.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | 399 | v3_utl.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
488 | v3_utl.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 400 | v3_utl.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
489 | v3_utl.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h | 401 | v3_utl.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h |
490 | v3_utl.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 402 | v3_utl.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
491 | v3_utl.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 403 | v3_utl.o: ../../include/openssl/sha.h ../../include/openssl/stack.h |
492 | v3_utl.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 404 | v3_utl.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h |
493 | v3_utl.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | 405 | v3_utl.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h |
494 | v3_utl.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 406 | v3_utl.o: ../cryptlib.h v3_utl.c |
495 | v3_utl.o: ../../include/openssl/x509v3.h ../cryptlib.h | ||
496 | v3err.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 407 | v3err.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
497 | v3err.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 408 | v3err.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h |
498 | v3err.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | ||
499 | v3err.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h | 409 | v3err.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h |
500 | v3err.o: ../../include/openssl/des.h ../../include/openssl/dh.h | 410 | v3err.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
501 | v3err.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h | ||
502 | v3err.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 411 | v3err.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
503 | v3err.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | 412 | v3err.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h |
504 | v3err.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h | 413 | v3err.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
505 | v3err.o: ../../include/openssl/md4.h ../../include/openssl/md5.h | 414 | v3err.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
506 | v3err.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h | 415 | v3err.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h |
507 | v3err.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
508 | v3err.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | ||
509 | v3err.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | ||
510 | v3err.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | ||
511 | v3err.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 416 | v3err.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
512 | v3err.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 417 | v3err.o: ../../include/openssl/sha.h ../../include/openssl/stack.h |
513 | v3err.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | 418 | v3err.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h |
514 | v3err.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h | 419 | v3err.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h |
420 | v3err.o: v3err.c | ||
diff --git a/src/lib/libcrypto/x509v3/ext_dat.h b/src/lib/libcrypto/x509v3/ext_dat.h index 801a585a52..586f116db5 100644 --- a/src/lib/libcrypto/x509v3/ext_dat.h +++ b/src/lib/libcrypto/x509v3/ext_dat.h | |||
@@ -58,9 +58,12 @@ | |||
58 | /* This file contains a table of "standard" extensions */ | 58 | /* This file contains a table of "standard" extensions */ |
59 | 59 | ||
60 | extern X509V3_EXT_METHOD v3_bcons, v3_nscert, v3_key_usage, v3_ext_ku; | 60 | extern X509V3_EXT_METHOD v3_bcons, v3_nscert, v3_key_usage, v3_ext_ku; |
61 | extern X509V3_EXT_METHOD v3_pkey_usage_period, v3_sxnet, v3_info; | 61 | extern X509V3_EXT_METHOD v3_pkey_usage_period, v3_sxnet, v3_info, v3_sinfo; |
62 | extern X509V3_EXT_METHOD v3_ns_ia5_list[], v3_alt[], v3_skey_id, v3_akey_id; | 62 | extern X509V3_EXT_METHOD v3_ns_ia5_list[], v3_alt[], v3_skey_id, v3_akey_id; |
63 | extern X509V3_EXT_METHOD v3_crl_num, v3_crl_reason, v3_cpols, v3_crld; | 63 | extern X509V3_EXT_METHOD v3_crl_num, v3_crl_reason, v3_crl_invdate, v3_cpols, v3_crld; |
64 | extern X509V3_EXT_METHOD v3_ocsp_nonce, v3_ocsp_accresp, v3_ocsp_acutoff; | ||
65 | extern X509V3_EXT_METHOD v3_ocsp_crlid, v3_ocsp_nocheck, v3_ocsp_serviceloc; | ||
66 | extern X509V3_EXT_METHOD v3_crl_hold; | ||
64 | 67 | ||
65 | /* This table will be searched using OBJ_bsearch so it *must* kept in | 68 | /* This table will be searched using OBJ_bsearch so it *must* kept in |
66 | * order of the ext_nid values. | 69 | * order of the ext_nid values. |
@@ -87,8 +90,17 @@ static X509V3_EXT_METHOD *standard_exts[] = { | |||
87 | &v3_crld, | 90 | &v3_crld, |
88 | &v3_ext_ku, | 91 | &v3_ext_ku, |
89 | &v3_crl_reason, | 92 | &v3_crl_reason, |
93 | &v3_crl_invdate, | ||
90 | &v3_sxnet, | 94 | &v3_sxnet, |
91 | &v3_info, | 95 | &v3_info, |
96 | &v3_ocsp_nonce, | ||
97 | &v3_ocsp_crlid, | ||
98 | &v3_ocsp_accresp, | ||
99 | &v3_ocsp_nocheck, | ||
100 | &v3_ocsp_acutoff, | ||
101 | &v3_ocsp_serviceloc, | ||
102 | &v3_crl_hold, | ||
103 | &v3_sinfo | ||
92 | }; | 104 | }; |
93 | 105 | ||
94 | /* Number of standard extensions */ | 106 | /* Number of standard extensions */ |
diff --git a/src/lib/libcrypto/x509v3/v3_akey.c b/src/lib/libcrypto/x509v3/v3_akey.c index 0889a18993..97e686f97a 100644 --- a/src/lib/libcrypto/x509v3/v3_akey.c +++ b/src/lib/libcrypto/x509v3/v3_akey.c | |||
@@ -60,7 +60,7 @@ | |||
60 | #include "cryptlib.h" | 60 | #include "cryptlib.h" |
61 | #include <openssl/conf.h> | 61 | #include <openssl/conf.h> |
62 | #include <openssl/asn1.h> | 62 | #include <openssl/asn1.h> |
63 | #include <openssl/asn1_mac.h> | 63 | #include <openssl/asn1t.h> |
64 | #include <openssl/x509v3.h> | 64 | #include <openssl/x509v3.h> |
65 | 65 | ||
66 | static STACK_OF(CONF_VALUE) *i2v_AUTHORITY_KEYID(X509V3_EXT_METHOD *method, | 66 | static STACK_OF(CONF_VALUE) *i2v_AUTHORITY_KEYID(X509V3_EXT_METHOD *method, |
@@ -69,72 +69,15 @@ static AUTHORITY_KEYID *v2i_AUTHORITY_KEYID(X509V3_EXT_METHOD *method, | |||
69 | X509V3_CTX *ctx, STACK_OF(CONF_VALUE) *values); | 69 | X509V3_CTX *ctx, STACK_OF(CONF_VALUE) *values); |
70 | 70 | ||
71 | X509V3_EXT_METHOD v3_akey_id = { | 71 | X509V3_EXT_METHOD v3_akey_id = { |
72 | NID_authority_key_identifier, X509V3_EXT_MULTILINE, | 72 | NID_authority_key_identifier, X509V3_EXT_MULTILINE, ASN1_ITEM_ref(AUTHORITY_KEYID), |
73 | (X509V3_EXT_NEW)AUTHORITY_KEYID_new, | 73 | 0,0,0,0, |
74 | (X509V3_EXT_FREE)AUTHORITY_KEYID_free, | 74 | 0,0, |
75 | (X509V3_EXT_D2I)d2i_AUTHORITY_KEYID, | ||
76 | (X509V3_EXT_I2D)i2d_AUTHORITY_KEYID, | ||
77 | NULL, NULL, | ||
78 | (X509V3_EXT_I2V)i2v_AUTHORITY_KEYID, | 75 | (X509V3_EXT_I2V)i2v_AUTHORITY_KEYID, |
79 | (X509V3_EXT_V2I)v2i_AUTHORITY_KEYID, | 76 | (X509V3_EXT_V2I)v2i_AUTHORITY_KEYID, |
80 | NULL,NULL, | 77 | 0,0, |
81 | NULL | 78 | NULL |
82 | }; | 79 | }; |
83 | 80 | ||
84 | |||
85 | int i2d_AUTHORITY_KEYID(AUTHORITY_KEYID *a, unsigned char **pp) | ||
86 | { | ||
87 | M_ASN1_I2D_vars(a); | ||
88 | |||
89 | M_ASN1_I2D_len_IMP_opt (a->keyid, i2d_ASN1_OCTET_STRING); | ||
90 | M_ASN1_I2D_len_IMP_opt (a->issuer, i2d_GENERAL_NAMES); | ||
91 | M_ASN1_I2D_len_IMP_opt (a->serial, i2d_ASN1_INTEGER); | ||
92 | |||
93 | M_ASN1_I2D_seq_total(); | ||
94 | |||
95 | M_ASN1_I2D_put_IMP_opt (a->keyid, i2d_ASN1_OCTET_STRING, 0); | ||
96 | M_ASN1_I2D_put_IMP_opt (a->issuer, i2d_GENERAL_NAMES, 1); | ||
97 | M_ASN1_I2D_put_IMP_opt (a->serial, i2d_ASN1_INTEGER, 2); | ||
98 | |||
99 | M_ASN1_I2D_finish(); | ||
100 | } | ||
101 | |||
102 | AUTHORITY_KEYID *AUTHORITY_KEYID_new(void) | ||
103 | { | ||
104 | AUTHORITY_KEYID *ret=NULL; | ||
105 | ASN1_CTX c; | ||
106 | M_ASN1_New_Malloc(ret, AUTHORITY_KEYID); | ||
107 | ret->keyid = NULL; | ||
108 | ret->issuer = NULL; | ||
109 | ret->serial = NULL; | ||
110 | return (ret); | ||
111 | M_ASN1_New_Error(ASN1_F_AUTHORITY_KEYID_NEW); | ||
112 | } | ||
113 | |||
114 | AUTHORITY_KEYID *d2i_AUTHORITY_KEYID(AUTHORITY_KEYID **a, unsigned char **pp, | ||
115 | long length) | ||
116 | { | ||
117 | M_ASN1_D2I_vars(a,AUTHORITY_KEYID *,AUTHORITY_KEYID_new); | ||
118 | M_ASN1_D2I_Init(); | ||
119 | M_ASN1_D2I_start_sequence(); | ||
120 | M_ASN1_D2I_get_IMP_opt (ret->keyid, d2i_ASN1_OCTET_STRING, 0, | ||
121 | V_ASN1_OCTET_STRING); | ||
122 | M_ASN1_D2I_get_IMP_opt (ret->issuer, d2i_GENERAL_NAMES, 1, | ||
123 | V_ASN1_SEQUENCE); | ||
124 | M_ASN1_D2I_get_IMP_opt (ret->serial, d2i_ASN1_INTEGER, 2, | ||
125 | V_ASN1_INTEGER); | ||
126 | M_ASN1_D2I_Finish(a, AUTHORITY_KEYID_free, ASN1_F_D2I_AUTHORITY_KEYID); | ||
127 | } | ||
128 | |||
129 | void AUTHORITY_KEYID_free(AUTHORITY_KEYID *a) | ||
130 | { | ||
131 | if (a == NULL) return; | ||
132 | M_ASN1_OCTET_STRING_free(a->keyid); | ||
133 | sk_GENERAL_NAME_pop_free(a->issuer, GENERAL_NAME_free); | ||
134 | M_ASN1_INTEGER_free (a->serial); | ||
135 | OPENSSL_free (a); | ||
136 | } | ||
137 | |||
138 | static STACK_OF(CONF_VALUE) *i2v_AUTHORITY_KEYID(X509V3_EXT_METHOD *method, | 81 | static STACK_OF(CONF_VALUE) *i2v_AUTHORITY_KEYID(X509V3_EXT_METHOD *method, |
139 | AUTHORITY_KEYID *akeyid, STACK_OF(CONF_VALUE) *extlist) | 82 | AUTHORITY_KEYID *akeyid, STACK_OF(CONF_VALUE) *extlist) |
140 | { | 83 | { |
@@ -171,7 +114,7 @@ int i; | |||
171 | CONF_VALUE *cnf; | 114 | CONF_VALUE *cnf; |
172 | ASN1_OCTET_STRING *ikeyid = NULL; | 115 | ASN1_OCTET_STRING *ikeyid = NULL; |
173 | X509_NAME *isname = NULL; | 116 | X509_NAME *isname = NULL; |
174 | STACK_OF(GENERAL_NAME) * gens = NULL; | 117 | GENERAL_NAMES * gens = NULL; |
175 | GENERAL_NAME *gen = NULL; | 118 | GENERAL_NAME *gen = NULL; |
176 | ASN1_INTEGER *serial = NULL; | 119 | ASN1_INTEGER *serial = NULL; |
177 | X509_EXTENSION *ext; | 120 | X509_EXTENSION *ext; |
@@ -192,8 +135,6 @@ for(i = 0; i < sk_CONF_VALUE_num(values); i++) { | |||
192 | } | 135 | } |
193 | } | 136 | } |
194 | 137 | ||
195 | |||
196 | |||
197 | if(!ctx || !ctx->issuer_cert) { | 138 | if(!ctx || !ctx->issuer_cert) { |
198 | if(ctx && (ctx->flags==CTX_TEST)) return AUTHORITY_KEYID_new(); | 139 | if(ctx && (ctx->flags==CTX_TEST)) return AUTHORITY_KEYID_new(); |
199 | X509V3err(X509V3_F_V2I_AUTHORITY_KEYID,X509V3_R_NO_ISSUER_CERTIFICATE); | 140 | X509V3err(X509V3_F_V2I_AUTHORITY_KEYID,X509V3_R_NO_ISSUER_CERTIFICATE); |
diff --git a/src/lib/libcrypto/x509v3/v3_akeya.c b/src/lib/libcrypto/x509v3/v3_akeya.c new file mode 100644 index 0000000000..2aafa26ba7 --- /dev/null +++ b/src/lib/libcrypto/x509v3/v3_akeya.c | |||
@@ -0,0 +1,72 @@ | |||
1 | /* v3_akey_asn1.c */ | ||
2 | /* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL | ||
3 | * project 1999. | ||
4 | */ | ||
5 | /* ==================================================================== | ||
6 | * Copyright (c) 1999 The OpenSSL Project. All rights reserved. | ||
7 | * | ||
8 | * Redistribution and use in source and binary forms, with or without | ||
9 | * modification, are permitted provided that the following conditions | ||
10 | * are met: | ||
11 | * | ||
12 | * 1. Redistributions of source code must retain the above copyright | ||
13 | * notice, this list of conditions and the following disclaimer. | ||
14 | * | ||
15 | * 2. Redistributions in binary form must reproduce the above copyright | ||
16 | * notice, this list of conditions and the following disclaimer in | ||
17 | * the documentation and/or other materials provided with the | ||
18 | * distribution. | ||
19 | * | ||
20 | * 3. All advertising materials mentioning features or use of this | ||
21 | * software must display the following acknowledgment: | ||
22 | * "This product includes software developed by the OpenSSL Project | ||
23 | * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" | ||
24 | * | ||
25 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
26 | * endorse or promote products derived from this software without | ||
27 | * prior written permission. For written permission, please contact | ||
28 | * licensing@OpenSSL.org. | ||
29 | * | ||
30 | * 5. Products derived from this software may not be called "OpenSSL" | ||
31 | * nor may "OpenSSL" appear in their names without prior written | ||
32 | * permission of the OpenSSL Project. | ||
33 | * | ||
34 | * 6. Redistributions of any form whatsoever must retain the following | ||
35 | * acknowledgment: | ||
36 | * "This product includes software developed by the OpenSSL Project | ||
37 | * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" | ||
38 | * | ||
39 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
40 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
41 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
42 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
43 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
44 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
45 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
46 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
47 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
48 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
49 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
50 | * OF THE POSSIBILITY OF SUCH DAMAGE. | ||
51 | * ==================================================================== | ||
52 | * | ||
53 | * This product includes cryptographic software written by Eric Young | ||
54 | * (eay@cryptsoft.com). This product includes software written by Tim | ||
55 | * Hudson (tjh@cryptsoft.com). | ||
56 | * | ||
57 | */ | ||
58 | |||
59 | #include <stdio.h> | ||
60 | #include "cryptlib.h" | ||
61 | #include <openssl/conf.h> | ||
62 | #include <openssl/asn1.h> | ||
63 | #include <openssl/asn1t.h> | ||
64 | #include <openssl/x509v3.h> | ||
65 | |||
66 | ASN1_SEQUENCE(AUTHORITY_KEYID) = { | ||
67 | ASN1_IMP_OPT(AUTHORITY_KEYID, keyid, ASN1_OCTET_STRING, 0), | ||
68 | ASN1_IMP_SEQUENCE_OF_OPT(AUTHORITY_KEYID, issuer, GENERAL_NAME, 1), | ||
69 | ASN1_IMP_OPT(AUTHORITY_KEYID, serial, ASN1_INTEGER, 2) | ||
70 | } ASN1_SEQUENCE_END(AUTHORITY_KEYID) | ||
71 | |||
72 | IMPLEMENT_ASN1_FUNCTIONS(AUTHORITY_KEYID) | ||
diff --git a/src/lib/libcrypto/x509v3/v3_alt.c b/src/lib/libcrypto/x509v3/v3_alt.c index 94bebcd448..0e9e7dcb4f 100644 --- a/src/lib/libcrypto/x509v3/v3_alt.c +++ b/src/lib/libcrypto/x509v3/v3_alt.c | |||
@@ -61,33 +61,28 @@ | |||
61 | #include <openssl/conf.h> | 61 | #include <openssl/conf.h> |
62 | #include <openssl/x509v3.h> | 62 | #include <openssl/x509v3.h> |
63 | 63 | ||
64 | static STACK_OF(GENERAL_NAME) *v2i_subject_alt(X509V3_EXT_METHOD *method, X509V3_CTX *ctx, STACK_OF(CONF_VALUE) *nval); | 64 | static GENERAL_NAMES *v2i_subject_alt(X509V3_EXT_METHOD *method, X509V3_CTX *ctx, STACK_OF(CONF_VALUE) *nval); |
65 | static STACK_OF(GENERAL_NAME) *v2i_issuer_alt(X509V3_EXT_METHOD *method, X509V3_CTX *ctx, STACK_OF(CONF_VALUE) *nval); | 65 | static GENERAL_NAMES *v2i_issuer_alt(X509V3_EXT_METHOD *method, X509V3_CTX *ctx, STACK_OF(CONF_VALUE) *nval); |
66 | static int copy_email(X509V3_CTX *ctx, STACK_OF(GENERAL_NAME) *gens); | 66 | static int copy_email(X509V3_CTX *ctx, GENERAL_NAMES *gens, int move_p); |
67 | static int copy_issuer(X509V3_CTX *ctx, STACK_OF(GENERAL_NAME) *gens); | 67 | static int copy_issuer(X509V3_CTX *ctx, GENERAL_NAMES *gens); |
68 | X509V3_EXT_METHOD v3_alt[] = { | 68 | X509V3_EXT_METHOD v3_alt[] = { |
69 | { NID_subject_alt_name, 0, | 69 | { NID_subject_alt_name, 0, ASN1_ITEM_ref(GENERAL_NAMES), |
70 | (X509V3_EXT_NEW)GENERAL_NAMES_new, | 70 | 0,0,0,0, |
71 | (X509V3_EXT_FREE)GENERAL_NAMES_free, | 71 | 0,0, |
72 | (X509V3_EXT_D2I)d2i_GENERAL_NAMES, | ||
73 | (X509V3_EXT_I2D)i2d_GENERAL_NAMES, | ||
74 | NULL, NULL, | ||
75 | (X509V3_EXT_I2V)i2v_GENERAL_NAMES, | 72 | (X509V3_EXT_I2V)i2v_GENERAL_NAMES, |
76 | (X509V3_EXT_V2I)v2i_subject_alt, | 73 | (X509V3_EXT_V2I)v2i_subject_alt, |
77 | NULL, NULL, NULL}, | 74 | NULL, NULL, NULL}, |
78 | { NID_issuer_alt_name, 0, | 75 | |
79 | (X509V3_EXT_NEW)GENERAL_NAMES_new, | 76 | { NID_issuer_alt_name, 0, ASN1_ITEM_ref(GENERAL_NAMES), |
80 | (X509V3_EXT_FREE)GENERAL_NAMES_free, | 77 | 0,0,0,0, |
81 | (X509V3_EXT_D2I)d2i_GENERAL_NAMES, | 78 | 0,0, |
82 | (X509V3_EXT_I2D)i2d_GENERAL_NAMES, | ||
83 | NULL, NULL, | ||
84 | (X509V3_EXT_I2V)i2v_GENERAL_NAMES, | 79 | (X509V3_EXT_I2V)i2v_GENERAL_NAMES, |
85 | (X509V3_EXT_V2I)v2i_issuer_alt, | 80 | (X509V3_EXT_V2I)v2i_issuer_alt, |
86 | NULL, NULL, NULL}, | 81 | NULL, NULL, NULL}, |
87 | }; | 82 | }; |
88 | 83 | ||
89 | STACK_OF(CONF_VALUE) *i2v_GENERAL_NAMES(X509V3_EXT_METHOD *method, | 84 | STACK_OF(CONF_VALUE) *i2v_GENERAL_NAMES(X509V3_EXT_METHOD *method, |
90 | STACK_OF(GENERAL_NAME) *gens, STACK_OF(CONF_VALUE) *ret) | 85 | GENERAL_NAMES *gens, STACK_OF(CONF_VALUE) *ret) |
91 | { | 86 | { |
92 | int i; | 87 | int i; |
93 | GENERAL_NAME *gen; | 88 | GENERAL_NAME *gen; |
@@ -102,8 +97,8 @@ STACK_OF(CONF_VALUE) *i2v_GENERAL_NAMES(X509V3_EXT_METHOD *method, | |||
102 | STACK_OF(CONF_VALUE) *i2v_GENERAL_NAME(X509V3_EXT_METHOD *method, | 97 | STACK_OF(CONF_VALUE) *i2v_GENERAL_NAME(X509V3_EXT_METHOD *method, |
103 | GENERAL_NAME *gen, STACK_OF(CONF_VALUE) *ret) | 98 | GENERAL_NAME *gen, STACK_OF(CONF_VALUE) *ret) |
104 | { | 99 | { |
105 | char oline[256]; | ||
106 | unsigned char *p; | 100 | unsigned char *p; |
101 | char oline[256]; | ||
107 | switch (gen->type) | 102 | switch (gen->type) |
108 | { | 103 | { |
109 | case GEN_OTHERNAME: | 104 | case GEN_OTHERNAME: |
@@ -154,10 +149,63 @@ STACK_OF(CONF_VALUE) *i2v_GENERAL_NAME(X509V3_EXT_METHOD *method, | |||
154 | return ret; | 149 | return ret; |
155 | } | 150 | } |
156 | 151 | ||
157 | static STACK_OF(GENERAL_NAME) *v2i_issuer_alt(X509V3_EXT_METHOD *method, | 152 | int GENERAL_NAME_print(BIO *out, GENERAL_NAME *gen) |
153 | { | ||
154 | unsigned char *p; | ||
155 | switch (gen->type) | ||
156 | { | ||
157 | case GEN_OTHERNAME: | ||
158 | BIO_printf(out, "othername:<unsupported>"); | ||
159 | break; | ||
160 | |||
161 | case GEN_X400: | ||
162 | BIO_printf(out, "X400Name:<unsupported>"); | ||
163 | break; | ||
164 | |||
165 | case GEN_EDIPARTY: | ||
166 | /* Maybe fix this: it is supported now */ | ||
167 | BIO_printf(out, "EdiPartyName:<unsupported>"); | ||
168 | break; | ||
169 | |||
170 | case GEN_EMAIL: | ||
171 | BIO_printf(out, "email:%s",gen->d.ia5->data); | ||
172 | break; | ||
173 | |||
174 | case GEN_DNS: | ||
175 | BIO_printf(out, "DNS:%s",gen->d.ia5->data); | ||
176 | break; | ||
177 | |||
178 | case GEN_URI: | ||
179 | BIO_printf(out, "URI:%s",gen->d.ia5->data); | ||
180 | break; | ||
181 | |||
182 | case GEN_DIRNAME: | ||
183 | BIO_printf(out, "DirName: "); | ||
184 | X509_NAME_print_ex(out, gen->d.dirn, 0, XN_FLAG_ONELINE); | ||
185 | break; | ||
186 | |||
187 | case GEN_IPADD: | ||
188 | p = gen->d.ip->data; | ||
189 | /* BUG: doesn't support IPV6 */ | ||
190 | if(gen->d.ip->length != 4) { | ||
191 | BIO_printf(out,"IP Address:<invalid>"); | ||
192 | break; | ||
193 | } | ||
194 | BIO_printf(out, "IP Address:%d.%d.%d.%d", p[0], p[1], p[2], p[3]); | ||
195 | break; | ||
196 | |||
197 | case GEN_RID: | ||
198 | BIO_printf(out, "Registered ID"); | ||
199 | i2a_ASN1_OBJECT(out, gen->d.rid); | ||
200 | break; | ||
201 | } | ||
202 | return 1; | ||
203 | } | ||
204 | |||
205 | static GENERAL_NAMES *v2i_issuer_alt(X509V3_EXT_METHOD *method, | ||
158 | X509V3_CTX *ctx, STACK_OF(CONF_VALUE) *nval) | 206 | X509V3_CTX *ctx, STACK_OF(CONF_VALUE) *nval) |
159 | { | 207 | { |
160 | STACK_OF(GENERAL_NAME) *gens = NULL; | 208 | GENERAL_NAMES *gens = NULL; |
161 | CONF_VALUE *cnf; | 209 | CONF_VALUE *cnf; |
162 | int i; | 210 | int i; |
163 | if(!(gens = sk_GENERAL_NAME_new_null())) { | 211 | if(!(gens = sk_GENERAL_NAME_new_null())) { |
@@ -184,9 +232,9 @@ static STACK_OF(GENERAL_NAME) *v2i_issuer_alt(X509V3_EXT_METHOD *method, | |||
184 | 232 | ||
185 | /* Append subject altname of issuer to issuer alt name of subject */ | 233 | /* Append subject altname of issuer to issuer alt name of subject */ |
186 | 234 | ||
187 | static int copy_issuer(X509V3_CTX *ctx, STACK_OF(GENERAL_NAME) *gens) | 235 | static int copy_issuer(X509V3_CTX *ctx, GENERAL_NAMES *gens) |
188 | { | 236 | { |
189 | STACK_OF(GENERAL_NAME) *ialt; | 237 | GENERAL_NAMES *ialt; |
190 | GENERAL_NAME *gen; | 238 | GENERAL_NAME *gen; |
191 | X509_EXTENSION *ext; | 239 | X509_EXTENSION *ext; |
192 | int i; | 240 | int i; |
@@ -219,10 +267,10 @@ static int copy_issuer(X509V3_CTX *ctx, STACK_OF(GENERAL_NAME) *gens) | |||
219 | 267 | ||
220 | } | 268 | } |
221 | 269 | ||
222 | static STACK_OF(GENERAL_NAME) *v2i_subject_alt(X509V3_EXT_METHOD *method, | 270 | static GENERAL_NAMES *v2i_subject_alt(X509V3_EXT_METHOD *method, |
223 | X509V3_CTX *ctx, STACK_OF(CONF_VALUE) *nval) | 271 | X509V3_CTX *ctx, STACK_OF(CONF_VALUE) *nval) |
224 | { | 272 | { |
225 | STACK_OF(GENERAL_NAME) *gens = NULL; | 273 | GENERAL_NAMES *gens = NULL; |
226 | CONF_VALUE *cnf; | 274 | CONF_VALUE *cnf; |
227 | int i; | 275 | int i; |
228 | if(!(gens = sk_GENERAL_NAME_new_null())) { | 276 | if(!(gens = sk_GENERAL_NAME_new_null())) { |
@@ -233,7 +281,10 @@ static STACK_OF(GENERAL_NAME) *v2i_subject_alt(X509V3_EXT_METHOD *method, | |||
233 | cnf = sk_CONF_VALUE_value(nval, i); | 281 | cnf = sk_CONF_VALUE_value(nval, i); |
234 | if(!name_cmp(cnf->name, "email") && cnf->value && | 282 | if(!name_cmp(cnf->name, "email") && cnf->value && |
235 | !strcmp(cnf->value, "copy")) { | 283 | !strcmp(cnf->value, "copy")) { |
236 | if(!copy_email(ctx, gens)) goto err; | 284 | if(!copy_email(ctx, gens, 0)) goto err; |
285 | } else if(!name_cmp(cnf->name, "email") && cnf->value && | ||
286 | !strcmp(cnf->value, "move")) { | ||
287 | if(!copy_email(ctx, gens, 1)) goto err; | ||
237 | } else { | 288 | } else { |
238 | GENERAL_NAME *gen; | 289 | GENERAL_NAME *gen; |
239 | if(!(gen = v2i_GENERAL_NAME(method, ctx, cnf))) | 290 | if(!(gen = v2i_GENERAL_NAME(method, ctx, cnf))) |
@@ -251,7 +302,7 @@ static STACK_OF(GENERAL_NAME) *v2i_subject_alt(X509V3_EXT_METHOD *method, | |||
251 | * GENERAL_NAMES | 302 | * GENERAL_NAMES |
252 | */ | 303 | */ |
253 | 304 | ||
254 | static int copy_email(X509V3_CTX *ctx, STACK_OF(GENERAL_NAME) *gens) | 305 | static int copy_email(X509V3_CTX *ctx, GENERAL_NAMES *gens, int move_p) |
255 | { | 306 | { |
256 | X509_NAME *nm; | 307 | X509_NAME *nm; |
257 | ASN1_IA5STRING *email = NULL; | 308 | ASN1_IA5STRING *email = NULL; |
@@ -273,6 +324,11 @@ static int copy_email(X509V3_CTX *ctx, STACK_OF(GENERAL_NAME) *gens) | |||
273 | NID_pkcs9_emailAddress, i)) >= 0) { | 324 | NID_pkcs9_emailAddress, i)) >= 0) { |
274 | ne = X509_NAME_get_entry(nm, i); | 325 | ne = X509_NAME_get_entry(nm, i); |
275 | email = M_ASN1_IA5STRING_dup(X509_NAME_ENTRY_get_data(ne)); | 326 | email = M_ASN1_IA5STRING_dup(X509_NAME_ENTRY_get_data(ne)); |
327 | if (move_p) | ||
328 | { | ||
329 | X509_NAME_delete_entry(nm, i); | ||
330 | i--; | ||
331 | } | ||
276 | if(!email || !(gen = GENERAL_NAME_new())) { | 332 | if(!email || !(gen = GENERAL_NAME_new())) { |
277 | X509V3err(X509V3_F_COPY_EMAIL,ERR_R_MALLOC_FAILURE); | 333 | X509V3err(X509V3_F_COPY_EMAIL,ERR_R_MALLOC_FAILURE); |
278 | goto err; | 334 | goto err; |
@@ -297,11 +353,11 @@ static int copy_email(X509V3_CTX *ctx, STACK_OF(GENERAL_NAME) *gens) | |||
297 | 353 | ||
298 | } | 354 | } |
299 | 355 | ||
300 | STACK_OF(GENERAL_NAME) *v2i_GENERAL_NAMES(X509V3_EXT_METHOD *method, | 356 | GENERAL_NAMES *v2i_GENERAL_NAMES(X509V3_EXT_METHOD *method, |
301 | X509V3_CTX *ctx, STACK_OF(CONF_VALUE) *nval) | 357 | X509V3_CTX *ctx, STACK_OF(CONF_VALUE) *nval) |
302 | { | 358 | { |
303 | GENERAL_NAME *gen; | 359 | GENERAL_NAME *gen; |
304 | STACK_OF(GENERAL_NAME) *gens = NULL; | 360 | GENERAL_NAMES *gens = NULL; |
305 | CONF_VALUE *cnf; | 361 | CONF_VALUE *cnf; |
306 | int i; | 362 | int i; |
307 | if(!(gens = sk_GENERAL_NAME_new_null())) { | 363 | if(!(gens = sk_GENERAL_NAME_new_null())) { |
diff --git a/src/lib/libcrypto/x509v3/v3_bcons.c b/src/lib/libcrypto/x509v3/v3_bcons.c index c576b8e955..cbb012715e 100644 --- a/src/lib/libcrypto/x509v3/v3_bcons.c +++ b/src/lib/libcrypto/x509v3/v3_bcons.c | |||
@@ -60,7 +60,7 @@ | |||
60 | #include <stdio.h> | 60 | #include <stdio.h> |
61 | #include "cryptlib.h" | 61 | #include "cryptlib.h" |
62 | #include <openssl/asn1.h> | 62 | #include <openssl/asn1.h> |
63 | #include <openssl/asn1_mac.h> | 63 | #include <openssl/asn1t.h> |
64 | #include <openssl/conf.h> | 64 | #include <openssl/conf.h> |
65 | #include <openssl/x509v3.h> | 65 | #include <openssl/x509v3.h> |
66 | 66 | ||
@@ -69,62 +69,22 @@ static BASIC_CONSTRAINTS *v2i_BASIC_CONSTRAINTS(X509V3_EXT_METHOD *method, X509V | |||
69 | 69 | ||
70 | X509V3_EXT_METHOD v3_bcons = { | 70 | X509V3_EXT_METHOD v3_bcons = { |
71 | NID_basic_constraints, 0, | 71 | NID_basic_constraints, 0, |
72 | (X509V3_EXT_NEW)BASIC_CONSTRAINTS_new, | 72 | ASN1_ITEM_ref(BASIC_CONSTRAINTS), |
73 | (X509V3_EXT_FREE)BASIC_CONSTRAINTS_free, | 73 | 0,0,0,0, |
74 | (X509V3_EXT_D2I)d2i_BASIC_CONSTRAINTS, | 74 | 0,0, |
75 | (X509V3_EXT_I2D)i2d_BASIC_CONSTRAINTS, | ||
76 | NULL, NULL, | ||
77 | (X509V3_EXT_I2V)i2v_BASIC_CONSTRAINTS, | 75 | (X509V3_EXT_I2V)i2v_BASIC_CONSTRAINTS, |
78 | (X509V3_EXT_V2I)v2i_BASIC_CONSTRAINTS, | 76 | (X509V3_EXT_V2I)v2i_BASIC_CONSTRAINTS, |
79 | NULL,NULL, | 77 | NULL,NULL, |
80 | NULL | 78 | NULL |
81 | }; | 79 | }; |
82 | 80 | ||
81 | ASN1_SEQUENCE(BASIC_CONSTRAINTS) = { | ||
82 | ASN1_OPT(BASIC_CONSTRAINTS, ca, ASN1_FBOOLEAN), | ||
83 | ASN1_OPT(BASIC_CONSTRAINTS, pathlen, ASN1_INTEGER) | ||
84 | } ASN1_SEQUENCE_END(BASIC_CONSTRAINTS) | ||
83 | 85 | ||
84 | int i2d_BASIC_CONSTRAINTS(BASIC_CONSTRAINTS *a, unsigned char **pp) | 86 | IMPLEMENT_ASN1_FUNCTIONS(BASIC_CONSTRAINTS) |
85 | { | ||
86 | M_ASN1_I2D_vars(a); | ||
87 | if(a->ca) M_ASN1_I2D_len (a->ca, i2d_ASN1_BOOLEAN); | ||
88 | M_ASN1_I2D_len (a->pathlen, i2d_ASN1_INTEGER); | ||
89 | |||
90 | M_ASN1_I2D_seq_total(); | ||
91 | |||
92 | if (a->ca) M_ASN1_I2D_put (a->ca, i2d_ASN1_BOOLEAN); | ||
93 | M_ASN1_I2D_put (a->pathlen, i2d_ASN1_INTEGER); | ||
94 | M_ASN1_I2D_finish(); | ||
95 | } | ||
96 | |||
97 | BASIC_CONSTRAINTS *BASIC_CONSTRAINTS_new(void) | ||
98 | { | ||
99 | BASIC_CONSTRAINTS *ret=NULL; | ||
100 | ASN1_CTX c; | ||
101 | M_ASN1_New_Malloc(ret, BASIC_CONSTRAINTS); | ||
102 | ret->ca = 0; | ||
103 | ret->pathlen = NULL; | ||
104 | return (ret); | ||
105 | M_ASN1_New_Error(ASN1_F_BASIC_CONSTRAINTS_NEW); | ||
106 | } | ||
107 | 87 | ||
108 | BASIC_CONSTRAINTS *d2i_BASIC_CONSTRAINTS(BASIC_CONSTRAINTS **a, | ||
109 | unsigned char **pp, long length) | ||
110 | { | ||
111 | M_ASN1_D2I_vars(a,BASIC_CONSTRAINTS *,BASIC_CONSTRAINTS_new); | ||
112 | M_ASN1_D2I_Init(); | ||
113 | M_ASN1_D2I_start_sequence(); | ||
114 | if((M_ASN1_next & (~V_ASN1_CONSTRUCTED)) == | ||
115 | (V_ASN1_UNIVERSAL|V_ASN1_BOOLEAN) ) { | ||
116 | M_ASN1_D2I_get_int (ret->ca, d2i_ASN1_BOOLEAN); | ||
117 | } | ||
118 | M_ASN1_D2I_get_opt (ret->pathlen, d2i_ASN1_INTEGER, V_ASN1_INTEGER); | ||
119 | M_ASN1_D2I_Finish(a, BASIC_CONSTRAINTS_free, ASN1_F_D2I_BASIC_CONSTRAINTS); | ||
120 | } | ||
121 | |||
122 | void BASIC_CONSTRAINTS_free(BASIC_CONSTRAINTS *a) | ||
123 | { | ||
124 | if (a == NULL) return; | ||
125 | M_ASN1_INTEGER_free (a->pathlen); | ||
126 | OPENSSL_free (a); | ||
127 | } | ||
128 | 88 | ||
129 | static STACK_OF(CONF_VALUE) *i2v_BASIC_CONSTRAINTS(X509V3_EXT_METHOD *method, | 89 | static STACK_OF(CONF_VALUE) *i2v_BASIC_CONSTRAINTS(X509V3_EXT_METHOD *method, |
130 | BASIC_CONSTRAINTS *bcons, STACK_OF(CONF_VALUE) *extlist) | 90 | BASIC_CONSTRAINTS *bcons, STACK_OF(CONF_VALUE) *extlist) |
diff --git a/src/lib/libcrypto/x509v3/v3_bitst.c b/src/lib/libcrypto/x509v3/v3_bitst.c index 0e1167d05c..16cf125562 100644 --- a/src/lib/libcrypto/x509v3/v3_bitst.c +++ b/src/lib/libcrypto/x509v3/v3_bitst.c | |||
@@ -66,6 +66,7 @@ static ASN1_BIT_STRING *v2i_ASN1_BIT_STRING(X509V3_EXT_METHOD *method, | |||
66 | static STACK_OF(CONF_VALUE) *i2v_ASN1_BIT_STRING(X509V3_EXT_METHOD *method, | 66 | static STACK_OF(CONF_VALUE) *i2v_ASN1_BIT_STRING(X509V3_EXT_METHOD *method, |
67 | ASN1_BIT_STRING *bits, | 67 | ASN1_BIT_STRING *bits, |
68 | STACK_OF(CONF_VALUE) *extlist); | 68 | STACK_OF(CONF_VALUE) *extlist); |
69 | |||
69 | static BIT_STRING_BITNAME ns_cert_type_table[] = { | 70 | static BIT_STRING_BITNAME ns_cert_type_table[] = { |
70 | {0, "SSL Client", "client"}, | 71 | {0, "SSL Client", "client"}, |
71 | {1, "SSL Server", "server"}, | 72 | {1, "SSL Server", "server"}, |
diff --git a/src/lib/libcrypto/x509v3/v3_conf.c b/src/lib/libcrypto/x509v3/v3_conf.c index bdc9c1cbc1..1a3448e121 100644 --- a/src/lib/libcrypto/x509v3/v3_conf.c +++ b/src/lib/libcrypto/x509v3/v3_conf.c | |||
@@ -68,114 +68,137 @@ | |||
68 | 68 | ||
69 | static int v3_check_critical(char **value); | 69 | static int v3_check_critical(char **value); |
70 | static int v3_check_generic(char **value); | 70 | static int v3_check_generic(char **value); |
71 | static X509_EXTENSION *do_ext_conf(LHASH *conf, X509V3_CTX *ctx, int ext_nid, int crit, char *value); | 71 | static X509_EXTENSION *do_ext_nconf(CONF *conf, X509V3_CTX *ctx, int ext_nid, int crit, char *value); |
72 | static X509_EXTENSION *v3_generic_extension(const char *ext, char *value, int crit, int type); | 72 | static X509_EXTENSION *v3_generic_extension(const char *ext, char *value, int crit, int type); |
73 | static char *conf_lhash_get_string(void *db, char *section, char *value); | 73 | static char *conf_lhash_get_string(void *db, char *section, char *value); |
74 | static STACK_OF(CONF_VALUE) *conf_lhash_get_section(void *db, char *section); | 74 | static STACK_OF(CONF_VALUE) *conf_lhash_get_section(void *db, char *section); |
75 | static X509_EXTENSION *do_ext_i2d(X509V3_EXT_METHOD *method, int ext_nid, | 75 | static X509_EXTENSION *do_ext_i2d(X509V3_EXT_METHOD *method, int ext_nid, |
76 | int crit, void *ext_struc); | 76 | int crit, void *ext_struc); |
77 | /* LHASH *conf: Config file */ | 77 | /* CONF *conf: Config file */ |
78 | /* char *name: Name */ | 78 | /* char *name: Name */ |
79 | /* char *value: Value */ | 79 | /* char *value: Value */ |
80 | X509_EXTENSION *X509V3_EXT_conf(LHASH *conf, X509V3_CTX *ctx, char *name, | 80 | X509_EXTENSION *X509V3_EXT_nconf(CONF *conf, X509V3_CTX *ctx, char *name, |
81 | char *value) | 81 | char *value) |
82 | { | 82 | { |
83 | int crit; | 83 | int crit; |
84 | int ext_type; | 84 | int ext_type; |
85 | X509_EXTENSION *ret; | 85 | X509_EXTENSION *ret; |
86 | crit = v3_check_critical(&value); | 86 | crit = v3_check_critical(&value); |
87 | if((ext_type = v3_check_generic(&value))) | 87 | if ((ext_type = v3_check_generic(&value))) |
88 | return v3_generic_extension(name, value, crit, ext_type); | 88 | return v3_generic_extension(name, value, crit, ext_type); |
89 | ret = do_ext_conf(conf, ctx, OBJ_sn2nid(name), crit, value); | 89 | ret = do_ext_nconf(conf, ctx, OBJ_sn2nid(name), crit, value); |
90 | if(!ret) { | 90 | if (!ret) |
91 | { | ||
91 | X509V3err(X509V3_F_X509V3_EXT_CONF,X509V3_R_ERROR_IN_EXTENSION); | 92 | X509V3err(X509V3_F_X509V3_EXT_CONF,X509V3_R_ERROR_IN_EXTENSION); |
92 | ERR_add_error_data(4,"name=", name, ", value=", value); | 93 | ERR_add_error_data(4,"name=", name, ", value=", value); |
93 | } | 94 | } |
94 | return ret; | 95 | return ret; |
95 | } | 96 | } |
96 | 97 | ||
97 | /* LHASH *conf: Config file */ | 98 | /* CONF *conf: Config file */ |
98 | /* char *value: Value */ | 99 | /* char *value: Value */ |
99 | X509_EXTENSION *X509V3_EXT_conf_nid(LHASH *conf, X509V3_CTX *ctx, int ext_nid, | 100 | X509_EXTENSION *X509V3_EXT_nconf_nid(CONF *conf, X509V3_CTX *ctx, int ext_nid, |
100 | char *value) | 101 | char *value) |
101 | { | 102 | { |
102 | int crit; | 103 | int crit; |
103 | int ext_type; | 104 | int ext_type; |
104 | crit = v3_check_critical(&value); | 105 | crit = v3_check_critical(&value); |
105 | if((ext_type = v3_check_generic(&value))) | 106 | if ((ext_type = v3_check_generic(&value))) |
106 | return v3_generic_extension(OBJ_nid2sn(ext_nid), | 107 | return v3_generic_extension(OBJ_nid2sn(ext_nid), |
107 | value, crit, ext_type); | 108 | value, crit, ext_type); |
108 | return do_ext_conf(conf, ctx, ext_nid, crit, value); | 109 | return do_ext_nconf(conf, ctx, ext_nid, crit, value); |
109 | } | 110 | } |
110 | 111 | ||
111 | /* LHASH *conf: Config file */ | 112 | /* CONF *conf: Config file */ |
112 | /* char *value: Value */ | 113 | /* char *value: Value */ |
113 | static X509_EXTENSION *do_ext_conf(LHASH *conf, X509V3_CTX *ctx, int ext_nid, | 114 | static X509_EXTENSION *do_ext_nconf(CONF *conf, X509V3_CTX *ctx, int ext_nid, |
114 | int crit, char *value) | 115 | int crit, char *value) |
115 | { | 116 | { |
116 | X509V3_EXT_METHOD *method; | 117 | X509V3_EXT_METHOD *method; |
117 | X509_EXTENSION *ext; | 118 | X509_EXTENSION *ext; |
118 | STACK_OF(CONF_VALUE) *nval; | 119 | STACK_OF(CONF_VALUE) *nval; |
119 | void *ext_struc; | 120 | void *ext_struc; |
120 | if(ext_nid == NID_undef) { | 121 | if (ext_nid == NID_undef) |
122 | { | ||
121 | X509V3err(X509V3_F_DO_EXT_CONF,X509V3_R_UNKNOWN_EXTENSION_NAME); | 123 | X509V3err(X509V3_F_DO_EXT_CONF,X509V3_R_UNKNOWN_EXTENSION_NAME); |
122 | return NULL; | 124 | return NULL; |
123 | } | 125 | } |
124 | if(!(method = X509V3_EXT_get_nid(ext_nid))) { | 126 | if (!(method = X509V3_EXT_get_nid(ext_nid))) |
127 | { | ||
125 | X509V3err(X509V3_F_DO_EXT_CONF,X509V3_R_UNKNOWN_EXTENSION); | 128 | X509V3err(X509V3_F_DO_EXT_CONF,X509V3_R_UNKNOWN_EXTENSION); |
126 | return NULL; | 129 | return NULL; |
127 | } | 130 | } |
128 | /* Now get internal extension representation based on type */ | 131 | /* Now get internal extension representation based on type */ |
129 | if(method->v2i) { | 132 | if (method->v2i) |
130 | if(*value == '@') nval = CONF_get_section(conf, value + 1); | 133 | { |
134 | if(*value == '@') nval = NCONF_get_section(conf, value + 1); | ||
131 | else nval = X509V3_parse_list(value); | 135 | else nval = X509V3_parse_list(value); |
132 | if(!nval) { | 136 | if(!nval) |
137 | { | ||
133 | X509V3err(X509V3_F_X509V3_EXT_CONF,X509V3_R_INVALID_EXTENSION_STRING); | 138 | X509V3err(X509V3_F_X509V3_EXT_CONF,X509V3_R_INVALID_EXTENSION_STRING); |
134 | ERR_add_error_data(4, "name=", OBJ_nid2sn(ext_nid), ",section=", value); | 139 | ERR_add_error_data(4, "name=", OBJ_nid2sn(ext_nid), ",section=", value); |
135 | return NULL; | 140 | return NULL; |
136 | } | 141 | } |
137 | ext_struc = method->v2i(method, ctx, nval); | 142 | ext_struc = method->v2i(method, ctx, nval); |
138 | if(*value != '@') sk_CONF_VALUE_pop_free(nval, | 143 | if(*value != '@') sk_CONF_VALUE_pop_free(nval, |
139 | X509V3_conf_free); | 144 | X509V3_conf_free); |
140 | if(!ext_struc) return NULL; | 145 | if(!ext_struc) return NULL; |
141 | } else if(method->s2i) { | 146 | } |
147 | else if(method->s2i) | ||
148 | { | ||
142 | if(!(ext_struc = method->s2i(method, ctx, value))) return NULL; | 149 | if(!(ext_struc = method->s2i(method, ctx, value))) return NULL; |
143 | } else if(method->r2i) { | 150 | } |
144 | if(!ctx->db) { | 151 | else if(method->r2i) |
152 | { | ||
153 | if(!ctx->db) | ||
154 | { | ||
145 | X509V3err(X509V3_F_X509V3_EXT_CONF,X509V3_R_NO_CONFIG_DATABASE); | 155 | X509V3err(X509V3_F_X509V3_EXT_CONF,X509V3_R_NO_CONFIG_DATABASE); |
146 | return NULL; | 156 | return NULL; |
147 | } | 157 | } |
148 | if(!(ext_struc = method->r2i(method, ctx, value))) return NULL; | 158 | if(!(ext_struc = method->r2i(method, ctx, value))) return NULL; |
149 | } else { | 159 | } |
160 | else | ||
161 | { | ||
150 | X509V3err(X509V3_F_X509V3_EXT_CONF,X509V3_R_EXTENSION_SETTING_NOT_SUPPORTED); | 162 | X509V3err(X509V3_F_X509V3_EXT_CONF,X509V3_R_EXTENSION_SETTING_NOT_SUPPORTED); |
151 | ERR_add_error_data(2, "name=", OBJ_nid2sn(ext_nid)); | 163 | ERR_add_error_data(2, "name=", OBJ_nid2sn(ext_nid)); |
152 | return NULL; | 164 | return NULL; |
153 | } | 165 | } |
154 | 166 | ||
155 | ext = do_ext_i2d(method, ext_nid, crit, ext_struc); | 167 | ext = do_ext_i2d(method, ext_nid, crit, ext_struc); |
156 | method->ext_free(ext_struc); | 168 | if(method->it) ASN1_item_free(ext_struc, ASN1_ITEM_ptr(method->it)); |
169 | else method->ext_free(ext_struc); | ||
157 | return ext; | 170 | return ext; |
158 | 171 | ||
159 | } | 172 | } |
160 | 173 | ||
161 | static X509_EXTENSION *do_ext_i2d(X509V3_EXT_METHOD *method, int ext_nid, | 174 | static X509_EXTENSION *do_ext_i2d(X509V3_EXT_METHOD *method, int ext_nid, |
162 | int crit, void *ext_struc) | 175 | int crit, void *ext_struc) |
163 | { | 176 | { |
164 | unsigned char *ext_der, *p; | 177 | unsigned char *ext_der; |
165 | int ext_len; | 178 | int ext_len; |
166 | ASN1_OCTET_STRING *ext_oct; | 179 | ASN1_OCTET_STRING *ext_oct; |
167 | X509_EXTENSION *ext; | 180 | X509_EXTENSION *ext; |
168 | /* Convert internal representation to DER */ | 181 | /* Convert internal representation to DER */ |
169 | ext_len = method->i2d(ext_struc, NULL); | 182 | if (method->it) |
170 | if(!(ext_der = OPENSSL_malloc(ext_len))) goto merr; | 183 | { |
171 | p = ext_der; | 184 | ext_der = NULL; |
172 | method->i2d(ext_struc, &p); | 185 | ext_len = ASN1_item_i2d(ext_struc, &ext_der, ASN1_ITEM_ptr(method->it)); |
173 | if(!(ext_oct = M_ASN1_OCTET_STRING_new())) goto merr; | 186 | if (ext_len < 0) goto merr; |
187 | } | ||
188 | else | ||
189 | { | ||
190 | unsigned char *p; | ||
191 | ext_len = method->i2d(ext_struc, NULL); | ||
192 | if(!(ext_der = OPENSSL_malloc(ext_len))) goto merr; | ||
193 | p = ext_der; | ||
194 | method->i2d(ext_struc, &p); | ||
195 | } | ||
196 | if (!(ext_oct = M_ASN1_OCTET_STRING_new())) goto merr; | ||
174 | ext_oct->data = ext_der; | 197 | ext_oct->data = ext_der; |
175 | ext_oct->length = ext_len; | 198 | ext_oct->length = ext_len; |
176 | 199 | ||
177 | ext = X509_EXTENSION_create_by_NID(NULL, ext_nid, crit, ext_oct); | 200 | ext = X509_EXTENSION_create_by_NID(NULL, ext_nid, crit, ext_oct); |
178 | if(!ext) goto merr; | 201 | if (!ext) goto merr; |
179 | M_ASN1_OCTET_STRING_free(ext_oct); | 202 | M_ASN1_OCTET_STRING_free(ext_oct); |
180 | 203 | ||
181 | return ext; | 204 | return ext; |
@@ -184,14 +207,14 @@ static X509_EXTENSION *do_ext_i2d(X509V3_EXT_METHOD *method, int ext_nid, | |||
184 | X509V3err(X509V3_F_DO_EXT_I2D,ERR_R_MALLOC_FAILURE); | 207 | X509V3err(X509V3_F_DO_EXT_I2D,ERR_R_MALLOC_FAILURE); |
185 | return NULL; | 208 | return NULL; |
186 | 209 | ||
187 | } | 210 | } |
188 | 211 | ||
189 | /* Given an internal structure, nid and critical flag create an extension */ | 212 | /* Given an internal structure, nid and critical flag create an extension */ |
190 | 213 | ||
191 | X509_EXTENSION *X509V3_EXT_i2d(int ext_nid, int crit, void *ext_struc) | 214 | X509_EXTENSION *X509V3_EXT_i2d(int ext_nid, int crit, void *ext_struc) |
192 | { | 215 | { |
193 | X509V3_EXT_METHOD *method; | 216 | X509V3_EXT_METHOD *method; |
194 | if(!(method = X509V3_EXT_get_nid(ext_nid))) { | 217 | if (!(method = X509V3_EXT_get_nid(ext_nid))) { |
195 | X509V3err(X509V3_F_X509V3_EXT_I2D,X509V3_R_UNKNOWN_EXTENSION); | 218 | X509V3err(X509V3_F_X509V3_EXT_I2D,X509V3_R_UNKNOWN_EXTENSION); |
196 | return NULL; | 219 | return NULL; |
197 | } | 220 | } |
@@ -202,7 +225,7 @@ X509_EXTENSION *X509V3_EXT_i2d(int ext_nid, int crit, void *ext_struc) | |||
202 | static int v3_check_critical(char **value) | 225 | static int v3_check_critical(char **value) |
203 | { | 226 | { |
204 | char *p = *value; | 227 | char *p = *value; |
205 | if((strlen(p) < 9) || strncmp(p, "critical,", 9)) return 0; | 228 | if ((strlen(p) < 9) || strncmp(p, "critical,", 9)) return 0; |
206 | p+=9; | 229 | p+=9; |
207 | while(isspace((unsigned char)*p)) p++; | 230 | while(isspace((unsigned char)*p)) p++; |
208 | *value = p; | 231 | *value = p; |
@@ -213,9 +236,9 @@ static int v3_check_critical(char **value) | |||
213 | static int v3_check_generic(char **value) | 236 | static int v3_check_generic(char **value) |
214 | { | 237 | { |
215 | char *p = *value; | 238 | char *p = *value; |
216 | if((strlen(p) < 4) || strncmp(p, "DER:,", 4)) return 0; | 239 | if ((strlen(p) < 4) || strncmp(p, "DER:,", 4)) return 0; |
217 | p+=4; | 240 | p+=4; |
218 | while(isspace((unsigned char)*p)) p++; | 241 | while (isspace((unsigned char)*p)) p++; |
219 | *value = p; | 242 | *value = p; |
220 | return 1; | 243 | return 1; |
221 | } | 244 | } |
@@ -223,148 +246,202 @@ static int v3_check_generic(char **value) | |||
223 | /* Create a generic extension: for now just handle DER type */ | 246 | /* Create a generic extension: for now just handle DER type */ |
224 | static X509_EXTENSION *v3_generic_extension(const char *ext, char *value, | 247 | static X509_EXTENSION *v3_generic_extension(const char *ext, char *value, |
225 | int crit, int type) | 248 | int crit, int type) |
226 | { | 249 | { |
227 | unsigned char *ext_der=NULL; | 250 | unsigned char *ext_der=NULL; |
228 | long ext_len; | 251 | long ext_len; |
229 | ASN1_OBJECT *obj=NULL; | 252 | ASN1_OBJECT *obj=NULL; |
230 | ASN1_OCTET_STRING *oct=NULL; | 253 | ASN1_OCTET_STRING *oct=NULL; |
231 | X509_EXTENSION *extension=NULL; | 254 | X509_EXTENSION *extension=NULL; |
232 | if(!(obj = OBJ_txt2obj(ext, 0))) { | 255 | if (!(obj = OBJ_txt2obj(ext, 0))) |
233 | X509V3err(X509V3_F_V3_GENERIC_EXTENSION,X509V3_R_EXTENSION_NAME_ERROR); | 256 | { |
234 | ERR_add_error_data(2, "name=", ext); | 257 | X509V3err(X509V3_F_V3_GENERIC_EXTENSION,X509V3_R_EXTENSION_NAME_ERROR); |
235 | goto err; | 258 | ERR_add_error_data(2, "name=", ext); |
236 | } | 259 | goto err; |
260 | } | ||
237 | 261 | ||
238 | if(!(ext_der = string_to_hex(value, &ext_len))) { | 262 | if (!(ext_der = string_to_hex(value, &ext_len))) |
239 | X509V3err(X509V3_F_V3_GENERIC_EXTENSION,X509V3_R_EXTENSION_VALUE_ERROR); | 263 | { |
240 | ERR_add_error_data(2, "value=", value); | 264 | X509V3err(X509V3_F_V3_GENERIC_EXTENSION,X509V3_R_EXTENSION_VALUE_ERROR); |
241 | goto err; | 265 | ERR_add_error_data(2, "value=", value); |
242 | } | 266 | goto err; |
267 | } | ||
243 | 268 | ||
244 | if(!(oct = M_ASN1_OCTET_STRING_new())) { | 269 | if (!(oct = M_ASN1_OCTET_STRING_new())) |
245 | X509V3err(X509V3_F_V3_GENERIC_EXTENSION,ERR_R_MALLOC_FAILURE); | 270 | { |
246 | goto err; | 271 | X509V3err(X509V3_F_V3_GENERIC_EXTENSION,ERR_R_MALLOC_FAILURE); |
247 | } | 272 | goto err; |
273 | } | ||
248 | 274 | ||
249 | oct->data = ext_der; | 275 | oct->data = ext_der; |
250 | oct->length = ext_len; | 276 | oct->length = ext_len; |
251 | ext_der = NULL; | 277 | ext_der = NULL; |
252 | 278 | ||
253 | extension = X509_EXTENSION_create_by_OBJ(NULL, obj, crit, oct); | 279 | extension = X509_EXTENSION_create_by_OBJ(NULL, obj, crit, oct); |
254 | 280 | ||
255 | err: | 281 | err: |
256 | ASN1_OBJECT_free(obj); | 282 | ASN1_OBJECT_free(obj); |
257 | M_ASN1_OCTET_STRING_free(oct); | 283 | M_ASN1_OCTET_STRING_free(oct); |
258 | if(ext_der) OPENSSL_free(ext_der); | 284 | if(ext_der) OPENSSL_free(ext_der); |
259 | return extension; | 285 | return extension; |
260 | } | 286 | |
287 | } | ||
261 | 288 | ||
262 | 289 | ||
263 | /* This is the main function: add a bunch of extensions based on a config file | 290 | /* This is the main function: add a bunch of extensions based on a config file |
264 | * section | 291 | * section to an extension STACK. |
265 | */ | 292 | */ |
266 | 293 | ||
267 | int X509V3_EXT_add_conf(LHASH *conf, X509V3_CTX *ctx, char *section, | 294 | |
268 | X509 *cert) | 295 | int X509V3_EXT_add_nconf_sk(CONF *conf, X509V3_CTX *ctx, char *section, |
269 | { | 296 | STACK_OF(X509_EXTENSION) **sk) |
297 | { | ||
270 | X509_EXTENSION *ext; | 298 | X509_EXTENSION *ext; |
271 | STACK_OF(CONF_VALUE) *nval; | 299 | STACK_OF(CONF_VALUE) *nval; |
272 | CONF_VALUE *val; | 300 | CONF_VALUE *val; |
273 | int i; | 301 | int i; |
274 | if(!(nval = CONF_get_section(conf, section))) return 0; | 302 | if (!(nval = NCONF_get_section(conf, section))) return 0; |
275 | for(i = 0; i < sk_CONF_VALUE_num(nval); i++) { | 303 | for (i = 0; i < sk_CONF_VALUE_num(nval); i++) |
304 | { | ||
276 | val = sk_CONF_VALUE_value(nval, i); | 305 | val = sk_CONF_VALUE_value(nval, i); |
277 | if(!(ext = X509V3_EXT_conf(conf, ctx, val->name, val->value))) | 306 | if (!(ext = X509V3_EXT_nconf(conf, ctx, val->name, val->value))) |
278 | return 0; | 307 | return 0; |
279 | if(cert) X509_add_ext(cert, ext, -1); | 308 | if (sk) X509v3_add_ext(sk, ext, -1); |
280 | X509_EXTENSION_free(ext); | 309 | X509_EXTENSION_free(ext); |
281 | } | 310 | } |
282 | return 1; | 311 | return 1; |
283 | } | 312 | } |
313 | |||
314 | /* Convenience functions to add extensions to a certificate, CRL and request */ | ||
315 | |||
316 | int X509V3_EXT_add_nconf(CONF *conf, X509V3_CTX *ctx, char *section, | ||
317 | X509 *cert) | ||
318 | { | ||
319 | STACK_OF(X509_EXTENSION) **sk = NULL; | ||
320 | if (cert) | ||
321 | sk = &cert->cert_info->extensions; | ||
322 | return X509V3_EXT_add_nconf_sk(conf, ctx, section, sk); | ||
323 | } | ||
284 | 324 | ||
285 | /* Same as above but for a CRL */ | 325 | /* Same as above but for a CRL */ |
286 | 326 | ||
287 | int X509V3_EXT_CRL_add_conf(LHASH *conf, X509V3_CTX *ctx, char *section, | 327 | int X509V3_EXT_CRL_add_nconf(CONF *conf, X509V3_CTX *ctx, char *section, |
288 | X509_CRL *crl) | 328 | X509_CRL *crl) |
289 | { | 329 | { |
290 | X509_EXTENSION *ext; | 330 | STACK_OF(X509_EXTENSION) **sk = NULL; |
291 | STACK_OF(CONF_VALUE) *nval; | 331 | if (crl) |
292 | CONF_VALUE *val; | 332 | sk = &crl->crl->extensions; |
293 | int i; | 333 | return X509V3_EXT_add_nconf_sk(conf, ctx, section, sk); |
294 | if(!(nval = CONF_get_section(conf, section))) return 0; | ||
295 | for(i = 0; i < sk_CONF_VALUE_num(nval); i++) { | ||
296 | val = sk_CONF_VALUE_value(nval, i); | ||
297 | if(!(ext = X509V3_EXT_conf(conf, ctx, val->name, val->value))) | ||
298 | return 0; | ||
299 | if(crl) X509_CRL_add_ext(crl, ext, -1); | ||
300 | X509_EXTENSION_free(ext); | ||
301 | } | 334 | } |
302 | return 1; | ||
303 | } | ||
304 | 335 | ||
305 | /* Add extensions to certificate request */ | 336 | /* Add extensions to certificate request */ |
306 | 337 | ||
307 | int X509V3_EXT_REQ_add_conf(LHASH *conf, X509V3_CTX *ctx, char *section, | 338 | int X509V3_EXT_REQ_add_nconf(CONF *conf, X509V3_CTX *ctx, char *section, |
308 | X509_REQ *req) | 339 | X509_REQ *req) |
309 | { | 340 | { |
310 | X509_EXTENSION *ext; | 341 | STACK_OF(X509_EXTENSION) *extlist = NULL, **sk = NULL; |
311 | STACK_OF(X509_EXTENSION) *extlist = NULL; | ||
312 | STACK_OF(CONF_VALUE) *nval; | ||
313 | CONF_VALUE *val; | ||
314 | int i; | 342 | int i; |
315 | if(!(nval = CONF_get_section(conf, section))) return 0; | 343 | if (req) |
316 | for(i = 0; i < sk_CONF_VALUE_num(nval); i++) { | 344 | sk = &extlist; |
317 | val = sk_CONF_VALUE_value(nval, i); | 345 | i = X509V3_EXT_add_nconf_sk(conf, ctx, section, sk); |
318 | if(!(ext = X509V3_EXT_conf(conf, ctx, val->name, val->value))) | 346 | if (!i || !sk) |
319 | return 0; | 347 | return i; |
320 | if(!extlist) extlist = sk_X509_EXTENSION_new_null(); | 348 | i = X509_REQ_add_extensions(req, extlist); |
321 | sk_X509_EXTENSION_push(extlist, ext); | ||
322 | } | ||
323 | if(req) i = X509_REQ_add_extensions(req, extlist); | ||
324 | else i = 1; | ||
325 | sk_X509_EXTENSION_pop_free(extlist, X509_EXTENSION_free); | 349 | sk_X509_EXTENSION_pop_free(extlist, X509_EXTENSION_free); |
326 | return i; | 350 | return i; |
327 | } | 351 | } |
328 | 352 | ||
329 | /* Config database functions */ | 353 | /* Config database functions */ |
330 | 354 | ||
331 | char * X509V3_get_string(X509V3_CTX *ctx, char *name, char *section) | 355 | char * X509V3_get_string(X509V3_CTX *ctx, char *name, char *section) |
332 | { | 356 | { |
333 | if(ctx->db_meth->get_string) | 357 | if (ctx->db_meth->get_string) |
334 | return ctx->db_meth->get_string(ctx->db, name, section); | 358 | return ctx->db_meth->get_string(ctx->db, name, section); |
335 | return NULL; | 359 | return NULL; |
336 | } | 360 | } |
337 | 361 | ||
338 | STACK_OF(CONF_VALUE) * X509V3_get_section(X509V3_CTX *ctx, char *section) | 362 | STACK_OF(CONF_VALUE) * X509V3_get_section(X509V3_CTX *ctx, char *section) |
339 | { | 363 | { |
340 | if(ctx->db_meth->get_section) | 364 | if (ctx->db_meth->get_section) |
341 | return ctx->db_meth->get_section(ctx->db, section); | 365 | return ctx->db_meth->get_section(ctx->db, section); |
342 | return NULL; | 366 | return NULL; |
343 | } | 367 | } |
344 | 368 | ||
345 | void X509V3_string_free(X509V3_CTX *ctx, char *str) | 369 | void X509V3_string_free(X509V3_CTX *ctx, char *str) |
346 | { | 370 | { |
347 | if(!str) return; | 371 | if (!str) return; |
348 | if(ctx->db_meth->free_string) | 372 | if (ctx->db_meth->free_string) |
349 | ctx->db_meth->free_string(ctx->db, str); | 373 | ctx->db_meth->free_string(ctx->db, str); |
350 | } | 374 | } |
351 | 375 | ||
352 | void X509V3_section_free(X509V3_CTX *ctx, STACK_OF(CONF_VALUE) *section) | 376 | void X509V3_section_free(X509V3_CTX *ctx, STACK_OF(CONF_VALUE) *section) |
353 | { | 377 | { |
354 | if(!section) return; | 378 | if (!section) return; |
355 | if(ctx->db_meth->free_section) | 379 | if (ctx->db_meth->free_section) |
356 | ctx->db_meth->free_section(ctx->db, section); | 380 | ctx->db_meth->free_section(ctx->db, section); |
357 | } | 381 | } |
382 | |||
383 | static char *nconf_get_string(void *db, char *section, char *value) | ||
384 | { | ||
385 | return NCONF_get_string(db, section, value); | ||
386 | } | ||
387 | |||
388 | static STACK_OF(CONF_VALUE) *nconf_get_section(void *db, char *section) | ||
389 | { | ||
390 | return NCONF_get_section(db, section); | ||
391 | } | ||
392 | |||
393 | static X509V3_CONF_METHOD nconf_method = { | ||
394 | nconf_get_string, | ||
395 | nconf_get_section, | ||
396 | NULL, | ||
397 | NULL | ||
398 | }; | ||
399 | |||
400 | void X509V3_set_nconf(X509V3_CTX *ctx, CONF *conf) | ||
401 | { | ||
402 | ctx->db_meth = &nconf_method; | ||
403 | ctx->db = conf; | ||
404 | } | ||
405 | |||
406 | void X509V3_set_ctx(X509V3_CTX *ctx, X509 *issuer, X509 *subj, X509_REQ *req, | ||
407 | X509_CRL *crl, int flags) | ||
408 | { | ||
409 | ctx->issuer_cert = issuer; | ||
410 | ctx->subject_cert = subj; | ||
411 | ctx->crl = crl; | ||
412 | ctx->subject_req = req; | ||
413 | ctx->flags = flags; | ||
414 | } | ||
415 | |||
416 | /* Old conf compatibility functions */ | ||
417 | |||
418 | X509_EXTENSION *X509V3_EXT_conf(LHASH *conf, X509V3_CTX *ctx, char *name, | ||
419 | char *value) | ||
420 | { | ||
421 | CONF ctmp; | ||
422 | CONF_set_nconf(&ctmp, conf); | ||
423 | return X509V3_EXT_nconf(&ctmp, ctx, name, value); | ||
424 | } | ||
425 | |||
426 | /* LHASH *conf: Config file */ | ||
427 | /* char *value: Value */ | ||
428 | X509_EXTENSION *X509V3_EXT_conf_nid(LHASH *conf, X509V3_CTX *ctx, int ext_nid, | ||
429 | char *value) | ||
430 | { | ||
431 | CONF ctmp; | ||
432 | CONF_set_nconf(&ctmp, conf); | ||
433 | return X509V3_EXT_nconf_nid(&ctmp, ctx, ext_nid, value); | ||
434 | } | ||
358 | 435 | ||
359 | static char *conf_lhash_get_string(void *db, char *section, char *value) | 436 | static char *conf_lhash_get_string(void *db, char *section, char *value) |
360 | { | 437 | { |
361 | return CONF_get_string(db, section, value); | 438 | return CONF_get_string(db, section, value); |
362 | } | 439 | } |
363 | 440 | ||
364 | static STACK_OF(CONF_VALUE) *conf_lhash_get_section(void *db, char *section) | 441 | static STACK_OF(CONF_VALUE) *conf_lhash_get_section(void *db, char *section) |
365 | { | 442 | { |
366 | return CONF_get_section(db, section); | 443 | return CONF_get_section(db, section); |
367 | } | 444 | } |
368 | 445 | ||
369 | static X509V3_CONF_METHOD conf_lhash_method = { | 446 | static X509V3_CONF_METHOD conf_lhash_method = { |
370 | conf_lhash_get_string, | 447 | conf_lhash_get_string, |
@@ -374,17 +451,35 @@ NULL | |||
374 | }; | 451 | }; |
375 | 452 | ||
376 | void X509V3_set_conf_lhash(X509V3_CTX *ctx, LHASH *lhash) | 453 | void X509V3_set_conf_lhash(X509V3_CTX *ctx, LHASH *lhash) |
377 | { | 454 | { |
378 | ctx->db_meth = &conf_lhash_method; | 455 | ctx->db_meth = &conf_lhash_method; |
379 | ctx->db = lhash; | 456 | ctx->db = lhash; |
380 | } | 457 | } |
381 | 458 | ||
382 | void X509V3_set_ctx(X509V3_CTX *ctx, X509 *issuer, X509 *subj, X509_REQ *req, | 459 | int X509V3_EXT_add_conf(LHASH *conf, X509V3_CTX *ctx, char *section, |
383 | X509_CRL *crl, int flags) | 460 | X509 *cert) |
384 | { | 461 | { |
385 | ctx->issuer_cert = issuer; | 462 | CONF ctmp; |
386 | ctx->subject_cert = subj; | 463 | CONF_set_nconf(&ctmp, conf); |
387 | ctx->crl = crl; | 464 | return X509V3_EXT_add_nconf(&ctmp, ctx, section, cert); |
388 | ctx->subject_req = req; | 465 | } |
389 | ctx->flags = flags; | 466 | |
390 | } | 467 | /* Same as above but for a CRL */ |
468 | |||
469 | int X509V3_EXT_CRL_add_conf(LHASH *conf, X509V3_CTX *ctx, char *section, | ||
470 | X509_CRL *crl) | ||
471 | { | ||
472 | CONF ctmp; | ||
473 | CONF_set_nconf(&ctmp, conf); | ||
474 | return X509V3_EXT_CRL_add_nconf(&ctmp, ctx, section, crl); | ||
475 | } | ||
476 | |||
477 | /* Add extensions to certificate request */ | ||
478 | |||
479 | int X509V3_EXT_REQ_add_conf(LHASH *conf, X509V3_CTX *ctx, char *section, | ||
480 | X509_REQ *req) | ||
481 | { | ||
482 | CONF ctmp; | ||
483 | CONF_set_nconf(&ctmp, conf); | ||
484 | return X509V3_EXT_REQ_add_nconf(&ctmp, ctx, section, req); | ||
485 | } | ||
diff --git a/src/lib/libcrypto/x509v3/v3_cpols.c b/src/lib/libcrypto/x509v3/v3_cpols.c index 8203ed7571..0d4ab1f680 100644 --- a/src/lib/libcrypto/x509v3/v3_cpols.c +++ b/src/lib/libcrypto/x509v3/v3_cpols.c | |||
@@ -60,7 +60,7 @@ | |||
60 | #include "cryptlib.h" | 60 | #include "cryptlib.h" |
61 | #include <openssl/conf.h> | 61 | #include <openssl/conf.h> |
62 | #include <openssl/asn1.h> | 62 | #include <openssl/asn1.h> |
63 | #include <openssl/asn1_mac.h> | 63 | #include <openssl/asn1t.h> |
64 | #include <openssl/x509v3.h> | 64 | #include <openssl/x509v3.h> |
65 | 65 | ||
66 | /* Certificate policies extension support: this one is a bit complex... */ | 66 | /* Certificate policies extension support: this one is a bit complex... */ |
@@ -76,18 +76,55 @@ static POLICYQUALINFO *notice_section(X509V3_CTX *ctx, | |||
76 | static STACK_OF(ASN1_INTEGER) *nref_nos(STACK_OF(CONF_VALUE) *nos); | 76 | static STACK_OF(ASN1_INTEGER) *nref_nos(STACK_OF(CONF_VALUE) *nos); |
77 | 77 | ||
78 | X509V3_EXT_METHOD v3_cpols = { | 78 | X509V3_EXT_METHOD v3_cpols = { |
79 | NID_certificate_policies, 0, | 79 | NID_certificate_policies, 0,ASN1_ITEM_ref(CERTIFICATEPOLICIES), |
80 | (X509V3_EXT_NEW)CERTIFICATEPOLICIES_new, | 80 | 0,0,0,0, |
81 | (X509V3_EXT_FREE)CERTIFICATEPOLICIES_free, | 81 | 0,0, |
82 | (X509V3_EXT_D2I)d2i_CERTIFICATEPOLICIES, | 82 | 0,0, |
83 | (X509V3_EXT_I2D)i2d_CERTIFICATEPOLICIES, | ||
84 | NULL, NULL, | ||
85 | NULL, NULL, | ||
86 | (X509V3_EXT_I2R)i2r_certpol, | 83 | (X509V3_EXT_I2R)i2r_certpol, |
87 | (X509V3_EXT_R2I)r2i_certpol, | 84 | (X509V3_EXT_R2I)r2i_certpol, |
88 | NULL | 85 | NULL |
89 | }; | 86 | }; |
90 | 87 | ||
88 | ASN1_ITEM_TEMPLATE(CERTIFICATEPOLICIES) = | ||
89 | ASN1_EX_TEMPLATE_TYPE(ASN1_TFLG_SEQUENCE_OF, 0, CERTIFICATEPOLICIES, POLICYINFO) | ||
90 | ASN1_ITEM_TEMPLATE_END(CERTIFICATEPOLICIES) | ||
91 | |||
92 | IMPLEMENT_ASN1_FUNCTIONS(CERTIFICATEPOLICIES) | ||
93 | |||
94 | ASN1_SEQUENCE(POLICYINFO) = { | ||
95 | ASN1_SIMPLE(POLICYINFO, policyid, ASN1_OBJECT), | ||
96 | ASN1_SEQUENCE_OF_OPT(POLICYINFO, qualifiers, POLICYQUALINFO) | ||
97 | } ASN1_SEQUENCE_END(POLICYINFO) | ||
98 | |||
99 | IMPLEMENT_ASN1_FUNCTIONS(POLICYINFO) | ||
100 | |||
101 | ASN1_ADB_TEMPLATE(policydefault) = ASN1_SIMPLE(POLICYQUALINFO, d.other, ASN1_ANY); | ||
102 | |||
103 | ASN1_ADB(POLICYQUALINFO) = { | ||
104 | ADB_ENTRY(NID_id_qt_cps, ASN1_SIMPLE(POLICYQUALINFO, d.cpsuri, ASN1_IA5STRING)), | ||
105 | ADB_ENTRY(NID_id_qt_unotice, ASN1_SIMPLE(POLICYQUALINFO, d.usernotice, USERNOTICE)) | ||
106 | } ASN1_ADB_END(POLICYQUALINFO, 0, pqualid, 0, &policydefault_tt, NULL); | ||
107 | |||
108 | ASN1_SEQUENCE(POLICYQUALINFO) = { | ||
109 | ASN1_SIMPLE(POLICYQUALINFO, pqualid, ASN1_OBJECT), | ||
110 | ASN1_ADB_OBJECT(POLICYQUALINFO) | ||
111 | } ASN1_SEQUENCE_END(POLICYQUALINFO) | ||
112 | |||
113 | IMPLEMENT_ASN1_FUNCTIONS(POLICYQUALINFO) | ||
114 | |||
115 | ASN1_SEQUENCE(USERNOTICE) = { | ||
116 | ASN1_OPT(USERNOTICE, noticeref, NOTICEREF), | ||
117 | ASN1_OPT(USERNOTICE, exptext, DISPLAYTEXT) | ||
118 | } ASN1_SEQUENCE_END(USERNOTICE) | ||
119 | |||
120 | IMPLEMENT_ASN1_FUNCTIONS(USERNOTICE) | ||
121 | |||
122 | ASN1_SEQUENCE(NOTICEREF) = { | ||
123 | ASN1_SIMPLE(NOTICEREF, organization, DISPLAYTEXT), | ||
124 | ASN1_SEQUENCE_OF(NOTICEREF, noticenos, ASN1_INTEGER) | ||
125 | } ASN1_SEQUENCE_END(NOTICEREF) | ||
126 | |||
127 | IMPLEMENT_ASN1_FUNCTIONS(NOTICEREF) | ||
91 | 128 | ||
92 | static STACK_OF(POLICYINFO) *r2i_certpol(X509V3_EXT_METHOD *method, | 129 | static STACK_OF(POLICYINFO) *r2i_certpol(X509V3_EXT_METHOD *method, |
93 | X509V3_CTX *ctx, char *value) | 130 | X509V3_CTX *ctx, char *value) |
@@ -327,83 +364,6 @@ static int i2r_certpol(X509V3_EXT_METHOD *method, STACK_OF(POLICYINFO) *pol, | |||
327 | return 1; | 364 | return 1; |
328 | } | 365 | } |
329 | 366 | ||
330 | |||
331 | int i2d_CERTIFICATEPOLICIES(STACK_OF(POLICYINFO) *a, unsigned char **pp) | ||
332 | { | ||
333 | |||
334 | return i2d_ASN1_SET_OF_POLICYINFO(a, pp, i2d_POLICYINFO, V_ASN1_SEQUENCE, | ||
335 | V_ASN1_UNIVERSAL, IS_SEQUENCE);} | ||
336 | |||
337 | STACK_OF(POLICYINFO) *CERTIFICATEPOLICIES_new(void) | ||
338 | { | ||
339 | return sk_POLICYINFO_new_null(); | ||
340 | } | ||
341 | |||
342 | void CERTIFICATEPOLICIES_free(STACK_OF(POLICYINFO) *a) | ||
343 | { | ||
344 | sk_POLICYINFO_pop_free(a, POLICYINFO_free); | ||
345 | } | ||
346 | |||
347 | STACK_OF(POLICYINFO) *d2i_CERTIFICATEPOLICIES(STACK_OF(POLICYINFO) **a, | ||
348 | unsigned char **pp,long length) | ||
349 | { | ||
350 | return d2i_ASN1_SET_OF_POLICYINFO(a, pp, length, d2i_POLICYINFO, | ||
351 | POLICYINFO_free, V_ASN1_SEQUENCE, V_ASN1_UNIVERSAL); | ||
352 | |||
353 | } | ||
354 | |||
355 | IMPLEMENT_STACK_OF(POLICYINFO) | ||
356 | IMPLEMENT_ASN1_SET_OF(POLICYINFO) | ||
357 | |||
358 | int i2d_POLICYINFO(POLICYINFO *a, unsigned char **pp) | ||
359 | { | ||
360 | M_ASN1_I2D_vars(a); | ||
361 | |||
362 | M_ASN1_I2D_len (a->policyid, i2d_ASN1_OBJECT); | ||
363 | M_ASN1_I2D_len_SEQUENCE_type(POLICYQUALINFO, a->qualifiers, | ||
364 | i2d_POLICYQUALINFO); | ||
365 | |||
366 | M_ASN1_I2D_seq_total(); | ||
367 | |||
368 | M_ASN1_I2D_put (a->policyid, i2d_ASN1_OBJECT); | ||
369 | M_ASN1_I2D_put_SEQUENCE_type(POLICYQUALINFO, a->qualifiers, | ||
370 | i2d_POLICYQUALINFO); | ||
371 | |||
372 | M_ASN1_I2D_finish(); | ||
373 | } | ||
374 | |||
375 | POLICYINFO *POLICYINFO_new(void) | ||
376 | { | ||
377 | POLICYINFO *ret=NULL; | ||
378 | ASN1_CTX c; | ||
379 | M_ASN1_New_Malloc(ret, POLICYINFO); | ||
380 | ret->policyid = NULL; | ||
381 | ret->qualifiers = NULL; | ||
382 | return (ret); | ||
383 | M_ASN1_New_Error(ASN1_F_POLICYINFO_NEW); | ||
384 | } | ||
385 | |||
386 | POLICYINFO *d2i_POLICYINFO(POLICYINFO **a, unsigned char **pp,long length) | ||
387 | { | ||
388 | M_ASN1_D2I_vars(a,POLICYINFO *,POLICYINFO_new); | ||
389 | M_ASN1_D2I_Init(); | ||
390 | M_ASN1_D2I_start_sequence(); | ||
391 | M_ASN1_D2I_get(ret->policyid, d2i_ASN1_OBJECT); | ||
392 | if(!M_ASN1_D2I_end_sequence()) { | ||
393 | M_ASN1_D2I_get_seq_type (POLICYQUALINFO, ret->qualifiers, | ||
394 | d2i_POLICYQUALINFO, POLICYQUALINFO_free); | ||
395 | } | ||
396 | M_ASN1_D2I_Finish(a, POLICYINFO_free, ASN1_F_D2I_POLICYINFO); | ||
397 | } | ||
398 | |||
399 | void POLICYINFO_free(POLICYINFO *a) | ||
400 | { | ||
401 | if (a == NULL) return; | ||
402 | ASN1_OBJECT_free(a->policyid); | ||
403 | sk_POLICYQUALINFO_pop_free(a->qualifiers, POLICYQUALINFO_free); | ||
404 | OPENSSL_free (a); | ||
405 | } | ||
406 | |||
407 | static void print_qualifiers(BIO *out, STACK_OF(POLICYQUALINFO) *quals, | 367 | static void print_qualifiers(BIO *out, STACK_OF(POLICYQUALINFO) *quals, |
408 | int indent) | 368 | int indent) |
409 | { | 369 | { |
@@ -459,202 +419,4 @@ static void print_notice(BIO *out, USERNOTICE *notice, int indent) | |||
459 | BIO_printf(out, "%*sExplicit Text: %s\n", indent, "", | 419 | BIO_printf(out, "%*sExplicit Text: %s\n", indent, "", |
460 | notice->exptext->data); | 420 | notice->exptext->data); |
461 | } | 421 | } |
462 | |||
463 | |||
464 | |||
465 | int i2d_POLICYQUALINFO(POLICYQUALINFO *a, unsigned char **pp) | ||
466 | { | ||
467 | M_ASN1_I2D_vars(a); | ||
468 | |||
469 | M_ASN1_I2D_len (a->pqualid, i2d_ASN1_OBJECT); | ||
470 | switch(OBJ_obj2nid(a->pqualid)) { | ||
471 | case NID_id_qt_cps: | ||
472 | M_ASN1_I2D_len(a->d.cpsuri, i2d_ASN1_IA5STRING); | ||
473 | break; | ||
474 | |||
475 | case NID_id_qt_unotice: | ||
476 | M_ASN1_I2D_len(a->d.usernotice, i2d_USERNOTICE); | ||
477 | break; | ||
478 | |||
479 | default: | ||
480 | M_ASN1_I2D_len(a->d.other, i2d_ASN1_TYPE); | ||
481 | break; | ||
482 | } | ||
483 | |||
484 | M_ASN1_I2D_seq_total(); | ||
485 | |||
486 | M_ASN1_I2D_put (a->pqualid, i2d_ASN1_OBJECT); | ||
487 | switch(OBJ_obj2nid(a->pqualid)) { | ||
488 | case NID_id_qt_cps: | ||
489 | M_ASN1_I2D_put(a->d.cpsuri, i2d_ASN1_IA5STRING); | ||
490 | break; | ||
491 | |||
492 | case NID_id_qt_unotice: | ||
493 | M_ASN1_I2D_put(a->d.usernotice, i2d_USERNOTICE); | ||
494 | break; | ||
495 | |||
496 | default: | ||
497 | M_ASN1_I2D_put(a->d.other, i2d_ASN1_TYPE); | ||
498 | break; | ||
499 | } | ||
500 | |||
501 | M_ASN1_I2D_finish(); | ||
502 | } | ||
503 | |||
504 | POLICYQUALINFO *POLICYQUALINFO_new(void) | ||
505 | { | ||
506 | POLICYQUALINFO *ret=NULL; | ||
507 | ASN1_CTX c; | ||
508 | M_ASN1_New_Malloc(ret, POLICYQUALINFO); | ||
509 | ret->pqualid = NULL; | ||
510 | ret->d.other = NULL; | ||
511 | return (ret); | ||
512 | M_ASN1_New_Error(ASN1_F_POLICYQUALINFO_NEW); | ||
513 | } | ||
514 | |||
515 | POLICYQUALINFO *d2i_POLICYQUALINFO(POLICYQUALINFO **a, unsigned char **pp, | ||
516 | long length) | ||
517 | { | ||
518 | M_ASN1_D2I_vars(a,POLICYQUALINFO *,POLICYQUALINFO_new); | ||
519 | M_ASN1_D2I_Init(); | ||
520 | M_ASN1_D2I_start_sequence(); | ||
521 | M_ASN1_D2I_get (ret->pqualid, d2i_ASN1_OBJECT); | ||
522 | switch(OBJ_obj2nid(ret->pqualid)) { | ||
523 | case NID_id_qt_cps: | ||
524 | M_ASN1_D2I_get(ret->d.cpsuri, d2i_ASN1_IA5STRING); | ||
525 | break; | ||
526 | |||
527 | case NID_id_qt_unotice: | ||
528 | M_ASN1_D2I_get(ret->d.usernotice, d2i_USERNOTICE); | ||
529 | break; | ||
530 | |||
531 | default: | ||
532 | M_ASN1_D2I_get(ret->d.other, d2i_ASN1_TYPE); | ||
533 | break; | ||
534 | } | ||
535 | M_ASN1_D2I_Finish(a, POLICYQUALINFO_free, ASN1_F_D2I_POLICYQUALINFO); | ||
536 | } | ||
537 | |||
538 | void POLICYQUALINFO_free(POLICYQUALINFO *a) | ||
539 | { | ||
540 | if (a == NULL) return; | ||
541 | switch(OBJ_obj2nid(a->pqualid)) { | ||
542 | case NID_id_qt_cps: | ||
543 | M_ASN1_IA5STRING_free(a->d.cpsuri); | ||
544 | break; | ||
545 | |||
546 | case NID_id_qt_unotice: | ||
547 | USERNOTICE_free(a->d.usernotice); | ||
548 | break; | ||
549 | |||
550 | default: | ||
551 | ASN1_TYPE_free(a->d.other); | ||
552 | break; | ||
553 | } | ||
554 | |||
555 | ASN1_OBJECT_free(a->pqualid); | ||
556 | OPENSSL_free (a); | ||
557 | } | ||
558 | |||
559 | int i2d_USERNOTICE(USERNOTICE *a, unsigned char **pp) | ||
560 | { | ||
561 | M_ASN1_I2D_vars(a); | ||
562 | |||
563 | M_ASN1_I2D_len (a->noticeref, i2d_NOTICEREF); | ||
564 | M_ASN1_I2D_len (a->exptext, i2d_DISPLAYTEXT); | ||
565 | |||
566 | M_ASN1_I2D_seq_total(); | ||
567 | |||
568 | M_ASN1_I2D_put (a->noticeref, i2d_NOTICEREF); | ||
569 | M_ASN1_I2D_put (a->exptext, i2d_DISPLAYTEXT); | ||
570 | |||
571 | M_ASN1_I2D_finish(); | ||
572 | } | ||
573 | |||
574 | USERNOTICE *USERNOTICE_new(void) | ||
575 | { | ||
576 | USERNOTICE *ret=NULL; | ||
577 | ASN1_CTX c; | ||
578 | M_ASN1_New_Malloc(ret, USERNOTICE); | ||
579 | ret->noticeref = NULL; | ||
580 | ret->exptext = NULL; | ||
581 | return (ret); | ||
582 | M_ASN1_New_Error(ASN1_F_USERNOTICE_NEW); | ||
583 | } | ||
584 | |||
585 | USERNOTICE *d2i_USERNOTICE(USERNOTICE **a, unsigned char **pp,long length) | ||
586 | { | ||
587 | M_ASN1_D2I_vars(a,USERNOTICE *,USERNOTICE_new); | ||
588 | M_ASN1_D2I_Init(); | ||
589 | M_ASN1_D2I_start_sequence(); | ||
590 | M_ASN1_D2I_get_opt(ret->noticeref, d2i_NOTICEREF, V_ASN1_SEQUENCE); | ||
591 | if (!M_ASN1_D2I_end_sequence()) { | ||
592 | M_ASN1_D2I_get(ret->exptext, d2i_DISPLAYTEXT); | ||
593 | } | ||
594 | M_ASN1_D2I_Finish(a, USERNOTICE_free, ASN1_F_D2I_USERNOTICE); | ||
595 | } | ||
596 | |||
597 | void USERNOTICE_free(USERNOTICE *a) | ||
598 | { | ||
599 | if (a == NULL) return; | ||
600 | NOTICEREF_free(a->noticeref); | ||
601 | M_DISPLAYTEXT_free(a->exptext); | ||
602 | OPENSSL_free (a); | ||
603 | } | ||
604 | |||
605 | int i2d_NOTICEREF(NOTICEREF *a, unsigned char **pp) | ||
606 | { | ||
607 | M_ASN1_I2D_vars(a); | ||
608 | |||
609 | M_ASN1_I2D_len (a->organization, i2d_DISPLAYTEXT); | ||
610 | M_ASN1_I2D_len_SEQUENCE_type(ASN1_INTEGER, a->noticenos, | ||
611 | i2d_ASN1_INTEGER); | ||
612 | |||
613 | M_ASN1_I2D_seq_total(); | ||
614 | |||
615 | M_ASN1_I2D_put (a->organization, i2d_DISPLAYTEXT); | ||
616 | M_ASN1_I2D_put_SEQUENCE_type(ASN1_INTEGER, a->noticenos, | ||
617 | i2d_ASN1_INTEGER); | ||
618 | |||
619 | M_ASN1_I2D_finish(); | ||
620 | } | ||
621 | |||
622 | NOTICEREF *NOTICEREF_new(void) | ||
623 | { | ||
624 | NOTICEREF *ret=NULL; | ||
625 | ASN1_CTX c; | ||
626 | M_ASN1_New_Malloc(ret, NOTICEREF); | ||
627 | ret->organization = NULL; | ||
628 | ret->noticenos = NULL; | ||
629 | return (ret); | ||
630 | M_ASN1_New_Error(ASN1_F_NOTICEREF_NEW); | ||
631 | } | ||
632 | |||
633 | NOTICEREF *d2i_NOTICEREF(NOTICEREF **a, unsigned char **pp,long length) | ||
634 | { | ||
635 | M_ASN1_D2I_vars(a,NOTICEREF *,NOTICEREF_new); | ||
636 | M_ASN1_D2I_Init(); | ||
637 | M_ASN1_D2I_start_sequence(); | ||
638 | /* This is to cope with some broken encodings that use IA5STRING for | ||
639 | * the organization field | ||
640 | */ | ||
641 | M_ASN1_D2I_get_opt(ret->organization, d2i_ASN1_IA5STRING, | ||
642 | V_ASN1_IA5STRING); | ||
643 | if(!ret->organization) { | ||
644 | M_ASN1_D2I_get(ret->organization, d2i_DISPLAYTEXT); | ||
645 | } | ||
646 | M_ASN1_D2I_get_seq_type(ASN1_INTEGER, ret->noticenos, d2i_ASN1_INTEGER, | ||
647 | ASN1_STRING_free); | ||
648 | M_ASN1_D2I_Finish(a, NOTICEREF_free, ASN1_F_D2I_NOTICEREF); | ||
649 | } | ||
650 | |||
651 | void NOTICEREF_free(NOTICEREF *a) | ||
652 | { | ||
653 | if (a == NULL) return; | ||
654 | M_DISPLAYTEXT_free(a->organization); | ||
655 | sk_ASN1_INTEGER_pop_free(a->noticenos, ASN1_STRING_free); | ||
656 | OPENSSL_free (a); | ||
657 | } | ||
658 | 422 | ||
659 | IMPLEMENT_STACK_OF(POLICYQUALINFO) | ||
660 | IMPLEMENT_ASN1_SET_OF(POLICYQUALINFO) | ||
diff --git a/src/lib/libcrypto/x509v3/v3_crld.c b/src/lib/libcrypto/x509v3/v3_crld.c index 67feea4017..894a8b94d8 100644 --- a/src/lib/libcrypto/x509v3/v3_crld.c +++ b/src/lib/libcrypto/x509v3/v3_crld.c | |||
@@ -60,7 +60,7 @@ | |||
60 | #include "cryptlib.h" | 60 | #include "cryptlib.h" |
61 | #include <openssl/conf.h> | 61 | #include <openssl/conf.h> |
62 | #include <openssl/asn1.h> | 62 | #include <openssl/asn1.h> |
63 | #include <openssl/asn1_mac.h> | 63 | #include <openssl/asn1t.h> |
64 | #include <openssl/x509v3.h> | 64 | #include <openssl/x509v3.h> |
65 | 65 | ||
66 | static STACK_OF(CONF_VALUE) *i2v_crld(X509V3_EXT_METHOD *method, | 66 | static STACK_OF(CONF_VALUE) *i2v_crld(X509V3_EXT_METHOD *method, |
@@ -69,15 +69,13 @@ static STACK_OF(DIST_POINT) *v2i_crld(X509V3_EXT_METHOD *method, | |||
69 | X509V3_CTX *ctx, STACK_OF(CONF_VALUE) *nval); | 69 | X509V3_CTX *ctx, STACK_OF(CONF_VALUE) *nval); |
70 | 70 | ||
71 | X509V3_EXT_METHOD v3_crld = { | 71 | X509V3_EXT_METHOD v3_crld = { |
72 | NID_crl_distribution_points, X509V3_EXT_MULTILINE, | 72 | NID_crl_distribution_points, X509V3_EXT_MULTILINE, ASN1_ITEM_ref(CRL_DIST_POINTS), |
73 | (X509V3_EXT_NEW)CRL_DIST_POINTS_new, | 73 | 0,0,0,0, |
74 | (X509V3_EXT_FREE)CRL_DIST_POINTS_free, | 74 | 0,0, |
75 | (X509V3_EXT_D2I)d2i_CRL_DIST_POINTS, | ||
76 | (X509V3_EXT_I2D)i2d_CRL_DIST_POINTS, | ||
77 | NULL, NULL, | ||
78 | (X509V3_EXT_I2V)i2v_crld, | 75 | (X509V3_EXT_I2V)i2v_crld, |
79 | (X509V3_EXT_V2I)v2i_crld, | 76 | (X509V3_EXT_V2I)v2i_crld, |
80 | NULL, NULL, NULL | 77 | 0,0, |
78 | NULL | ||
81 | }; | 79 | }; |
82 | 80 | ||
83 | static STACK_OF(CONF_VALUE) *i2v_crld(X509V3_EXT_METHOD *method, | 81 | static STACK_OF(CONF_VALUE) *i2v_crld(X509V3_EXT_METHOD *method, |
@@ -87,16 +85,16 @@ static STACK_OF(CONF_VALUE) *i2v_crld(X509V3_EXT_METHOD *method, | |||
87 | int i; | 85 | int i; |
88 | for(i = 0; i < sk_DIST_POINT_num(crld); i++) { | 86 | for(i = 0; i < sk_DIST_POINT_num(crld); i++) { |
89 | point = sk_DIST_POINT_value(crld, i); | 87 | point = sk_DIST_POINT_value(crld, i); |
90 | if(point->distpoint && point->distpoint->fullname) { | 88 | if(point->distpoint) { |
91 | exts = i2v_GENERAL_NAMES(NULL, | 89 | if(point->distpoint->type == 0) |
92 | point->distpoint->fullname, exts); | 90 | exts = i2v_GENERAL_NAMES(NULL, |
91 | point->distpoint->name.fullname, exts); | ||
92 | else X509V3_add_value("RelativeName","<UNSUPPORTED>", &exts); | ||
93 | } | 93 | } |
94 | if(point->reasons) | 94 | if(point->reasons) |
95 | X509V3_add_value("reasons","<UNSUPPORTED>", &exts); | 95 | X509V3_add_value("reasons","<UNSUPPORTED>", &exts); |
96 | if(point->CRLissuer) | 96 | if(point->CRLissuer) |
97 | X509V3_add_value("CRLissuer","<UNSUPPORTED>", &exts); | 97 | X509V3_add_value("CRLissuer","<UNSUPPORTED>", &exts); |
98 | if(point->distpoint && point->distpoint->relativename) | ||
99 | X509V3_add_value("RelativeName","<UNSUPPORTED>", &exts); | ||
100 | } | 98 | } |
101 | return exts; | 99 | return exts; |
102 | } | 100 | } |
@@ -105,7 +103,7 @@ static STACK_OF(DIST_POINT) *v2i_crld(X509V3_EXT_METHOD *method, | |||
105 | X509V3_CTX *ctx, STACK_OF(CONF_VALUE) *nval) | 103 | X509V3_CTX *ctx, STACK_OF(CONF_VALUE) *nval) |
106 | { | 104 | { |
107 | STACK_OF(DIST_POINT) *crld = NULL; | 105 | STACK_OF(DIST_POINT) *crld = NULL; |
108 | STACK_OF(GENERAL_NAME) *gens = NULL; | 106 | GENERAL_NAMES *gens = NULL; |
109 | GENERAL_NAME *gen = NULL; | 107 | GENERAL_NAME *gen = NULL; |
110 | CONF_VALUE *cnf; | 108 | CONF_VALUE *cnf; |
111 | int i; | 109 | int i; |
@@ -123,7 +121,8 @@ static STACK_OF(DIST_POINT) *v2i_crld(X509V3_EXT_METHOD *method, | |||
123 | goto merr; | 121 | goto merr; |
124 | } | 122 | } |
125 | if(!(point->distpoint = DIST_POINT_NAME_new())) goto merr; | 123 | if(!(point->distpoint = DIST_POINT_NAME_new())) goto merr; |
126 | point->distpoint->fullname = gens; | 124 | point->distpoint->name.fullname = gens; |
125 | point->distpoint->type = 0; | ||
127 | gens = NULL; | 126 | gens = NULL; |
128 | } | 127 | } |
129 | return crld; | 128 | return crld; |
@@ -137,149 +136,27 @@ static STACK_OF(DIST_POINT) *v2i_crld(X509V3_EXT_METHOD *method, | |||
137 | return NULL; | 136 | return NULL; |
138 | } | 137 | } |
139 | 138 | ||
140 | int i2d_CRL_DIST_POINTS(STACK_OF(DIST_POINT) *a, unsigned char **pp) | ||
141 | { | ||
142 | |||
143 | return i2d_ASN1_SET_OF_DIST_POINT(a, pp, i2d_DIST_POINT, V_ASN1_SEQUENCE, | ||
144 | V_ASN1_UNIVERSAL, IS_SEQUENCE);} | ||
145 | |||
146 | STACK_OF(DIST_POINT) *CRL_DIST_POINTS_new(void) | ||
147 | { | ||
148 | return sk_DIST_POINT_new_null(); | ||
149 | } | ||
150 | |||
151 | void CRL_DIST_POINTS_free(STACK_OF(DIST_POINT) *a) | ||
152 | { | ||
153 | sk_DIST_POINT_pop_free(a, DIST_POINT_free); | ||
154 | } | ||
155 | |||
156 | STACK_OF(DIST_POINT) *d2i_CRL_DIST_POINTS(STACK_OF(DIST_POINT) **a, | ||
157 | unsigned char **pp,long length) | ||
158 | { | ||
159 | return d2i_ASN1_SET_OF_DIST_POINT(a, pp, length, d2i_DIST_POINT, | ||
160 | DIST_POINT_free, V_ASN1_SEQUENCE, V_ASN1_UNIVERSAL); | ||
161 | |||
162 | } | ||
163 | |||
164 | IMPLEMENT_STACK_OF(DIST_POINT) | 139 | IMPLEMENT_STACK_OF(DIST_POINT) |
165 | IMPLEMENT_ASN1_SET_OF(DIST_POINT) | 140 | IMPLEMENT_ASN1_SET_OF(DIST_POINT) |
166 | 141 | ||
167 | int i2d_DIST_POINT(DIST_POINT *a, unsigned char **pp) | ||
168 | { | ||
169 | int v = 0; | ||
170 | M_ASN1_I2D_vars(a); | ||
171 | /* NB: underlying type is a CHOICE so need EXPLICIT tagging */ | ||
172 | M_ASN1_I2D_len_EXP_opt (a->distpoint, i2d_DIST_POINT_NAME, 0, v); | ||
173 | M_ASN1_I2D_len_IMP_opt (a->reasons, i2d_ASN1_BIT_STRING); | ||
174 | M_ASN1_I2D_len_IMP_opt (a->CRLissuer, i2d_GENERAL_NAMES); | ||
175 | 142 | ||
176 | M_ASN1_I2D_seq_total(); | 143 | ASN1_CHOICE(DIST_POINT_NAME) = { |
144 | ASN1_IMP_SEQUENCE_OF(DIST_POINT_NAME, name.fullname, GENERAL_NAME, 0), | ||
145 | ASN1_IMP_SET_OF(DIST_POINT_NAME, name.relativename, X509_NAME_ENTRY, 1) | ||
146 | } ASN1_CHOICE_END(DIST_POINT_NAME) | ||
177 | 147 | ||
178 | M_ASN1_I2D_put_EXP_opt (a->distpoint, i2d_DIST_POINT_NAME, 0, v); | 148 | IMPLEMENT_ASN1_FUNCTIONS(DIST_POINT_NAME) |
179 | M_ASN1_I2D_put_IMP_opt (a->reasons, i2d_ASN1_BIT_STRING, 1); | ||
180 | M_ASN1_I2D_put_IMP_opt (a->CRLissuer, i2d_GENERAL_NAMES, 2); | ||
181 | 149 | ||
182 | M_ASN1_I2D_finish(); | 150 | ASN1_SEQUENCE(DIST_POINT) = { |
183 | } | 151 | ASN1_EXP_OPT(DIST_POINT, distpoint, DIST_POINT_NAME, 0), |
152 | ASN1_IMP_OPT(DIST_POINT, reasons, ASN1_BIT_STRING, 1), | ||
153 | ASN1_IMP_SEQUENCE_OF_OPT(DIST_POINT, CRLissuer, GENERAL_NAME, 2) | ||
154 | } ASN1_SEQUENCE_END(DIST_POINT) | ||
184 | 155 | ||
185 | DIST_POINT *DIST_POINT_new(void) | 156 | IMPLEMENT_ASN1_FUNCTIONS(DIST_POINT) |
186 | { | ||
187 | DIST_POINT *ret=NULL; | ||
188 | ASN1_CTX c; | ||
189 | M_ASN1_New_Malloc(ret, DIST_POINT); | ||
190 | ret->distpoint = NULL; | ||
191 | ret->reasons = NULL; | ||
192 | ret->CRLissuer = NULL; | ||
193 | return (ret); | ||
194 | M_ASN1_New_Error(ASN1_F_DIST_POINT_NEW); | ||
195 | } | ||
196 | 157 | ||
197 | DIST_POINT *d2i_DIST_POINT(DIST_POINT **a, unsigned char **pp, long length) | 158 | ASN1_ITEM_TEMPLATE(CRL_DIST_POINTS) = |
198 | { | 159 | ASN1_EX_TEMPLATE_TYPE(ASN1_TFLG_SEQUENCE_OF, 0, DIST_POINT, DIST_POINT) |
199 | M_ASN1_D2I_vars(a,DIST_POINT *,DIST_POINT_new); | 160 | ASN1_ITEM_TEMPLATE_END(CRL_DIST_POINTS) |
200 | M_ASN1_D2I_Init(); | ||
201 | M_ASN1_D2I_start_sequence(); | ||
202 | M_ASN1_D2I_get_EXP_opt (ret->distpoint, d2i_DIST_POINT_NAME, 0); | ||
203 | M_ASN1_D2I_get_IMP_opt (ret->reasons, d2i_ASN1_BIT_STRING, 1, | ||
204 | V_ASN1_BIT_STRING); | ||
205 | M_ASN1_D2I_get_IMP_opt (ret->CRLissuer, d2i_GENERAL_NAMES, 2, | ||
206 | V_ASN1_SEQUENCE); | ||
207 | M_ASN1_D2I_Finish(a, DIST_POINT_free, ASN1_F_D2I_DIST_POINT); | ||
208 | } | ||
209 | 161 | ||
210 | void DIST_POINT_free(DIST_POINT *a) | 162 | IMPLEMENT_ASN1_FUNCTIONS(CRL_DIST_POINTS) |
211 | { | ||
212 | if (a == NULL) return; | ||
213 | DIST_POINT_NAME_free(a->distpoint); | ||
214 | M_ASN1_BIT_STRING_free(a->reasons); | ||
215 | sk_GENERAL_NAME_pop_free(a->CRLissuer, GENERAL_NAME_free); | ||
216 | OPENSSL_free (a); | ||
217 | } | ||
218 | |||
219 | int i2d_DIST_POINT_NAME(DIST_POINT_NAME *a, unsigned char **pp) | ||
220 | { | ||
221 | M_ASN1_I2D_vars(a); | ||
222 | |||
223 | if(a->fullname) { | ||
224 | M_ASN1_I2D_len_IMP_opt (a->fullname, i2d_GENERAL_NAMES); | ||
225 | } else { | ||
226 | M_ASN1_I2D_len_IMP_SET_opt_type(X509_NAME_ENTRY, | ||
227 | a->relativename, i2d_X509_NAME_ENTRY, 1); | ||
228 | } | ||
229 | |||
230 | /* Don't want a SEQUENCE so... */ | ||
231 | if(pp == NULL) return ret; | ||
232 | p = *pp; | ||
233 | |||
234 | if(a->fullname) { | ||
235 | M_ASN1_I2D_put_IMP_opt (a->fullname, i2d_GENERAL_NAMES, 0); | ||
236 | } else { | ||
237 | M_ASN1_I2D_put_IMP_SET_opt_type(X509_NAME_ENTRY, | ||
238 | a->relativename, i2d_X509_NAME_ENTRY, 1); | ||
239 | } | ||
240 | M_ASN1_I2D_finish(); | ||
241 | } | ||
242 | |||
243 | DIST_POINT_NAME *DIST_POINT_NAME_new(void) | ||
244 | { | ||
245 | DIST_POINT_NAME *ret=NULL; | ||
246 | ASN1_CTX c; | ||
247 | M_ASN1_New_Malloc(ret, DIST_POINT_NAME); | ||
248 | ret->fullname = NULL; | ||
249 | ret->relativename = NULL; | ||
250 | return (ret); | ||
251 | M_ASN1_New_Error(ASN1_F_DIST_POINT_NAME_NEW); | ||
252 | } | ||
253 | |||
254 | void DIST_POINT_NAME_free(DIST_POINT_NAME *a) | ||
255 | { | ||
256 | if (a == NULL) return; | ||
257 | sk_X509_NAME_ENTRY_pop_free(a->relativename, X509_NAME_ENTRY_free); | ||
258 | sk_GENERAL_NAME_pop_free(a->fullname, GENERAL_NAME_free); | ||
259 | OPENSSL_free (a); | ||
260 | } | ||
261 | |||
262 | DIST_POINT_NAME *d2i_DIST_POINT_NAME(DIST_POINT_NAME **a, unsigned char **pp, | ||
263 | long length) | ||
264 | { | ||
265 | unsigned char _tmp, tag; | ||
266 | M_ASN1_D2I_vars(a,DIST_POINT_NAME *,DIST_POINT_NAME_new); | ||
267 | M_ASN1_D2I_Init(); | ||
268 | c.slen = length; | ||
269 | |||
270 | _tmp = M_ASN1_next; | ||
271 | tag = _tmp & ~V_ASN1_CONSTRUCTED; | ||
272 | |||
273 | if(tag == (0|V_ASN1_CONTEXT_SPECIFIC)) { | ||
274 | M_ASN1_D2I_get_imp(ret->fullname, d2i_GENERAL_NAMES, | ||
275 | V_ASN1_SEQUENCE); | ||
276 | } else if (tag == (1|V_ASN1_CONTEXT_SPECIFIC)) { | ||
277 | M_ASN1_D2I_get_IMP_set_opt_type (X509_NAME_ENTRY, | ||
278 | ret->relativename, d2i_X509_NAME_ENTRY, X509_NAME_ENTRY_free, 1); | ||
279 | } else { | ||
280 | c.error = ASN1_R_BAD_TAG; | ||
281 | goto err; | ||
282 | } | ||
283 | |||
284 | M_ASN1_D2I_Finish(a, DIST_POINT_NAME_free, ASN1_F_D2I_DIST_POINT_NAME); | ||
285 | } | ||
diff --git a/src/lib/libcrypto/x509v3/v3_enum.c b/src/lib/libcrypto/x509v3/v3_enum.c index aecfdc87f8..010c9d6260 100644 --- a/src/lib/libcrypto/x509v3/v3_enum.c +++ b/src/lib/libcrypto/x509v3/v3_enum.c | |||
@@ -73,14 +73,12 @@ static ENUMERATED_NAMES crl_reasons[] = { | |||
73 | }; | 73 | }; |
74 | 74 | ||
75 | X509V3_EXT_METHOD v3_crl_reason = { | 75 | X509V3_EXT_METHOD v3_crl_reason = { |
76 | NID_crl_reason, 0, | 76 | NID_crl_reason, 0, ASN1_ITEM_ref(ASN1_ENUMERATED), |
77 | (X509V3_EXT_NEW)ASN1_ENUMERATED_new, | 77 | 0,0,0,0, |
78 | (X509V3_EXT_FREE)ASN1_ENUMERATED_free, | ||
79 | (X509V3_EXT_D2I)d2i_ASN1_ENUMERATED, | ||
80 | (X509V3_EXT_I2D)i2d_ASN1_ENUMERATED, | ||
81 | (X509V3_EXT_I2S)i2s_ASN1_ENUMERATED_TABLE, | 78 | (X509V3_EXT_I2S)i2s_ASN1_ENUMERATED_TABLE, |
82 | (X509V3_EXT_S2I)0, | 79 | 0, |
83 | NULL, NULL, NULL, NULL, crl_reasons}; | 80 | 0,0,0,0, |
81 | crl_reasons}; | ||
84 | 82 | ||
85 | 83 | ||
86 | char *i2s_ASN1_ENUMERATED_TABLE(X509V3_EXT_METHOD *method, | 84 | char *i2s_ASN1_ENUMERATED_TABLE(X509V3_EXT_METHOD *method, |
diff --git a/src/lib/libcrypto/x509v3/v3_extku.c b/src/lib/libcrypto/x509v3/v3_extku.c index 53ec40a027..b1cfaba1aa 100644 --- a/src/lib/libcrypto/x509v3/v3_extku.c +++ b/src/lib/libcrypto/x509v3/v3_extku.c | |||
@@ -59,92 +59,84 @@ | |||
59 | 59 | ||
60 | #include <stdio.h> | 60 | #include <stdio.h> |
61 | #include "cryptlib.h" | 61 | #include "cryptlib.h" |
62 | #include <openssl/asn1.h> | 62 | #include <openssl/asn1t.h> |
63 | #include <openssl/conf.h> | 63 | #include <openssl/conf.h> |
64 | #include <openssl/x509v3.h> | 64 | #include <openssl/x509v3.h> |
65 | 65 | ||
66 | static STACK_OF(ASN1_OBJECT) *v2i_ext_ku(X509V3_EXT_METHOD *method, | 66 | static void *v2i_EXTENDED_KEY_USAGE(X509V3_EXT_METHOD *method, |
67 | X509V3_CTX *ctx, STACK_OF(CONF_VALUE) *nval); | 67 | X509V3_CTX *ctx, STACK_OF(CONF_VALUE) *nval); |
68 | static STACK_OF(CONF_VALUE) *i2v_ext_ku(X509V3_EXT_METHOD *method, | 68 | static STACK_OF(CONF_VALUE) *i2v_EXTENDED_KEY_USAGE(X509V3_EXT_METHOD *method, |
69 | STACK_OF(ASN1_OBJECT) *eku, STACK_OF(CONF_VALUE) *extlist); | 69 | void *eku, STACK_OF(CONF_VALUE) *extlist); |
70 | |||
70 | X509V3_EXT_METHOD v3_ext_ku = { | 71 | X509V3_EXT_METHOD v3_ext_ku = { |
71 | NID_ext_key_usage, 0, | 72 | NID_ext_key_usage, 0, |
72 | (X509V3_EXT_NEW)ext_ku_new, | 73 | ASN1_ITEM_ref(EXTENDED_KEY_USAGE), |
73 | (X509V3_EXT_FREE)ext_ku_free, | 74 | 0,0,0,0, |
74 | (X509V3_EXT_D2I)d2i_ext_ku, | 75 | 0,0, |
75 | (X509V3_EXT_I2D)i2d_ext_ku, | 76 | i2v_EXTENDED_KEY_USAGE, |
76 | NULL, NULL, | 77 | v2i_EXTENDED_KEY_USAGE, |
77 | (X509V3_EXT_I2V)i2v_ext_ku, | 78 | 0,0, |
78 | (X509V3_EXT_V2I)v2i_ext_ku, | 79 | NULL |
79 | NULL,NULL, | ||
80 | NULL | ||
81 | }; | 80 | }; |
82 | 81 | ||
83 | STACK_OF(ASN1_OBJECT) *ext_ku_new(void) | 82 | /* NB OCSP acceptable responses also is a SEQUENCE OF OBJECT */ |
84 | { | 83 | X509V3_EXT_METHOD v3_ocsp_accresp = { |
85 | return sk_ASN1_OBJECT_new_null(); | 84 | NID_id_pkix_OCSP_acceptableResponses, 0, |
86 | } | 85 | ASN1_ITEM_ref(EXTENDED_KEY_USAGE), |
87 | 86 | 0,0,0,0, | |
88 | void ext_ku_free(STACK_OF(ASN1_OBJECT) *eku) | 87 | 0,0, |
89 | { | 88 | i2v_EXTENDED_KEY_USAGE, |
90 | sk_ASN1_OBJECT_pop_free(eku, ASN1_OBJECT_free); | 89 | v2i_EXTENDED_KEY_USAGE, |
91 | return; | 90 | 0,0, |
92 | } | 91 | NULL |
93 | 92 | }; | |
94 | int i2d_ext_ku(STACK_OF(ASN1_OBJECT) *a, unsigned char **pp) | ||
95 | { | ||
96 | return i2d_ASN1_SET_OF_ASN1_OBJECT(a, pp, i2d_ASN1_OBJECT, | ||
97 | V_ASN1_SEQUENCE, V_ASN1_UNIVERSAL, IS_SEQUENCE); | ||
98 | } | ||
99 | |||
100 | STACK_OF(ASN1_OBJECT) *d2i_ext_ku(STACK_OF(ASN1_OBJECT) **a, | ||
101 | unsigned char **pp, long length) | ||
102 | { | ||
103 | return d2i_ASN1_SET_OF_ASN1_OBJECT(a, pp, length, d2i_ASN1_OBJECT, | ||
104 | ASN1_OBJECT_free, V_ASN1_SEQUENCE, V_ASN1_UNIVERSAL); | ||
105 | } | ||
106 | 93 | ||
94 | ASN1_ITEM_TEMPLATE(EXTENDED_KEY_USAGE) = | ||
95 | ASN1_EX_TEMPLATE_TYPE(ASN1_TFLG_SEQUENCE_OF, 0, EXTENDED_KEY_USAGE, ASN1_OBJECT) | ||
96 | ASN1_ITEM_TEMPLATE_END(EXTENDED_KEY_USAGE) | ||
107 | 97 | ||
98 | IMPLEMENT_ASN1_FUNCTIONS(EXTENDED_KEY_USAGE) | ||
108 | 99 | ||
109 | static STACK_OF(CONF_VALUE) *i2v_ext_ku(X509V3_EXT_METHOD *method, | 100 | static STACK_OF(CONF_VALUE) *i2v_EXTENDED_KEY_USAGE(X509V3_EXT_METHOD *method, |
110 | STACK_OF(ASN1_OBJECT) *eku, STACK_OF(CONF_VALUE) *ext_list) | 101 | void *a, STACK_OF(CONF_VALUE) *ext_list) |
111 | { | 102 | { |
112 | int i; | 103 | EXTENDED_KEY_USAGE *eku = a; |
113 | ASN1_OBJECT *obj; | 104 | int i; |
114 | char obj_tmp[80]; | 105 | ASN1_OBJECT *obj; |
115 | for(i = 0; i < sk_ASN1_OBJECT_num(eku); i++) { | 106 | char obj_tmp[80]; |
116 | obj = sk_ASN1_OBJECT_value(eku, i); | 107 | for(i = 0; i < sk_ASN1_OBJECT_num(eku); i++) { |
117 | i2t_ASN1_OBJECT(obj_tmp, 80, obj); | 108 | obj = sk_ASN1_OBJECT_value(eku, i); |
118 | X509V3_add_value(NULL, obj_tmp, &ext_list); | 109 | i2t_ASN1_OBJECT(obj_tmp, 80, obj); |
119 | } | 110 | X509V3_add_value(NULL, obj_tmp, &ext_list); |
120 | return ext_list; | 111 | } |
112 | return ext_list; | ||
121 | } | 113 | } |
122 | 114 | ||
123 | static STACK_OF(ASN1_OBJECT) *v2i_ext_ku(X509V3_EXT_METHOD *method, | 115 | static void *v2i_EXTENDED_KEY_USAGE(X509V3_EXT_METHOD *method, |
124 | X509V3_CTX *ctx, STACK_OF(CONF_VALUE) *nval) | 116 | X509V3_CTX *ctx, STACK_OF(CONF_VALUE) *nval) |
125 | { | 117 | { |
126 | STACK_OF(ASN1_OBJECT) *extku; | 118 | EXTENDED_KEY_USAGE *extku; |
127 | char *extval; | 119 | char *extval; |
128 | ASN1_OBJECT *objtmp; | 120 | ASN1_OBJECT *objtmp; |
129 | CONF_VALUE *val; | 121 | CONF_VALUE *val; |
130 | int i; | 122 | int i; |
131 | 123 | ||
132 | if(!(extku = sk_ASN1_OBJECT_new_null())) { | 124 | if(!(extku = sk_ASN1_OBJECT_new_null())) { |
133 | X509V3err(X509V3_F_V2I_EXT_KU,ERR_R_MALLOC_FAILURE); | 125 | X509V3err(X509V3_F_V2I_EXT_KU,ERR_R_MALLOC_FAILURE); |
134 | return NULL; | ||
135 | } | ||
136 | |||
137 | for(i = 0; i < sk_CONF_VALUE_num(nval); i++) { | ||
138 | val = sk_CONF_VALUE_value(nval, i); | ||
139 | if(val->value) extval = val->value; | ||
140 | else extval = val->name; | ||
141 | if(!(objtmp = OBJ_txt2obj(extval, 0))) { | ||
142 | sk_ASN1_OBJECT_pop_free(extku, ASN1_OBJECT_free); | ||
143 | X509V3err(X509V3_F_V2I_EXT_KU,X509V3_R_INVALID_OBJECT_IDENTIFIER); | ||
144 | X509V3_conf_err(val); | ||
145 | return NULL; | 126 | return NULL; |
146 | } | 127 | } |
147 | sk_ASN1_OBJECT_push(extku, objtmp); | 128 | |
148 | } | 129 | for(i = 0; i < sk_CONF_VALUE_num(nval); i++) { |
149 | return extku; | 130 | val = sk_CONF_VALUE_value(nval, i); |
131 | if(val->value) extval = val->value; | ||
132 | else extval = val->name; | ||
133 | if(!(objtmp = OBJ_txt2obj(extval, 0))) { | ||
134 | sk_ASN1_OBJECT_pop_free(extku, ASN1_OBJECT_free); | ||
135 | X509V3err(X509V3_F_V2I_EXT_KU,X509V3_R_INVALID_OBJECT_IDENTIFIER); | ||
136 | X509V3_conf_err(val); | ||
137 | return NULL; | ||
138 | } | ||
139 | sk_ASN1_OBJECT_push(extku, objtmp); | ||
140 | } | ||
141 | return extku; | ||
150 | } | 142 | } |
diff --git a/src/lib/libcrypto/x509v3/v3_genn.c b/src/lib/libcrypto/x509v3/v3_genn.c index d44751458e..650b510980 100644 --- a/src/lib/libcrypto/x509v3/v3_genn.c +++ b/src/lib/libcrypto/x509v3/v3_genn.c | |||
@@ -59,233 +59,43 @@ | |||
59 | 59 | ||
60 | #include <stdio.h> | 60 | #include <stdio.h> |
61 | #include "cryptlib.h" | 61 | #include "cryptlib.h" |
62 | #include <openssl/asn1.h> | 62 | #include <openssl/asn1t.h> |
63 | #include <openssl/asn1_mac.h> | ||
64 | #include <openssl/conf.h> | 63 | #include <openssl/conf.h> |
65 | #include <openssl/x509v3.h> | 64 | #include <openssl/x509v3.h> |
66 | 65 | ||
67 | int i2d_GENERAL_NAME(GENERAL_NAME *a, unsigned char **pp) | 66 | ASN1_SEQUENCE(OTHERNAME) = { |
68 | { | 67 | ASN1_SIMPLE(OTHERNAME, type_id, ASN1_OBJECT), |
69 | unsigned char *p; | 68 | /* Maybe have a true ANY DEFINED BY later */ |
70 | int ret; | 69 | ASN1_EXP(OTHERNAME, value, ASN1_ANY, 0) |
71 | 70 | } ASN1_SEQUENCE_END(OTHERNAME) | |
72 | ret = 0; | 71 | |
73 | 72 | IMPLEMENT_ASN1_FUNCTIONS(OTHERNAME) | |
74 | /* Save the location of initial TAG */ | 73 | |
75 | if(pp) p = *pp; | 74 | ASN1_SEQUENCE(EDIPARTYNAME) = { |
76 | else p = NULL; | 75 | ASN1_IMP_OPT(EDIPARTYNAME, nameAssigner, DIRECTORYSTRING, 0), |
77 | 76 | ASN1_IMP_OPT(EDIPARTYNAME, partyName, DIRECTORYSTRING, 1) | |
78 | /* GEN_DNAME needs special treatment because of EXPLICIT tag */ | 77 | } ASN1_SEQUENCE_END(EDIPARTYNAME) |
79 | 78 | ||
80 | if(a->type == GEN_DIRNAME) { | 79 | IMPLEMENT_ASN1_FUNCTIONS(EDIPARTYNAME) |
81 | int v = 0; | 80 | |
82 | M_ASN1_I2D_len_EXP_opt(a->d.dirn, i2d_X509_NAME, 4, v); | 81 | ASN1_CHOICE(GENERAL_NAME) = { |
83 | if(!p) return ret; | 82 | ASN1_IMP(GENERAL_NAME, d.otherName, OTHERNAME, GEN_OTHERNAME), |
84 | M_ASN1_I2D_put_EXP_opt(a->d.dirn, i2d_X509_NAME, 4, v); | 83 | ASN1_IMP(GENERAL_NAME, d.rfc822Name, ASN1_IA5STRING, GEN_EMAIL), |
85 | *pp = p; | 84 | ASN1_IMP(GENERAL_NAME, d.dNSName, ASN1_IA5STRING, GEN_DNS), |
86 | return ret; | 85 | /* Don't decode this */ |
87 | } | 86 | ASN1_IMP(GENERAL_NAME, d.x400Address, ASN1_SEQUENCE, GEN_X400), |
88 | 87 | /* X509_NAME is a CHOICE type so use EXPLICIT */ | |
89 | switch(a->type) { | 88 | ASN1_EXP(GENERAL_NAME, d.directoryName, X509_NAME, GEN_DIRNAME), |
90 | 89 | ASN1_IMP(GENERAL_NAME, d.ediPartyName, EDIPARTYNAME, GEN_EDIPARTY), | |
91 | case GEN_X400: | 90 | ASN1_IMP(GENERAL_NAME, d.uniformResourceIdentifier, ASN1_IA5STRING, GEN_URI), |
92 | case GEN_EDIPARTY: | 91 | ASN1_IMP(GENERAL_NAME, d.iPAddress, ASN1_OCTET_STRING, GEN_IPADD), |
93 | ret = i2d_ASN1_TYPE(a->d.other, pp); | 92 | ASN1_IMP(GENERAL_NAME, d.registeredID, ASN1_OBJECT, GEN_RID) |
94 | break; | 93 | } ASN1_CHOICE_END(GENERAL_NAME) |
95 | 94 | ||
96 | case GEN_OTHERNAME: | 95 | IMPLEMENT_ASN1_FUNCTIONS(GENERAL_NAME) |
97 | ret = i2d_OTHERNAME(a->d.otherName, pp); | 96 | |
98 | break; | 97 | ASN1_ITEM_TEMPLATE(GENERAL_NAMES) = |
99 | 98 | ASN1_EX_TEMPLATE_TYPE(ASN1_TFLG_SEQUENCE_OF, 0, GeneralNames, GENERAL_NAME) | |
100 | case GEN_EMAIL: | 99 | ASN1_ITEM_TEMPLATE_END(GENERAL_NAMES) |
101 | case GEN_DNS: | 100 | |
102 | case GEN_URI: | 101 | IMPLEMENT_ASN1_FUNCTIONS(GENERAL_NAMES) |
103 | ret = i2d_ASN1_IA5STRING(a->d.ia5, pp); | ||
104 | break; | ||
105 | |||
106 | case GEN_IPADD: | ||
107 | ret = i2d_ASN1_OCTET_STRING(a->d.ip, pp); | ||
108 | break; | ||
109 | |||
110 | case GEN_RID: | ||
111 | ret = i2d_ASN1_OBJECT(a->d.rid, pp); | ||
112 | break; | ||
113 | } | ||
114 | /* Replace TAG with IMPLICIT value */ | ||
115 | if(p) *p = (*p & V_ASN1_CONSTRUCTED) | a->type; | ||
116 | return ret; | ||
117 | } | ||
118 | |||
119 | GENERAL_NAME *GENERAL_NAME_new() | ||
120 | { | ||
121 | GENERAL_NAME *ret=NULL; | ||
122 | ASN1_CTX c; | ||
123 | M_ASN1_New_Malloc(ret, GENERAL_NAME); | ||
124 | ret->type = -1; | ||
125 | ret->d.ptr = NULL; | ||
126 | return (ret); | ||
127 | M_ASN1_New_Error(ASN1_F_GENERAL_NAME_NEW); | ||
128 | } | ||
129 | |||
130 | GENERAL_NAME *d2i_GENERAL_NAME(GENERAL_NAME **a, unsigned char **pp, | ||
131 | long length) | ||
132 | { | ||
133 | unsigned char _tmp; | ||
134 | M_ASN1_D2I_vars(a,GENERAL_NAME *,GENERAL_NAME_new); | ||
135 | M_ASN1_D2I_Init(); | ||
136 | c.slen = length; | ||
137 | |||
138 | _tmp = M_ASN1_next; | ||
139 | ret->type = _tmp & ~V_ASN1_CONSTRUCTED; | ||
140 | |||
141 | switch(ret->type) { | ||
142 | /* Just put these in a "blob" for now */ | ||
143 | case GEN_X400: | ||
144 | case GEN_EDIPARTY: | ||
145 | M_ASN1_D2I_get_imp(ret->d.other, d2i_ASN1_TYPE,V_ASN1_SEQUENCE); | ||
146 | break; | ||
147 | |||
148 | case GEN_OTHERNAME: | ||
149 | M_ASN1_D2I_get_imp(ret->d.otherName, d2i_OTHERNAME,V_ASN1_SEQUENCE); | ||
150 | break; | ||
151 | |||
152 | case GEN_EMAIL: | ||
153 | case GEN_DNS: | ||
154 | case GEN_URI: | ||
155 | M_ASN1_D2I_get_imp(ret->d.ia5, d2i_ASN1_IA5STRING, | ||
156 | V_ASN1_IA5STRING); | ||
157 | break; | ||
158 | |||
159 | case GEN_DIRNAME: | ||
160 | M_ASN1_D2I_get_EXP_opt(ret->d.dirn, d2i_X509_NAME, 4); | ||
161 | break; | ||
162 | |||
163 | case GEN_IPADD: | ||
164 | M_ASN1_D2I_get_imp(ret->d.ip, d2i_ASN1_OCTET_STRING, | ||
165 | V_ASN1_OCTET_STRING); | ||
166 | break; | ||
167 | |||
168 | case GEN_RID: | ||
169 | M_ASN1_D2I_get_imp(ret->d.rid, d2i_ASN1_OBJECT,V_ASN1_OBJECT); | ||
170 | break; | ||
171 | |||
172 | default: | ||
173 | c.error = ASN1_R_BAD_TAG; | ||
174 | goto err; | ||
175 | } | ||
176 | |||
177 | c.slen = 0; | ||
178 | M_ASN1_D2I_Finish(a, GENERAL_NAME_free, ASN1_F_D2I_GENERAL_NAME); | ||
179 | } | ||
180 | |||
181 | void GENERAL_NAME_free(GENERAL_NAME *a) | ||
182 | { | ||
183 | if (a == NULL) return; | ||
184 | switch(a->type) { | ||
185 | case GEN_X400: | ||
186 | case GEN_EDIPARTY: | ||
187 | ASN1_TYPE_free(a->d.other); | ||
188 | break; | ||
189 | |||
190 | case GEN_OTHERNAME: | ||
191 | OTHERNAME_free(a->d.otherName); | ||
192 | break; | ||
193 | |||
194 | case GEN_EMAIL: | ||
195 | case GEN_DNS: | ||
196 | case GEN_URI: | ||
197 | |||
198 | M_ASN1_IA5STRING_free(a->d.ia5); | ||
199 | break; | ||
200 | |||
201 | case GEN_DIRNAME: | ||
202 | X509_NAME_free(a->d.dirn); | ||
203 | break; | ||
204 | |||
205 | case GEN_IPADD: | ||
206 | M_ASN1_OCTET_STRING_free(a->d.ip); | ||
207 | break; | ||
208 | |||
209 | case GEN_RID: | ||
210 | ASN1_OBJECT_free(a->d.rid); | ||
211 | break; | ||
212 | |||
213 | } | ||
214 | OPENSSL_free (a); | ||
215 | } | ||
216 | |||
217 | /* Now the GeneralNames versions: a SEQUENCE OF GeneralName. These are needed as | ||
218 | * explicit functions. | ||
219 | */ | ||
220 | |||
221 | STACK_OF(GENERAL_NAME) *GENERAL_NAMES_new() | ||
222 | { | ||
223 | return sk_GENERAL_NAME_new_null(); | ||
224 | } | ||
225 | |||
226 | void GENERAL_NAMES_free(STACK_OF(GENERAL_NAME) *a) | ||
227 | { | ||
228 | sk_GENERAL_NAME_pop_free(a, GENERAL_NAME_free); | ||
229 | } | ||
230 | |||
231 | STACK_OF(GENERAL_NAME) *d2i_GENERAL_NAMES(STACK_OF(GENERAL_NAME) **a, | ||
232 | unsigned char **pp, long length) | ||
233 | { | ||
234 | return d2i_ASN1_SET_OF_GENERAL_NAME(a, pp, length, d2i_GENERAL_NAME, | ||
235 | GENERAL_NAME_free, V_ASN1_SEQUENCE, V_ASN1_UNIVERSAL); | ||
236 | } | ||
237 | |||
238 | int i2d_GENERAL_NAMES(STACK_OF(GENERAL_NAME) *a, unsigned char **pp) | ||
239 | { | ||
240 | return i2d_ASN1_SET_OF_GENERAL_NAME(a, pp, i2d_GENERAL_NAME, V_ASN1_SEQUENCE, | ||
241 | V_ASN1_UNIVERSAL, IS_SEQUENCE); | ||
242 | } | ||
243 | |||
244 | IMPLEMENT_STACK_OF(GENERAL_NAME) | ||
245 | IMPLEMENT_ASN1_SET_OF(GENERAL_NAME) | ||
246 | |||
247 | int i2d_OTHERNAME(OTHERNAME *a, unsigned char **pp) | ||
248 | { | ||
249 | int v = 0; | ||
250 | M_ASN1_I2D_vars(a); | ||
251 | |||
252 | M_ASN1_I2D_len(a->type_id, i2d_ASN1_OBJECT); | ||
253 | M_ASN1_I2D_len_EXP_opt(a->value, i2d_ASN1_TYPE, 0, v); | ||
254 | |||
255 | M_ASN1_I2D_seq_total(); | ||
256 | |||
257 | M_ASN1_I2D_put(a->type_id, i2d_ASN1_OBJECT); | ||
258 | M_ASN1_I2D_put_EXP_opt(a->value, i2d_ASN1_TYPE, 0, v); | ||
259 | |||
260 | M_ASN1_I2D_finish(); | ||
261 | } | ||
262 | |||
263 | OTHERNAME *OTHERNAME_new(void) | ||
264 | { | ||
265 | OTHERNAME *ret=NULL; | ||
266 | ASN1_CTX c; | ||
267 | M_ASN1_New_Malloc(ret, OTHERNAME); | ||
268 | ret->type_id = OBJ_nid2obj(NID_undef); | ||
269 | M_ASN1_New(ret->value, ASN1_TYPE_new); | ||
270 | return (ret); | ||
271 | M_ASN1_New_Error(ASN1_F_OTHERNAME_NEW); | ||
272 | } | ||
273 | |||
274 | OTHERNAME *d2i_OTHERNAME(OTHERNAME **a, unsigned char **pp, long length) | ||
275 | { | ||
276 | M_ASN1_D2I_vars(a,OTHERNAME *,OTHERNAME_new); | ||
277 | M_ASN1_D2I_Init(); | ||
278 | M_ASN1_D2I_start_sequence(); | ||
279 | M_ASN1_D2I_get(ret->type_id, d2i_ASN1_OBJECT); | ||
280 | M_ASN1_D2I_get_EXP_opt(ret->value, d2i_ASN1_TYPE, 0); | ||
281 | M_ASN1_D2I_Finish(a, OTHERNAME_free, ASN1_F_D2I_OTHERNAME); | ||
282 | } | ||
283 | |||
284 | void OTHERNAME_free(OTHERNAME *a) | ||
285 | { | ||
286 | if (a == NULL) return; | ||
287 | ASN1_OBJECT_free(a->type_id); | ||
288 | ASN1_TYPE_free(a->value); | ||
289 | OPENSSL_free (a); | ||
290 | } | ||
291 | |||
diff --git a/src/lib/libcrypto/x509v3/v3_info.c b/src/lib/libcrypto/x509v3/v3_info.c index a045a629ee..7f17f3231d 100644 --- a/src/lib/libcrypto/x509v3/v3_info.c +++ b/src/lib/libcrypto/x509v3/v3_info.c | |||
@@ -60,28 +60,48 @@ | |||
60 | #include "cryptlib.h" | 60 | #include "cryptlib.h" |
61 | #include <openssl/conf.h> | 61 | #include <openssl/conf.h> |
62 | #include <openssl/asn1.h> | 62 | #include <openssl/asn1.h> |
63 | #include <openssl/asn1_mac.h> | 63 | #include <openssl/asn1t.h> |
64 | #include <openssl/x509v3.h> | 64 | #include <openssl/x509v3.h> |
65 | 65 | ||
66 | static STACK_OF(CONF_VALUE) *i2v_AUTHORITY_INFO_ACCESS(X509V3_EXT_METHOD *method, | 66 | static STACK_OF(CONF_VALUE) *i2v_AUTHORITY_INFO_ACCESS(X509V3_EXT_METHOD *method, |
67 | STACK_OF(ACCESS_DESCRIPTION) *ainfo, | 67 | AUTHORITY_INFO_ACCESS *ainfo, |
68 | STACK_OF(CONF_VALUE) *ret); | 68 | STACK_OF(CONF_VALUE) *ret); |
69 | static STACK_OF(ACCESS_DESCRIPTION) *v2i_AUTHORITY_INFO_ACCESS(X509V3_EXT_METHOD *method, | 69 | static AUTHORITY_INFO_ACCESS *v2i_AUTHORITY_INFO_ACCESS(X509V3_EXT_METHOD *method, |
70 | X509V3_CTX *ctx, STACK_OF(CONF_VALUE) *nval); | 70 | X509V3_CTX *ctx, STACK_OF(CONF_VALUE) *nval); |
71 | 71 | ||
72 | X509V3_EXT_METHOD v3_info = | 72 | X509V3_EXT_METHOD v3_info = |
73 | { NID_info_access, X509V3_EXT_MULTILINE, | 73 | { NID_info_access, X509V3_EXT_MULTILINE, ASN1_ITEM_ref(AUTHORITY_INFO_ACCESS), |
74 | (X509V3_EXT_NEW)AUTHORITY_INFO_ACCESS_new, | 74 | 0,0,0,0, |
75 | (X509V3_EXT_FREE)AUTHORITY_INFO_ACCESS_free, | 75 | 0,0, |
76 | (X509V3_EXT_D2I)d2i_AUTHORITY_INFO_ACCESS, | ||
77 | (X509V3_EXT_I2D)i2d_AUTHORITY_INFO_ACCESS, | ||
78 | NULL, NULL, | ||
79 | (X509V3_EXT_I2V)i2v_AUTHORITY_INFO_ACCESS, | 76 | (X509V3_EXT_I2V)i2v_AUTHORITY_INFO_ACCESS, |
80 | (X509V3_EXT_V2I)v2i_AUTHORITY_INFO_ACCESS, | 77 | (X509V3_EXT_V2I)v2i_AUTHORITY_INFO_ACCESS, |
81 | NULL, NULL, NULL}; | 78 | 0,0, |
79 | NULL}; | ||
80 | |||
81 | X509V3_EXT_METHOD v3_sinfo = | ||
82 | { NID_sinfo_access, X509V3_EXT_MULTILINE, ASN1_ITEM_ref(AUTHORITY_INFO_ACCESS), | ||
83 | 0,0,0,0, | ||
84 | 0,0, | ||
85 | (X509V3_EXT_I2V)i2v_AUTHORITY_INFO_ACCESS, | ||
86 | (X509V3_EXT_V2I)v2i_AUTHORITY_INFO_ACCESS, | ||
87 | 0,0, | ||
88 | NULL}; | ||
89 | |||
90 | ASN1_SEQUENCE(ACCESS_DESCRIPTION) = { | ||
91 | ASN1_SIMPLE(ACCESS_DESCRIPTION, method, ASN1_OBJECT), | ||
92 | ASN1_SIMPLE(ACCESS_DESCRIPTION, location, GENERAL_NAME) | ||
93 | } ASN1_SEQUENCE_END(ACCESS_DESCRIPTION) | ||
94 | |||
95 | IMPLEMENT_ASN1_FUNCTIONS(ACCESS_DESCRIPTION) | ||
96 | |||
97 | ASN1_ITEM_TEMPLATE(AUTHORITY_INFO_ACCESS) = | ||
98 | ASN1_EX_TEMPLATE_TYPE(ASN1_TFLG_SEQUENCE_OF, 0, GeneralNames, ACCESS_DESCRIPTION) | ||
99 | ASN1_ITEM_TEMPLATE_END(AUTHORITY_INFO_ACCESS) | ||
100 | |||
101 | IMPLEMENT_ASN1_FUNCTIONS(AUTHORITY_INFO_ACCESS) | ||
82 | 102 | ||
83 | static STACK_OF(CONF_VALUE) *i2v_AUTHORITY_INFO_ACCESS(X509V3_EXT_METHOD *method, | 103 | static STACK_OF(CONF_VALUE) *i2v_AUTHORITY_INFO_ACCESS(X509V3_EXT_METHOD *method, |
84 | STACK_OF(ACCESS_DESCRIPTION) *ainfo, | 104 | AUTHORITY_INFO_ACCESS *ainfo, |
85 | STACK_OF(CONF_VALUE) *ret) | 105 | STACK_OF(CONF_VALUE) *ret) |
86 | { | 106 | { |
87 | ACCESS_DESCRIPTION *desc; | 107 | ACCESS_DESCRIPTION *desc; |
@@ -111,10 +131,10 @@ static STACK_OF(CONF_VALUE) *i2v_AUTHORITY_INFO_ACCESS(X509V3_EXT_METHOD *method | |||
111 | return ret; | 131 | return ret; |
112 | } | 132 | } |
113 | 133 | ||
114 | static STACK_OF(ACCESS_DESCRIPTION) *v2i_AUTHORITY_INFO_ACCESS(X509V3_EXT_METHOD *method, | 134 | static AUTHORITY_INFO_ACCESS *v2i_AUTHORITY_INFO_ACCESS(X509V3_EXT_METHOD *method, |
115 | X509V3_CTX *ctx, STACK_OF(CONF_VALUE) *nval) | 135 | X509V3_CTX *ctx, STACK_OF(CONF_VALUE) *nval) |
116 | { | 136 | { |
117 | STACK_OF(ACCESS_DESCRIPTION) *ainfo = NULL; | 137 | AUTHORITY_INFO_ACCESS *ainfo = NULL; |
118 | CONF_VALUE *cnf, ctmp; | 138 | CONF_VALUE *cnf, ctmp; |
119 | ACCESS_DESCRIPTION *acc; | 139 | ACCESS_DESCRIPTION *acc; |
120 | int i, objlen; | 140 | int i, objlen; |
@@ -162,75 +182,11 @@ static STACK_OF(ACCESS_DESCRIPTION) *v2i_AUTHORITY_INFO_ACCESS(X509V3_EXT_METHOD | |||
162 | return NULL; | 182 | return NULL; |
163 | } | 183 | } |
164 | 184 | ||
165 | int i2d_ACCESS_DESCRIPTION(ACCESS_DESCRIPTION *a, unsigned char **pp) | 185 | int i2a_ACCESS_DESCRIPTION(BIO *bp, ACCESS_DESCRIPTION* a) |
166 | { | 186 | { |
167 | M_ASN1_I2D_vars(a); | 187 | i2a_ASN1_OBJECT(bp, a->method); |
168 | 188 | #ifdef UNDEF | |
169 | M_ASN1_I2D_len(a->method, i2d_ASN1_OBJECT); | 189 | i2a_GENERAL_NAME(bp, a->location); |
170 | M_ASN1_I2D_len(a->location, i2d_GENERAL_NAME); | 190 | #endif |
171 | 191 | return 2; | |
172 | M_ASN1_I2D_seq_total(); | 192 | } |
173 | |||
174 | M_ASN1_I2D_put(a->method, i2d_ASN1_OBJECT); | ||
175 | M_ASN1_I2D_put(a->location, i2d_GENERAL_NAME); | ||
176 | |||
177 | M_ASN1_I2D_finish(); | ||
178 | } | ||
179 | |||
180 | ACCESS_DESCRIPTION *ACCESS_DESCRIPTION_new(void) | ||
181 | { | ||
182 | ACCESS_DESCRIPTION *ret=NULL; | ||
183 | ASN1_CTX c; | ||
184 | M_ASN1_New_Malloc(ret, ACCESS_DESCRIPTION); | ||
185 | ret->method = OBJ_nid2obj(NID_undef); | ||
186 | ret->location = NULL; | ||
187 | return (ret); | ||
188 | M_ASN1_New_Error(ASN1_F_ACCESS_DESCRIPTION_NEW); | ||
189 | } | ||
190 | |||
191 | ACCESS_DESCRIPTION *d2i_ACCESS_DESCRIPTION(ACCESS_DESCRIPTION **a, unsigned char **pp, | ||
192 | long length) | ||
193 | { | ||
194 | M_ASN1_D2I_vars(a,ACCESS_DESCRIPTION *,ACCESS_DESCRIPTION_new); | ||
195 | M_ASN1_D2I_Init(); | ||
196 | M_ASN1_D2I_start_sequence(); | ||
197 | M_ASN1_D2I_get(ret->method, d2i_ASN1_OBJECT); | ||
198 | M_ASN1_D2I_get(ret->location, d2i_GENERAL_NAME); | ||
199 | M_ASN1_D2I_Finish(a, ACCESS_DESCRIPTION_free, ASN1_F_D2I_ACCESS_DESCRIPTION); | ||
200 | } | ||
201 | |||
202 | void ACCESS_DESCRIPTION_free(ACCESS_DESCRIPTION *a) | ||
203 | { | ||
204 | if (a == NULL) return; | ||
205 | ASN1_OBJECT_free(a->method); | ||
206 | GENERAL_NAME_free(a->location); | ||
207 | OPENSSL_free (a); | ||
208 | } | ||
209 | |||
210 | STACK_OF(ACCESS_DESCRIPTION) *AUTHORITY_INFO_ACCESS_new(void) | ||
211 | { | ||
212 | return sk_ACCESS_DESCRIPTION_new_null(); | ||
213 | } | ||
214 | |||
215 | void AUTHORITY_INFO_ACCESS_free(STACK_OF(ACCESS_DESCRIPTION) *a) | ||
216 | { | ||
217 | sk_ACCESS_DESCRIPTION_pop_free(a, ACCESS_DESCRIPTION_free); | ||
218 | } | ||
219 | |||
220 | STACK_OF(ACCESS_DESCRIPTION) *d2i_AUTHORITY_INFO_ACCESS(STACK_OF(ACCESS_DESCRIPTION) **a, | ||
221 | unsigned char **pp, long length) | ||
222 | { | ||
223 | return d2i_ASN1_SET_OF_ACCESS_DESCRIPTION(a, pp, length, d2i_ACCESS_DESCRIPTION, | ||
224 | ACCESS_DESCRIPTION_free, V_ASN1_SEQUENCE, V_ASN1_UNIVERSAL); | ||
225 | } | ||
226 | |||
227 | int i2d_AUTHORITY_INFO_ACCESS(STACK_OF(ACCESS_DESCRIPTION) *a, unsigned char **pp) | ||
228 | { | ||
229 | return i2d_ASN1_SET_OF_ACCESS_DESCRIPTION(a, pp, i2d_ACCESS_DESCRIPTION, V_ASN1_SEQUENCE, | ||
230 | V_ASN1_UNIVERSAL, IS_SEQUENCE); | ||
231 | } | ||
232 | |||
233 | IMPLEMENT_STACK_OF(ACCESS_DESCRIPTION) | ||
234 | IMPLEMENT_ASN1_SET_OF(ACCESS_DESCRIPTION) | ||
235 | |||
236 | |||
diff --git a/src/lib/libcrypto/x509v3/v3_int.c b/src/lib/libcrypto/x509v3/v3_int.c index 63c201e5f4..f34cbfb731 100644 --- a/src/lib/libcrypto/x509v3/v3_int.c +++ b/src/lib/libcrypto/x509v3/v3_int.c | |||
@@ -61,12 +61,9 @@ | |||
61 | #include <openssl/x509v3.h> | 61 | #include <openssl/x509v3.h> |
62 | 62 | ||
63 | X509V3_EXT_METHOD v3_crl_num = { | 63 | X509V3_EXT_METHOD v3_crl_num = { |
64 | NID_crl_number, 0, | 64 | NID_crl_number, 0, ASN1_ITEM_ref(ASN1_INTEGER), |
65 | (X509V3_EXT_NEW)ASN1_INTEGER_new, | 65 | 0,0,0,0, |
66 | (X509V3_EXT_FREE)ASN1_INTEGER_free, | ||
67 | (X509V3_EXT_D2I)d2i_ASN1_INTEGER, | ||
68 | (X509V3_EXT_I2D)i2d_ASN1_INTEGER, | ||
69 | (X509V3_EXT_I2S)i2s_ASN1_INTEGER, | 66 | (X509V3_EXT_I2S)i2s_ASN1_INTEGER, |
70 | (X509V3_EXT_S2I)0, | 67 | 0, |
71 | NULL, NULL, NULL, NULL, NULL}; | 68 | 0,0,0,0, NULL}; |
72 | 69 | ||
diff --git a/src/lib/libcrypto/x509v3/v3_lib.c b/src/lib/libcrypto/x509v3/v3_lib.c index ea86b9ebb9..482ca8ccf5 100644 --- a/src/lib/libcrypto/x509v3/v3_lib.c +++ b/src/lib/libcrypto/x509v3/v3_lib.c | |||
@@ -163,8 +163,9 @@ void *X509V3_EXT_d2i(X509_EXTENSION *ext) | |||
163 | { | 163 | { |
164 | X509V3_EXT_METHOD *method; | 164 | X509V3_EXT_METHOD *method; |
165 | unsigned char *p; | 165 | unsigned char *p; |
166 | if(!(method = X509V3_EXT_get(ext)) || !method->d2i) return NULL; | 166 | if(!(method = X509V3_EXT_get(ext))) return NULL; |
167 | p = ext->value->data; | 167 | p = ext->value->data; |
168 | if(method->it) return ASN1_item_d2i(NULL, &p, ext->value->length, ASN1_ITEM_ptr(method->it)); | ||
168 | return method->d2i(NULL, &p, ext->value->length); | 169 | return method->d2i(NULL, &p, ext->value->length); |
169 | } | 170 | } |
170 | 171 | ||
@@ -212,7 +213,7 @@ void *X509V3_get_d2i(STACK_OF(X509_EXTENSION) *x, int nid, int *crit, int *idx) | |||
212 | } | 213 | } |
213 | if(found_ex) { | 214 | if(found_ex) { |
214 | /* Found it */ | 215 | /* Found it */ |
215 | if(crit) *crit = found_ex->critical; | 216 | if(crit) *crit = X509_EXTENSION_get_critical(found_ex); |
216 | return X509V3_EXT_d2i(found_ex); | 217 | return X509V3_EXT_d2i(found_ex); |
217 | } | 218 | } |
218 | 219 | ||
@@ -222,4 +223,79 @@ void *X509V3_get_d2i(STACK_OF(X509_EXTENSION) *x, int nid, int *crit, int *idx) | |||
222 | return NULL; | 223 | return NULL; |
223 | } | 224 | } |
224 | 225 | ||
226 | /* This function is a general extension append, replace and delete utility. | ||
227 | * The precise operation is governed by the 'flags' value. The 'crit' and | ||
228 | * 'value' arguments (if relevant) are the extensions internal structure. | ||
229 | */ | ||
230 | |||
231 | int X509V3_add1_i2d(STACK_OF(X509_EXTENSION) **x, int nid, void *value, | ||
232 | int crit, unsigned long flags) | ||
233 | { | ||
234 | int extidx = -1; | ||
235 | int errcode; | ||
236 | X509_EXTENSION *ext, *extmp; | ||
237 | unsigned long ext_op = flags & X509V3_ADD_OP_MASK; | ||
238 | |||
239 | /* If appending we don't care if it exists, otherwise | ||
240 | * look for existing extension. | ||
241 | */ | ||
242 | if(ext_op != X509V3_ADD_APPEND) | ||
243 | extidx = X509v3_get_ext_by_NID(*x, nid, -1); | ||
244 | |||
245 | /* See if extension exists */ | ||
246 | if(extidx >= 0) { | ||
247 | /* If keep existing, nothing to do */ | ||
248 | if(ext_op == X509V3_ADD_KEEP_EXISTING) | ||
249 | return 1; | ||
250 | /* If default then its an error */ | ||
251 | if(ext_op == X509V3_ADD_DEFAULT) { | ||
252 | errcode = X509V3_R_EXTENSION_EXISTS; | ||
253 | goto err; | ||
254 | } | ||
255 | /* If delete, just delete it */ | ||
256 | if(ext_op == X509V3_ADD_DELETE) { | ||
257 | if(!sk_X509_EXTENSION_delete(*x, extidx)) return -1; | ||
258 | return 1; | ||
259 | } | ||
260 | } else { | ||
261 | /* If replace existing or delete, error since | ||
262 | * extension must exist | ||
263 | */ | ||
264 | if((ext_op == X509V3_ADD_REPLACE_EXISTING) || | ||
265 | (ext_op == X509V3_ADD_DELETE)) { | ||
266 | errcode = X509V3_R_EXTENSION_NOT_FOUND; | ||
267 | goto err; | ||
268 | } | ||
269 | } | ||
270 | |||
271 | /* If we get this far then we have to create an extension: | ||
272 | * could have some flags for alternative encoding schemes... | ||
273 | */ | ||
274 | |||
275 | ext = X509V3_EXT_i2d(nid, crit, value); | ||
276 | |||
277 | if(!ext) { | ||
278 | X509V3err(X509V3_F_X509V3_ADD_I2D, X509V3_R_ERROR_CREATING_EXTENSION); | ||
279 | return 0; | ||
280 | } | ||
281 | |||
282 | /* If extension exists replace it.. */ | ||
283 | if(extidx >= 0) { | ||
284 | extmp = sk_X509_EXTENSION_value(*x, extidx); | ||
285 | X509_EXTENSION_free(extmp); | ||
286 | if(!sk_X509_EXTENSION_set(*x, extidx, ext)) return -1; | ||
287 | return 1; | ||
288 | } | ||
289 | |||
290 | if(!*x && !(*x = sk_X509_EXTENSION_new_null())) return -1; | ||
291 | if(!sk_X509_EXTENSION_push(*x, ext)) return -1; | ||
292 | |||
293 | return 1; | ||
294 | |||
295 | err: | ||
296 | if(!(flags & X509V3_ADD_SILENT)) | ||
297 | X509V3err(X509V3_F_X509V3_ADD_I2D, errcode); | ||
298 | return 0; | ||
299 | } | ||
300 | |||
225 | IMPLEMENT_STACK_OF(X509V3_EXT_METHOD) | 301 | IMPLEMENT_STACK_OF(X509V3_EXT_METHOD) |
diff --git a/src/lib/libcrypto/x509v3/v3_ocsp.c b/src/lib/libcrypto/x509v3/v3_ocsp.c new file mode 100644 index 0000000000..083112314e --- /dev/null +++ b/src/lib/libcrypto/x509v3/v3_ocsp.c | |||
@@ -0,0 +1,272 @@ | |||
1 | /* v3_ocsp.c */ | ||
2 | /* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL | ||
3 | * project 1999. | ||
4 | */ | ||
5 | /* ==================================================================== | ||
6 | * Copyright (c) 1999 The OpenSSL Project. All rights reserved. | ||
7 | * | ||
8 | * Redistribution and use in source and binary forms, with or without | ||
9 | * modification, are permitted provided that the following conditions | ||
10 | * are met: | ||
11 | * | ||
12 | * 1. Redistributions of source code must retain the above copyright | ||
13 | * notice, this list of conditions and the following disclaimer. | ||
14 | * | ||
15 | * 2. Redistributions in binary form must reproduce the above copyright | ||
16 | * notice, this list of conditions and the following disclaimer in | ||
17 | * the documentation and/or other materials provided with the | ||
18 | * distribution. | ||
19 | * | ||
20 | * 3. All advertising materials mentioning features or use of this | ||
21 | * software must display the following acknowledgment: | ||
22 | * "This product includes software developed by the OpenSSL Project | ||
23 | * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" | ||
24 | * | ||
25 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
26 | * endorse or promote products derived from this software without | ||
27 | * prior written permission. For written permission, please contact | ||
28 | * licensing@OpenSSL.org. | ||
29 | * | ||
30 | * 5. Products derived from this software may not be called "OpenSSL" | ||
31 | * nor may "OpenSSL" appear in their names without prior written | ||
32 | * permission of the OpenSSL Project. | ||
33 | * | ||
34 | * 6. Redistributions of any form whatsoever must retain the following | ||
35 | * acknowledgment: | ||
36 | * "This product includes software developed by the OpenSSL Project | ||
37 | * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" | ||
38 | * | ||
39 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
40 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
41 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
42 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
43 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
44 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
45 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
46 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
47 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
48 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
49 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
50 | * OF THE POSSIBILITY OF SUCH DAMAGE. | ||
51 | * ==================================================================== | ||
52 | * | ||
53 | * This product includes cryptographic software written by Eric Young | ||
54 | * (eay@cryptsoft.com). This product includes software written by Tim | ||
55 | * Hudson (tjh@cryptsoft.com). | ||
56 | * | ||
57 | */ | ||
58 | |||
59 | #include <stdio.h> | ||
60 | #include "cryptlib.h" | ||
61 | #include <openssl/conf.h> | ||
62 | #include <openssl/asn1.h> | ||
63 | #include <openssl/ocsp.h> | ||
64 | #include <openssl/x509v3.h> | ||
65 | |||
66 | /* OCSP extensions and a couple of CRL entry extensions | ||
67 | */ | ||
68 | |||
69 | static int i2r_ocsp_crlid(X509V3_EXT_METHOD *method, void *nonce, BIO *out, int indent); | ||
70 | static int i2r_ocsp_acutoff(X509V3_EXT_METHOD *method, void *nonce, BIO *out, int indent); | ||
71 | static int i2r_object(X509V3_EXT_METHOD *method, void *obj, BIO *out, int indent); | ||
72 | |||
73 | static void *ocsp_nonce_new(void); | ||
74 | static int i2d_ocsp_nonce(void *a, unsigned char **pp); | ||
75 | static void *d2i_ocsp_nonce(void *a, unsigned char **pp, long length); | ||
76 | static void ocsp_nonce_free(void *a); | ||
77 | static int i2r_ocsp_nonce(X509V3_EXT_METHOD *method, void *nonce, BIO *out, int indent); | ||
78 | |||
79 | static int i2r_ocsp_nocheck(X509V3_EXT_METHOD *method, void *nocheck, BIO *out, int indent); | ||
80 | static void *s2i_ocsp_nocheck(X509V3_EXT_METHOD *method, X509V3_CTX *ctx, char *str); | ||
81 | static int i2r_ocsp_serviceloc(X509V3_EXT_METHOD *method, void *in, BIO *bp, int ind); | ||
82 | |||
83 | X509V3_EXT_METHOD v3_ocsp_crlid = { | ||
84 | NID_id_pkix_OCSP_CrlID, 0, ASN1_ITEM_ref(OCSP_CRLID), | ||
85 | 0,0,0,0, | ||
86 | 0,0, | ||
87 | 0,0, | ||
88 | i2r_ocsp_crlid,0, | ||
89 | NULL | ||
90 | }; | ||
91 | |||
92 | X509V3_EXT_METHOD v3_ocsp_acutoff = { | ||
93 | NID_id_pkix_OCSP_archiveCutoff, 0, ASN1_ITEM_ref(ASN1_GENERALIZEDTIME), | ||
94 | 0,0,0,0, | ||
95 | 0,0, | ||
96 | 0,0, | ||
97 | i2r_ocsp_acutoff,0, | ||
98 | NULL | ||
99 | }; | ||
100 | |||
101 | X509V3_EXT_METHOD v3_crl_invdate = { | ||
102 | NID_invalidity_date, 0, ASN1_ITEM_ref(ASN1_GENERALIZEDTIME), | ||
103 | 0,0,0,0, | ||
104 | 0,0, | ||
105 | 0,0, | ||
106 | i2r_ocsp_acutoff,0, | ||
107 | NULL | ||
108 | }; | ||
109 | |||
110 | X509V3_EXT_METHOD v3_crl_hold = { | ||
111 | NID_hold_instruction_code, 0, ASN1_ITEM_ref(ASN1_OBJECT), | ||
112 | 0,0,0,0, | ||
113 | 0,0, | ||
114 | 0,0, | ||
115 | i2r_object,0, | ||
116 | NULL | ||
117 | }; | ||
118 | |||
119 | X509V3_EXT_METHOD v3_ocsp_nonce = { | ||
120 | NID_id_pkix_OCSP_Nonce, 0, NULL, | ||
121 | ocsp_nonce_new, | ||
122 | ocsp_nonce_free, | ||
123 | d2i_ocsp_nonce, | ||
124 | i2d_ocsp_nonce, | ||
125 | 0,0, | ||
126 | 0,0, | ||
127 | i2r_ocsp_nonce,0, | ||
128 | NULL | ||
129 | }; | ||
130 | |||
131 | X509V3_EXT_METHOD v3_ocsp_nocheck = { | ||
132 | NID_id_pkix_OCSP_noCheck, 0, ASN1_ITEM_ref(ASN1_NULL), | ||
133 | 0,0,0,0, | ||
134 | 0,s2i_ocsp_nocheck, | ||
135 | 0,0, | ||
136 | i2r_ocsp_nocheck,0, | ||
137 | NULL | ||
138 | }; | ||
139 | |||
140 | X509V3_EXT_METHOD v3_ocsp_serviceloc = { | ||
141 | NID_id_pkix_OCSP_serviceLocator, 0, ASN1_ITEM_ref(OCSP_SERVICELOC), | ||
142 | 0,0,0,0, | ||
143 | 0,0, | ||
144 | 0,0, | ||
145 | i2r_ocsp_serviceloc,0, | ||
146 | NULL | ||
147 | }; | ||
148 | |||
149 | static int i2r_ocsp_crlid(X509V3_EXT_METHOD *method, void *in, BIO *bp, int ind) | ||
150 | { | ||
151 | OCSP_CRLID *a = in; | ||
152 | if (a->crlUrl) | ||
153 | { | ||
154 | if (!BIO_printf(bp, "%*scrlUrl: ", ind, "")) goto err; | ||
155 | if (!ASN1_STRING_print(bp, (ASN1_STRING*)a->crlUrl)) goto err; | ||
156 | if (!BIO_write(bp, "\n", 1)) goto err; | ||
157 | } | ||
158 | if (a->crlNum) | ||
159 | { | ||
160 | if (!BIO_printf(bp, "%*scrlNum: ", ind, "")) goto err; | ||
161 | if (!i2a_ASN1_INTEGER(bp, a->crlNum)) goto err; | ||
162 | if (!BIO_write(bp, "\n", 1)) goto err; | ||
163 | } | ||
164 | if (a->crlTime) | ||
165 | { | ||
166 | if (!BIO_printf(bp, "%*scrlTime: ", ind, "")) goto err; | ||
167 | if (!ASN1_GENERALIZEDTIME_print(bp, a->crlTime)) goto err; | ||
168 | if (!BIO_write(bp, "\n", 1)) goto err; | ||
169 | } | ||
170 | return 1; | ||
171 | err: | ||
172 | return 0; | ||
173 | } | ||
174 | |||
175 | static int i2r_ocsp_acutoff(X509V3_EXT_METHOD *method, void *cutoff, BIO *bp, int ind) | ||
176 | { | ||
177 | if (!BIO_printf(bp, "%*s", ind, "")) return 0; | ||
178 | if(!ASN1_GENERALIZEDTIME_print(bp, cutoff)) return 0; | ||
179 | return 1; | ||
180 | } | ||
181 | |||
182 | |||
183 | static int i2r_object(X509V3_EXT_METHOD *method, void *oid, BIO *bp, int ind) | ||
184 | { | ||
185 | if (!BIO_printf(bp, "%*s", ind, "")) return 0; | ||
186 | if(!i2a_ASN1_OBJECT(bp, oid)) return 0; | ||
187 | return 1; | ||
188 | } | ||
189 | |||
190 | /* OCSP nonce. This is needs special treatment because it doesn't have | ||
191 | * an ASN1 encoding at all: it just contains arbitrary data. | ||
192 | */ | ||
193 | |||
194 | static void *ocsp_nonce_new(void) | ||
195 | { | ||
196 | return ASN1_OCTET_STRING_new(); | ||
197 | } | ||
198 | |||
199 | static int i2d_ocsp_nonce(void *a, unsigned char **pp) | ||
200 | { | ||
201 | ASN1_OCTET_STRING *os = a; | ||
202 | if(pp) { | ||
203 | memcpy(*pp, os->data, os->length); | ||
204 | *pp += os->length; | ||
205 | } | ||
206 | return os->length; | ||
207 | } | ||
208 | |||
209 | static void *d2i_ocsp_nonce(void *a, unsigned char **pp, long length) | ||
210 | { | ||
211 | ASN1_OCTET_STRING *os, **pos; | ||
212 | pos = a; | ||
213 | if(!pos || !*pos) os = ASN1_OCTET_STRING_new(); | ||
214 | else os = *pos; | ||
215 | if(!ASN1_OCTET_STRING_set(os, *pp, length)) goto err; | ||
216 | |||
217 | *pp += length; | ||
218 | |||
219 | if(pos) *pos = os; | ||
220 | return os; | ||
221 | |||
222 | err: | ||
223 | if(os && (!pos || (*pos != os))) M_ASN1_OCTET_STRING_free(os); | ||
224 | OCSPerr(OCSP_F_D2I_OCSP_NONCE, ERR_R_MALLOC_FAILURE); | ||
225 | return NULL; | ||
226 | } | ||
227 | |||
228 | static void ocsp_nonce_free(void *a) | ||
229 | { | ||
230 | M_ASN1_OCTET_STRING_free(a); | ||
231 | } | ||
232 | |||
233 | static int i2r_ocsp_nonce(X509V3_EXT_METHOD *method, void *nonce, BIO *out, int indent) | ||
234 | { | ||
235 | if(BIO_printf(out, "%*s", indent, "") <= 0) return 0; | ||
236 | if(i2a_ASN1_STRING(out, nonce, V_ASN1_OCTET_STRING) <= 0) return 0; | ||
237 | return 1; | ||
238 | } | ||
239 | |||
240 | /* Nocheck is just a single NULL. Don't print anything and always set it */ | ||
241 | |||
242 | static int i2r_ocsp_nocheck(X509V3_EXT_METHOD *method, void *nocheck, BIO *out, int indent) | ||
243 | { | ||
244 | return 1; | ||
245 | } | ||
246 | |||
247 | static void *s2i_ocsp_nocheck(X509V3_EXT_METHOD *method, X509V3_CTX *ctx, char *str) | ||
248 | { | ||
249 | return ASN1_NULL_new(); | ||
250 | } | ||
251 | |||
252 | static int i2r_ocsp_serviceloc(X509V3_EXT_METHOD *method, void *in, BIO *bp, int ind) | ||
253 | { | ||
254 | int i; | ||
255 | OCSP_SERVICELOC *a = in; | ||
256 | ACCESS_DESCRIPTION *ad; | ||
257 | |||
258 | if (BIO_printf(bp, "%*sIssuer: ", ind, "") <= 0) goto err; | ||
259 | if (X509_NAME_print_ex(bp, a->issuer, 0, XN_FLAG_ONELINE) <= 0) goto err; | ||
260 | for (i = 0; i < sk_ACCESS_DESCRIPTION_num(a->locator); i++) | ||
261 | { | ||
262 | ad = sk_ACCESS_DESCRIPTION_value(a->locator,i); | ||
263 | if (BIO_printf(bp, "\n%*s", (2*ind), "") <= 0) | ||
264 | goto err; | ||
265 | if(i2a_ASN1_OBJECT(bp, ad->method) <= 0) goto err; | ||
266 | if(BIO_puts(bp, " - ") <= 0) goto err; | ||
267 | if(GENERAL_NAME_print(bp, ad->location) <= 0) goto err; | ||
268 | } | ||
269 | return 1; | ||
270 | err: | ||
271 | return 0; | ||
272 | } | ||
diff --git a/src/lib/libcrypto/x509v3/v3_pku.c b/src/lib/libcrypto/x509v3/v3_pku.c index 47f9e8f123..49a2e4697a 100644 --- a/src/lib/libcrypto/x509v3/v3_pku.c +++ b/src/lib/libcrypto/x509v3/v3_pku.c | |||
@@ -59,7 +59,7 @@ | |||
59 | #include <stdio.h> | 59 | #include <stdio.h> |
60 | #include "cryptlib.h" | 60 | #include "cryptlib.h" |
61 | #include <openssl/asn1.h> | 61 | #include <openssl/asn1.h> |
62 | #include <openssl/asn1_mac.h> | 62 | #include <openssl/asn1t.h> |
63 | #include <openssl/x509v3.h> | 63 | #include <openssl/x509v3.h> |
64 | 64 | ||
65 | static int i2r_PKEY_USAGE_PERIOD(X509V3_EXT_METHOD *method, PKEY_USAGE_PERIOD *usage, BIO *out, int indent); | 65 | static int i2r_PKEY_USAGE_PERIOD(X509V3_EXT_METHOD *method, PKEY_USAGE_PERIOD *usage, BIO *out, int indent); |
@@ -67,62 +67,19 @@ static int i2r_PKEY_USAGE_PERIOD(X509V3_EXT_METHOD *method, PKEY_USAGE_PERIOD *u | |||
67 | static PKEY_USAGE_PERIOD *v2i_PKEY_USAGE_PERIOD(X509V3_EXT_METHOD *method, X509V3_CTX *ctx, STACK_OF(CONF_VALUE) *values); | 67 | static PKEY_USAGE_PERIOD *v2i_PKEY_USAGE_PERIOD(X509V3_EXT_METHOD *method, X509V3_CTX *ctx, STACK_OF(CONF_VALUE) *values); |
68 | */ | 68 | */ |
69 | X509V3_EXT_METHOD v3_pkey_usage_period = { | 69 | X509V3_EXT_METHOD v3_pkey_usage_period = { |
70 | NID_private_key_usage_period, 0, | 70 | NID_private_key_usage_period, 0, ASN1_ITEM_ref(PKEY_USAGE_PERIOD), |
71 | (X509V3_EXT_NEW)PKEY_USAGE_PERIOD_new, | 71 | 0,0,0,0, |
72 | (X509V3_EXT_FREE)PKEY_USAGE_PERIOD_free, | 72 | 0,0,0,0, |
73 | (X509V3_EXT_D2I)d2i_PKEY_USAGE_PERIOD, | ||
74 | (X509V3_EXT_I2D)i2d_PKEY_USAGE_PERIOD, | ||
75 | NULL, NULL, NULL, NULL, | ||
76 | (X509V3_EXT_I2R)i2r_PKEY_USAGE_PERIOD, NULL, | 73 | (X509V3_EXT_I2R)i2r_PKEY_USAGE_PERIOD, NULL, |
77 | NULL | 74 | NULL |
78 | }; | 75 | }; |
79 | 76 | ||
80 | int i2d_PKEY_USAGE_PERIOD(PKEY_USAGE_PERIOD *a, unsigned char **pp) | 77 | ASN1_SEQUENCE(PKEY_USAGE_PERIOD) = { |
81 | { | 78 | ASN1_IMP_OPT(PKEY_USAGE_PERIOD, notBefore, ASN1_GENERALIZEDTIME, 0), |
82 | M_ASN1_I2D_vars(a); | 79 | ASN1_IMP_OPT(PKEY_USAGE_PERIOD, notAfter, ASN1_GENERALIZEDTIME, 1) |
83 | 80 | } ASN1_SEQUENCE_END(PKEY_USAGE_PERIOD) | |
84 | M_ASN1_I2D_len_IMP_opt (a->notBefore, i2d_ASN1_GENERALIZEDTIME); | ||
85 | M_ASN1_I2D_len_IMP_opt (a->notAfter, i2d_ASN1_GENERALIZEDTIME); | ||
86 | |||
87 | M_ASN1_I2D_seq_total(); | ||
88 | |||
89 | M_ASN1_I2D_put_IMP_opt (a->notBefore, i2d_ASN1_GENERALIZEDTIME, 0); | ||
90 | M_ASN1_I2D_put_IMP_opt (a->notAfter, i2d_ASN1_GENERALIZEDTIME, 1); | ||
91 | |||
92 | M_ASN1_I2D_finish(); | ||
93 | } | ||
94 | |||
95 | PKEY_USAGE_PERIOD *PKEY_USAGE_PERIOD_new(void) | ||
96 | { | ||
97 | PKEY_USAGE_PERIOD *ret=NULL; | ||
98 | ASN1_CTX c; | ||
99 | M_ASN1_New_Malloc(ret, PKEY_USAGE_PERIOD); | ||
100 | ret->notBefore = NULL; | ||
101 | ret->notAfter = NULL; | ||
102 | return (ret); | ||
103 | M_ASN1_New_Error(ASN1_F_PKEY_USAGE_PERIOD_NEW); | ||
104 | } | ||
105 | 81 | ||
106 | PKEY_USAGE_PERIOD *d2i_PKEY_USAGE_PERIOD(PKEY_USAGE_PERIOD **a, | 82 | IMPLEMENT_ASN1_FUNCTIONS(PKEY_USAGE_PERIOD) |
107 | unsigned char **pp, long length) | ||
108 | { | ||
109 | M_ASN1_D2I_vars(a,PKEY_USAGE_PERIOD *,PKEY_USAGE_PERIOD_new); | ||
110 | M_ASN1_D2I_Init(); | ||
111 | M_ASN1_D2I_start_sequence(); | ||
112 | M_ASN1_D2I_get_IMP_opt (ret->notBefore, d2i_ASN1_GENERALIZEDTIME, 0, | ||
113 | V_ASN1_GENERALIZEDTIME); | ||
114 | M_ASN1_D2I_get_IMP_opt (ret->notAfter, d2i_ASN1_GENERALIZEDTIME, 1, | ||
115 | V_ASN1_GENERALIZEDTIME); | ||
116 | M_ASN1_D2I_Finish(a, PKEY_USAGE_PERIOD_free, ASN1_F_D2I_PKEY_USAGE_PERIOD); | ||
117 | } | ||
118 | |||
119 | void PKEY_USAGE_PERIOD_free(PKEY_USAGE_PERIOD *a) | ||
120 | { | ||
121 | if (a == NULL) return; | ||
122 | M_ASN1_GENERALIZEDTIME_free(a->notBefore); | ||
123 | M_ASN1_GENERALIZEDTIME_free(a->notAfter); | ||
124 | OPENSSL_free (a); | ||
125 | } | ||
126 | 83 | ||
127 | static int i2r_PKEY_USAGE_PERIOD(X509V3_EXT_METHOD *method, | 84 | static int i2r_PKEY_USAGE_PERIOD(X509V3_EXT_METHOD *method, |
128 | PKEY_USAGE_PERIOD *usage, BIO *out, int indent) | 85 | PKEY_USAGE_PERIOD *usage, BIO *out, int indent) |
diff --git a/src/lib/libcrypto/x509v3/v3_prn.c b/src/lib/libcrypto/x509v3/v3_prn.c index 14b804c4ad..aeaf6170fe 100644 --- a/src/lib/libcrypto/x509v3/v3_prn.c +++ b/src/lib/libcrypto/x509v3/v3_prn.c | |||
@@ -64,6 +64,8 @@ | |||
64 | 64 | ||
65 | /* Extension printing routines */ | 65 | /* Extension printing routines */ |
66 | 66 | ||
67 | static int unknown_ext_print(BIO *out, X509_EXTENSION *ext, unsigned long flag, int indent, int supported); | ||
68 | |||
67 | /* Print out a name+value stack */ | 69 | /* Print out a name+value stack */ |
68 | 70 | ||
69 | void X509V3_EXT_val_prn(BIO *out, STACK_OF(CONF_VALUE) *val, int indent, int ml) | 71 | void X509V3_EXT_val_prn(BIO *out, STACK_OF(CONF_VALUE) *val, int indent, int ml) |
@@ -103,16 +105,22 @@ void X509V3_EXT_val_prn(BIO *out, STACK_OF(CONF_VALUE) *val, int indent, int ml) | |||
103 | 105 | ||
104 | /* Main routine: print out a general extension */ | 106 | /* Main routine: print out a general extension */ |
105 | 107 | ||
106 | int X509V3_EXT_print(BIO *out, X509_EXTENSION *ext, int flag, int indent) | 108 | int X509V3_EXT_print(BIO *out, X509_EXTENSION *ext, unsigned long flag, int indent) |
107 | { | 109 | { |
108 | char *ext_str = NULL, *value = NULL; | 110 | void *ext_str = NULL; |
111 | char *value = NULL; | ||
109 | unsigned char *p; | 112 | unsigned char *p; |
110 | X509V3_EXT_METHOD *method; | 113 | X509V3_EXT_METHOD *method; |
111 | STACK_OF(CONF_VALUE) *nval = NULL; | 114 | STACK_OF(CONF_VALUE) *nval = NULL; |
112 | int ok = 1; | 115 | int ok = 1; |
113 | if(!(method = X509V3_EXT_get(ext))) return 0; | 116 | if(!(method = X509V3_EXT_get(ext))) |
117 | return unknown_ext_print(out, ext, flag, indent, 0); | ||
114 | p = ext->value->data; | 118 | p = ext->value->data; |
115 | if(!(ext_str = method->d2i(NULL, &p, ext->value->length))) return 0; | 119 | if(method->it) ext_str = ASN1_item_d2i(NULL, &p, ext->value->length, ASN1_ITEM_ptr(method->it)); |
120 | else ext_str = method->d2i(NULL, &p, ext->value->length); | ||
121 | |||
122 | if(!ext_str) return unknown_ext_print(out, ext, flag, indent, 1); | ||
123 | |||
116 | if(method->i2s) { | 124 | if(method->i2s) { |
117 | if(!(value = method->i2s(method, ext_str))) { | 125 | if(!(value = method->i2s(method, ext_str))) { |
118 | ok = 0; | 126 | ok = 0; |
@@ -148,11 +156,71 @@ int X509V3_EXT_print(BIO *out, X509_EXTENSION *ext, int flag, int indent) | |||
148 | err: | 156 | err: |
149 | sk_CONF_VALUE_pop_free(nval, X509V3_conf_free); | 157 | sk_CONF_VALUE_pop_free(nval, X509V3_conf_free); |
150 | if(value) OPENSSL_free(value); | 158 | if(value) OPENSSL_free(value); |
151 | method->ext_free(ext_str); | 159 | if(method->it) ASN1_item_free(ext_str, ASN1_ITEM_ptr(method->it)); |
160 | else method->ext_free(ext_str); | ||
152 | return ok; | 161 | return ok; |
153 | } | 162 | } |
154 | 163 | ||
155 | #ifndef NO_FP_API | 164 | int X509V3_extensions_print(BIO *bp, char *title, STACK_OF(X509_EXTENSION) *exts, unsigned long flag, int indent) |
165 | { | ||
166 | int i, j; | ||
167 | |||
168 | if(sk_X509_EXTENSION_num(exts) <= 0) return 1; | ||
169 | |||
170 | if(title) | ||
171 | { | ||
172 | BIO_printf(bp,"%*s%s:\n",indent, "", title); | ||
173 | indent += 4; | ||
174 | } | ||
175 | |||
176 | for (i=0; i<sk_X509_EXTENSION_num(exts); i++) | ||
177 | { | ||
178 | ASN1_OBJECT *obj; | ||
179 | X509_EXTENSION *ex; | ||
180 | ex=sk_X509_EXTENSION_value(exts, i); | ||
181 | if (BIO_printf(bp,"%*s",indent, "") <= 0) return 0; | ||
182 | obj=X509_EXTENSION_get_object(ex); | ||
183 | i2a_ASN1_OBJECT(bp,obj); | ||
184 | j=X509_EXTENSION_get_critical(ex); | ||
185 | if (BIO_printf(bp,": %s\n",j?"critical":"","") <= 0) | ||
186 | return 0; | ||
187 | if(!X509V3_EXT_print(bp, ex, flag, 12)) | ||
188 | { | ||
189 | BIO_printf(bp, "%*s", indent + 4, ""); | ||
190 | M_ASN1_OCTET_STRING_print(bp,ex->value); | ||
191 | } | ||
192 | if (BIO_write(bp,"\n",1) <= 0) return 0; | ||
193 | } | ||
194 | return 1; | ||
195 | } | ||
196 | |||
197 | static int unknown_ext_print(BIO *out, X509_EXTENSION *ext, unsigned long flag, int indent, int supported) | ||
198 | { | ||
199 | switch(flag & X509V3_EXT_UNKNOWN_MASK) { | ||
200 | |||
201 | case X509V3_EXT_DEFAULT: | ||
202 | return 0; | ||
203 | |||
204 | case X509V3_EXT_ERROR_UNKNOWN: | ||
205 | if(supported) | ||
206 | BIO_printf(out, "%*s<Parse Error>", indent, ""); | ||
207 | else | ||
208 | BIO_printf(out, "%*s<Not Supported>", indent, ""); | ||
209 | return 1; | ||
210 | |||
211 | case X509V3_EXT_PARSE_UNKNOWN: | ||
212 | return ASN1_parse_dump(out, | ||
213 | ext->value->data, ext->value->length, indent, -1); | ||
214 | case X509V3_EXT_DUMP_UNKNOWN: | ||
215 | return BIO_dump_indent(out, (char *)ext->value->data, ext->value->length, indent); | ||
216 | |||
217 | default: | ||
218 | return 1; | ||
219 | } | ||
220 | } | ||
221 | |||
222 | |||
223 | #ifndef OPENSSL_NO_FP_API | ||
156 | int X509V3_EXT_print_fp(FILE *fp, X509_EXTENSION *ext, int flag, int indent) | 224 | int X509V3_EXT_print_fp(FILE *fp, X509_EXTENSION *ext, int flag, int indent) |
157 | { | 225 | { |
158 | BIO *bio_tmp; | 226 | BIO *bio_tmp; |
diff --git a/src/lib/libcrypto/x509v3/v3_purp.c b/src/lib/libcrypto/x509v3/v3_purp.c index 8aecd00e63..b739e4fd83 100644 --- a/src/lib/libcrypto/x509v3/v3_purp.c +++ b/src/lib/libcrypto/x509v3/v3_purp.c | |||
@@ -1,9 +1,9 @@ | |||
1 | /* v3_purp.c */ | 1 | /* v3_purp.c */ |
2 | /* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL |
3 | * project 1999. | 3 | * project 2001. |
4 | */ | 4 | */ |
5 | /* ==================================================================== | 5 | /* ==================================================================== |
6 | * Copyright (c) 1999 The OpenSSL Project. All rights reserved. | 6 | * Copyright (c) 1999-2001 The OpenSSL Project. All rights reserved. |
7 | * | 7 | * |
8 | * Redistribution and use in source and binary forms, with or without | 8 | * Redistribution and use in source and binary forms, with or without |
9 | * modification, are permitted provided that the following conditions | 9 | * modification, are permitted provided that the following conditions |
@@ -61,7 +61,6 @@ | |||
61 | #include <openssl/x509v3.h> | 61 | #include <openssl/x509v3.h> |
62 | #include <openssl/x509_vfy.h> | 62 | #include <openssl/x509_vfy.h> |
63 | 63 | ||
64 | |||
65 | static void x509v3_cache_extensions(X509 *x); | 64 | static void x509v3_cache_extensions(X509 *x); |
66 | 65 | ||
67 | static int ca_check(const X509 *x); | 66 | static int ca_check(const X509 *x); |
@@ -74,6 +73,7 @@ static int check_purpose_smime_sign(const X509_PURPOSE *xp, const X509 *x, int c | |||
74 | static int check_purpose_smime_encrypt(const X509_PURPOSE *xp, const X509 *x, int ca); | 73 | static int check_purpose_smime_encrypt(const X509_PURPOSE *xp, const X509 *x, int ca); |
75 | static int check_purpose_crl_sign(const X509_PURPOSE *xp, const X509 *x, int ca); | 74 | static int check_purpose_crl_sign(const X509_PURPOSE *xp, const X509 *x, int ca); |
76 | static int no_check(const X509_PURPOSE *xp, const X509 *x, int ca); | 75 | static int no_check(const X509_PURPOSE *xp, const X509 *x, int ca); |
76 | static int ocsp_helper(const X509_PURPOSE *xp, const X509 *x, int ca); | ||
77 | 77 | ||
78 | static int xp_cmp(const X509_PURPOSE * const *a, | 78 | static int xp_cmp(const X509_PURPOSE * const *a, |
79 | const X509_PURPOSE * const *b); | 79 | const X509_PURPOSE * const *b); |
@@ -87,6 +87,7 @@ static X509_PURPOSE xstandard[] = { | |||
87 | {X509_PURPOSE_SMIME_ENCRYPT, X509_TRUST_EMAIL, 0, check_purpose_smime_encrypt, "S/MIME encryption", "smimeencrypt", NULL}, | 87 | {X509_PURPOSE_SMIME_ENCRYPT, X509_TRUST_EMAIL, 0, check_purpose_smime_encrypt, "S/MIME encryption", "smimeencrypt", NULL}, |
88 | {X509_PURPOSE_CRL_SIGN, X509_TRUST_COMPAT, 0, check_purpose_crl_sign, "CRL signing", "crlsign", NULL}, | 88 | {X509_PURPOSE_CRL_SIGN, X509_TRUST_COMPAT, 0, check_purpose_crl_sign, "CRL signing", "crlsign", NULL}, |
89 | {X509_PURPOSE_ANY, X509_TRUST_DEFAULT, 0, no_check, "Any Purpose", "any", NULL}, | 89 | {X509_PURPOSE_ANY, X509_TRUST_DEFAULT, 0, no_check, "Any Purpose", "any", NULL}, |
90 | {X509_PURPOSE_OCSP_HELPER, X509_TRUST_COMPAT, 0, ocsp_helper, "OCSP helper", "ocsphelper", NULL}, | ||
90 | }; | 91 | }; |
91 | 92 | ||
92 | #define X509_PURPOSE_COUNT (sizeof(xstandard)/sizeof(X509_PURPOSE)) | 93 | #define X509_PURPOSE_COUNT (sizeof(xstandard)/sizeof(X509_PURPOSE)) |
@@ -120,6 +121,16 @@ int X509_check_purpose(X509 *x, int id, int ca) | |||
120 | return pt->check_purpose(pt, x, ca); | 121 | return pt->check_purpose(pt, x, ca); |
121 | } | 122 | } |
122 | 123 | ||
124 | int X509_PURPOSE_set(int *p, int purpose) | ||
125 | { | ||
126 | if(X509_PURPOSE_get_by_id(purpose) == -1) { | ||
127 | X509V3err(X509V3_F_X509_PURPOSE_SET, X509V3_R_INVALID_PURPOSE); | ||
128 | return 0; | ||
129 | } | ||
130 | *p = purpose; | ||
131 | return 1; | ||
132 | } | ||
133 | |||
123 | int X509_PURPOSE_get_count(void) | 134 | int X509_PURPOSE_get_count(void) |
124 | { | 135 | { |
125 | if(!xptable) return X509_PURPOSE_COUNT; | 136 | if(!xptable) return X509_PURPOSE_COUNT; |
@@ -144,7 +155,6 @@ int X509_PURPOSE_get_by_sname(char *sname) | |||
144 | return -1; | 155 | return -1; |
145 | } | 156 | } |
146 | 157 | ||
147 | |||
148 | int X509_PURPOSE_get_by_id(int purpose) | 158 | int X509_PURPOSE_get_by_id(int purpose) |
149 | { | 159 | { |
150 | X509_PURPOSE tmp; | 160 | X509_PURPOSE tmp; |
@@ -256,16 +266,55 @@ int X509_PURPOSE_get_trust(X509_PURPOSE *xp) | |||
256 | return xp->trust; | 266 | return xp->trust; |
257 | } | 267 | } |
258 | 268 | ||
269 | static int nid_cmp(int *a, int *b) | ||
270 | { | ||
271 | return *a - *b; | ||
272 | } | ||
273 | |||
274 | int X509_supported_extension(X509_EXTENSION *ex) | ||
275 | { | ||
276 | /* This table is a list of the NIDs of supported extensions: | ||
277 | * that is those which are used by the verify process. If | ||
278 | * an extension is critical and doesn't appear in this list | ||
279 | * then the verify process will normally reject the certificate. | ||
280 | * The list must be kept in numerical order because it will be | ||
281 | * searched using bsearch. | ||
282 | */ | ||
283 | |||
284 | static int supported_nids[] = { | ||
285 | NID_netscape_cert_type, /* 71 */ | ||
286 | NID_key_usage, /* 83 */ | ||
287 | NID_subject_alt_name, /* 85 */ | ||
288 | NID_basic_constraints, /* 87 */ | ||
289 | NID_ext_key_usage /* 126 */ | ||
290 | }; | ||
291 | |||
292 | int ex_nid; | ||
293 | |||
294 | ex_nid = OBJ_obj2nid(X509_EXTENSION_get_object(ex)); | ||
295 | |||
296 | if (ex_nid == NID_undef) | ||
297 | return 0; | ||
298 | |||
299 | if (OBJ_bsearch((char *)&ex_nid, (char *)supported_nids, | ||
300 | sizeof(supported_nids)/sizeof(int), sizeof(int), | ||
301 | (int (*)(const void *, const void *))nid_cmp)) | ||
302 | return 1; | ||
303 | return 0; | ||
304 | } | ||
305 | |||
306 | |||
259 | static void x509v3_cache_extensions(X509 *x) | 307 | static void x509v3_cache_extensions(X509 *x) |
260 | { | 308 | { |
261 | BASIC_CONSTRAINTS *bs; | 309 | BASIC_CONSTRAINTS *bs; |
262 | ASN1_BIT_STRING *usage; | 310 | ASN1_BIT_STRING *usage; |
263 | ASN1_BIT_STRING *ns; | 311 | ASN1_BIT_STRING *ns; |
264 | STACK_OF(ASN1_OBJECT) *extusage; | 312 | EXTENDED_KEY_USAGE *extusage; |
313 | X509_EXTENSION *ex; | ||
265 | 314 | ||
266 | int i; | 315 | int i; |
267 | if(x->ex_flags & EXFLAG_SET) return; | 316 | if(x->ex_flags & EXFLAG_SET) return; |
268 | #ifndef NO_SHA | 317 | #ifndef OPENSSL_NO_SHA |
269 | X509_digest(x, EVP_sha1(), x->sha1_hash, NULL); | 318 | X509_digest(x, EVP_sha1(), x->sha1_hash, NULL); |
270 | #endif | 319 | #endif |
271 | /* Does subject name match issuer ? */ | 320 | /* Does subject name match issuer ? */ |
@@ -320,6 +369,15 @@ static void x509v3_cache_extensions(X509 *x) | |||
320 | case NID_ms_sgc: | 369 | case NID_ms_sgc: |
321 | case NID_ns_sgc: | 370 | case NID_ns_sgc: |
322 | x->ex_xkusage |= XKU_SGC; | 371 | x->ex_xkusage |= XKU_SGC; |
372 | break; | ||
373 | |||
374 | case NID_OCSP_sign: | ||
375 | x->ex_xkusage |= XKU_OCSP_SIGN; | ||
376 | break; | ||
377 | |||
378 | case NID_time_stamp: | ||
379 | x->ex_xkusage |= XKU_TIMESTAMP; | ||
380 | break; | ||
323 | } | 381 | } |
324 | } | 382 | } |
325 | sk_ASN1_OBJECT_pop_free(extusage, ASN1_OBJECT_free); | 383 | sk_ASN1_OBJECT_pop_free(extusage, ASN1_OBJECT_free); |
@@ -333,6 +391,17 @@ static void x509v3_cache_extensions(X509 *x) | |||
333 | } | 391 | } |
334 | x->skid =X509_get_ext_d2i(x, NID_subject_key_identifier, NULL, NULL); | 392 | x->skid =X509_get_ext_d2i(x, NID_subject_key_identifier, NULL, NULL); |
335 | x->akid =X509_get_ext_d2i(x, NID_authority_key_identifier, NULL, NULL); | 393 | x->akid =X509_get_ext_d2i(x, NID_authority_key_identifier, NULL, NULL); |
394 | for (i = 0; i < X509_get_ext_count(x); i++) | ||
395 | { | ||
396 | ex = X509_get_ext(x, i); | ||
397 | if (!X509_EXTENSION_get_critical(ex)) | ||
398 | continue; | ||
399 | if (!X509_supported_extension(ex)) | ||
400 | { | ||
401 | x->ex_flags |= EXFLAG_CRITICAL; | ||
402 | break; | ||
403 | } | ||
404 | } | ||
336 | x->ex_flags |= EXFLAG_SET; | 405 | x->ex_flags |= EXFLAG_SET; |
337 | } | 406 | } |
338 | 407 | ||
@@ -472,6 +541,27 @@ static int check_purpose_crl_sign(const X509_PURPOSE *xp, const X509 *x, int ca) | |||
472 | return 1; | 541 | return 1; |
473 | } | 542 | } |
474 | 543 | ||
544 | /* OCSP helper: this is *not* a full OCSP check. It just checks that | ||
545 | * each CA is valid. Additional checks must be made on the chain. | ||
546 | */ | ||
547 | |||
548 | static int ocsp_helper(const X509_PURPOSE *xp, const X509 *x, int ca) | ||
549 | { | ||
550 | /* Must be a valid CA */ | ||
551 | if(ca) { | ||
552 | int ca_ret; | ||
553 | ca_ret = ca_check(x); | ||
554 | if(ca_ret != 2) return ca_ret; | ||
555 | if(x->ex_flags & EXFLAG_NSCERT) { | ||
556 | if(x->ex_nscert & NS_ANY_CA) return ca_ret; | ||
557 | return 0; | ||
558 | } | ||
559 | return 0; | ||
560 | } | ||
561 | /* leaf certificate is checked in OCSP_verify() */ | ||
562 | return 1; | ||
563 | } | ||
564 | |||
475 | static int no_check(const X509_PURPOSE *xp, const X509 *x, int ca) | 565 | static int no_check(const X509_PURPOSE *xp, const X509 *x, int ca) |
476 | { | 566 | { |
477 | return 1; | 567 | return 1; |
@@ -513,7 +603,7 @@ int X509_check_issued(X509 *issuer, X509 *subject) | |||
513 | * There may be more than one but we only take any | 603 | * There may be more than one but we only take any |
514 | * notice of the first. | 604 | * notice of the first. |
515 | */ | 605 | */ |
516 | STACK_OF(GENERAL_NAME) *gens; | 606 | GENERAL_NAMES *gens; |
517 | GENERAL_NAME *gen; | 607 | GENERAL_NAME *gen; |
518 | X509_NAME *nm = NULL; | 608 | X509_NAME *nm = NULL; |
519 | int i; | 609 | int i; |
diff --git a/src/lib/libcrypto/x509v3/v3_skey.c b/src/lib/libcrypto/x509v3/v3_skey.c index 939845fa8f..c0f044ac1b 100644 --- a/src/lib/libcrypto/x509v3/v3_skey.c +++ b/src/lib/libcrypto/x509v3/v3_skey.c | |||
@@ -63,14 +63,12 @@ | |||
63 | 63 | ||
64 | static ASN1_OCTET_STRING *s2i_skey_id(X509V3_EXT_METHOD *method, X509V3_CTX *ctx, char *str); | 64 | static ASN1_OCTET_STRING *s2i_skey_id(X509V3_EXT_METHOD *method, X509V3_CTX *ctx, char *str); |
65 | X509V3_EXT_METHOD v3_skey_id = { | 65 | X509V3_EXT_METHOD v3_skey_id = { |
66 | NID_subject_key_identifier, 0, | 66 | NID_subject_key_identifier, 0, ASN1_ITEM_ref(ASN1_OCTET_STRING), |
67 | (X509V3_EXT_NEW)ASN1_OCTET_STRING_new, | 67 | 0,0,0,0, |
68 | (X509V3_EXT_FREE)ASN1_OCTET_STRING_free, | ||
69 | (X509V3_EXT_D2I)d2i_ASN1_OCTET_STRING, | ||
70 | (X509V3_EXT_I2D)i2d_ASN1_OCTET_STRING, | ||
71 | (X509V3_EXT_I2S)i2s_ASN1_OCTET_STRING, | 68 | (X509V3_EXT_I2S)i2s_ASN1_OCTET_STRING, |
72 | (X509V3_EXT_S2I)s2i_skey_id, | 69 | (X509V3_EXT_S2I)s2i_skey_id, |
73 | NULL, NULL, NULL, NULL, NULL}; | 70 | 0,0,0,0, |
71 | NULL}; | ||
74 | 72 | ||
75 | char *i2s_ASN1_OCTET_STRING(X509V3_EXT_METHOD *method, | 73 | char *i2s_ASN1_OCTET_STRING(X509V3_EXT_METHOD *method, |
76 | ASN1_OCTET_STRING *oct) | 74 | ASN1_OCTET_STRING *oct) |
@@ -106,7 +104,6 @@ static ASN1_OCTET_STRING *s2i_skey_id(X509V3_EXT_METHOD *method, | |||
106 | ASN1_OCTET_STRING *oct; | 104 | ASN1_OCTET_STRING *oct; |
107 | ASN1_BIT_STRING *pk; | 105 | ASN1_BIT_STRING *pk; |
108 | unsigned char pkey_dig[EVP_MAX_MD_SIZE]; | 106 | unsigned char pkey_dig[EVP_MAX_MD_SIZE]; |
109 | EVP_MD_CTX md; | ||
110 | unsigned int diglen; | 107 | unsigned int diglen; |
111 | 108 | ||
112 | if(strcmp(str, "hash")) return s2i_ASN1_OCTET_STRING(method, ctx, str); | 109 | if(strcmp(str, "hash")) return s2i_ASN1_OCTET_STRING(method, ctx, str); |
@@ -132,9 +129,7 @@ static ASN1_OCTET_STRING *s2i_skey_id(X509V3_EXT_METHOD *method, | |||
132 | goto err; | 129 | goto err; |
133 | } | 130 | } |
134 | 131 | ||
135 | EVP_DigestInit(&md, EVP_sha1()); | 132 | EVP_Digest(pk->data, pk->length, pkey_dig, &diglen, EVP_sha1(), NULL); |
136 | EVP_DigestUpdate(&md, pk->data, pk->length); | ||
137 | EVP_DigestFinal(&md, pkey_dig, &diglen); | ||
138 | 133 | ||
139 | if(!M_ASN1_OCTET_STRING_set(oct, pkey_dig, diglen)) { | 134 | if(!M_ASN1_OCTET_STRING_set(oct, pkey_dig, diglen)) { |
140 | X509V3err(X509V3_F_S2I_S2I_SKEY_ID,ERR_R_MALLOC_FAILURE); | 135 | X509V3err(X509V3_F_S2I_S2I_SKEY_ID,ERR_R_MALLOC_FAILURE); |
diff --git a/src/lib/libcrypto/x509v3/v3_sxnet.c b/src/lib/libcrypto/x509v3/v3_sxnet.c index bfecacd336..d3f4ba3a72 100644 --- a/src/lib/libcrypto/x509v3/v3_sxnet.c +++ b/src/lib/libcrypto/x509v3/v3_sxnet.c | |||
@@ -60,7 +60,7 @@ | |||
60 | #include "cryptlib.h" | 60 | #include "cryptlib.h" |
61 | #include <openssl/conf.h> | 61 | #include <openssl/conf.h> |
62 | #include <openssl/asn1.h> | 62 | #include <openssl/asn1.h> |
63 | #include <openssl/asn1_mac.h> | 63 | #include <openssl/asn1t.h> |
64 | #include <openssl/x509v3.h> | 64 | #include <openssl/x509v3.h> |
65 | 65 | ||
66 | /* Support for Thawte strong extranet extension */ | 66 | /* Support for Thawte strong extranet extension */ |
@@ -73,111 +73,33 @@ static SXNET * sxnet_v2i(X509V3_EXT_METHOD *method, X509V3_CTX *ctx, | |||
73 | STACK_OF(CONF_VALUE) *nval); | 73 | STACK_OF(CONF_VALUE) *nval); |
74 | #endif | 74 | #endif |
75 | X509V3_EXT_METHOD v3_sxnet = { | 75 | X509V3_EXT_METHOD v3_sxnet = { |
76 | NID_sxnet, X509V3_EXT_MULTILINE, | 76 | NID_sxnet, X509V3_EXT_MULTILINE, ASN1_ITEM_ref(SXNET), |
77 | (X509V3_EXT_NEW)SXNET_new, | 77 | 0,0,0,0, |
78 | (X509V3_EXT_FREE)SXNET_free, | 78 | 0,0, |
79 | (X509V3_EXT_D2I)d2i_SXNET, | 79 | 0, |
80 | (X509V3_EXT_I2D)i2d_SXNET, | ||
81 | NULL, NULL, | ||
82 | NULL, | ||
83 | #ifdef SXNET_TEST | 80 | #ifdef SXNET_TEST |
84 | (X509V3_EXT_V2I)sxnet_v2i, | 81 | (X509V3_EXT_V2I)sxnet_v2i, |
85 | #else | 82 | #else |
86 | NULL, | 83 | 0, |
87 | #endif | 84 | #endif |
88 | (X509V3_EXT_I2R)sxnet_i2r, | 85 | (X509V3_EXT_I2R)sxnet_i2r, |
89 | NULL, | 86 | 0, |
90 | NULL | 87 | NULL |
91 | }; | 88 | }; |
92 | 89 | ||
90 | ASN1_SEQUENCE(SXNETID) = { | ||
91 | ASN1_SIMPLE(SXNETID, zone, ASN1_INTEGER), | ||
92 | ASN1_SIMPLE(SXNETID, user, ASN1_OCTET_STRING) | ||
93 | } ASN1_SEQUENCE_END(SXNETID) | ||
93 | 94 | ||
94 | int i2d_SXNET(SXNET *a, unsigned char **pp) | 95 | IMPLEMENT_ASN1_FUNCTIONS(SXNETID) |
95 | { | ||
96 | M_ASN1_I2D_vars(a); | ||
97 | |||
98 | M_ASN1_I2D_len (a->version, i2d_ASN1_INTEGER); | ||
99 | M_ASN1_I2D_len_SEQUENCE_type (SXNETID, a->ids, i2d_SXNETID); | ||
100 | |||
101 | M_ASN1_I2D_seq_total(); | ||
102 | |||
103 | M_ASN1_I2D_put (a->version, i2d_ASN1_INTEGER); | ||
104 | M_ASN1_I2D_put_SEQUENCE_type (SXNETID, a->ids, i2d_SXNETID); | ||
105 | 96 | ||
106 | M_ASN1_I2D_finish(); | 97 | ASN1_SEQUENCE(SXNET) = { |
107 | } | 98 | ASN1_SIMPLE(SXNET, version, ASN1_INTEGER), |
108 | 99 | ASN1_SEQUENCE_OF(SXNET, ids, SXNETID) | |
109 | SXNET *SXNET_new(void) | 100 | } ASN1_SEQUENCE_END(SXNET) |
110 | { | ||
111 | SXNET *ret=NULL; | ||
112 | ASN1_CTX c; | ||
113 | M_ASN1_New_Malloc(ret, SXNET); | ||
114 | M_ASN1_New(ret->version,M_ASN1_INTEGER_new); | ||
115 | M_ASN1_New(ret->ids,sk_SXNETID_new_null); | ||
116 | return (ret); | ||
117 | M_ASN1_New_Error(ASN1_F_SXNET_NEW); | ||
118 | } | ||
119 | 101 | ||
120 | SXNET *d2i_SXNET(SXNET **a, unsigned char **pp, long length) | 102 | IMPLEMENT_ASN1_FUNCTIONS(SXNET) |
121 | { | ||
122 | M_ASN1_D2I_vars(a,SXNET *,SXNET_new); | ||
123 | M_ASN1_D2I_Init(); | ||
124 | M_ASN1_D2I_start_sequence(); | ||
125 | M_ASN1_D2I_get (ret->version, d2i_ASN1_INTEGER); | ||
126 | M_ASN1_D2I_get_seq_type (SXNETID, ret->ids, d2i_SXNETID, SXNETID_free); | ||
127 | M_ASN1_D2I_Finish(a, SXNET_free, ASN1_F_D2I_SXNET); | ||
128 | } | ||
129 | |||
130 | void SXNET_free(SXNET *a) | ||
131 | { | ||
132 | if (a == NULL) return; | ||
133 | M_ASN1_INTEGER_free(a->version); | ||
134 | sk_SXNETID_pop_free(a->ids, SXNETID_free); | ||
135 | OPENSSL_free (a); | ||
136 | } | ||
137 | |||
138 | int i2d_SXNETID(SXNETID *a, unsigned char **pp) | ||
139 | { | ||
140 | M_ASN1_I2D_vars(a); | ||
141 | |||
142 | M_ASN1_I2D_len (a->zone, i2d_ASN1_INTEGER); | ||
143 | M_ASN1_I2D_len (a->user, i2d_ASN1_OCTET_STRING); | ||
144 | |||
145 | M_ASN1_I2D_seq_total(); | ||
146 | |||
147 | M_ASN1_I2D_put (a->zone, i2d_ASN1_INTEGER); | ||
148 | M_ASN1_I2D_put (a->user, i2d_ASN1_OCTET_STRING); | ||
149 | |||
150 | M_ASN1_I2D_finish(); | ||
151 | } | ||
152 | |||
153 | SXNETID *SXNETID_new(void) | ||
154 | { | ||
155 | SXNETID *ret=NULL; | ||
156 | ASN1_CTX c; | ||
157 | M_ASN1_New_Malloc(ret, SXNETID); | ||
158 | ret->zone = NULL; | ||
159 | M_ASN1_New(ret->user,M_ASN1_OCTET_STRING_new); | ||
160 | return (ret); | ||
161 | M_ASN1_New_Error(ASN1_F_SXNETID_NEW); | ||
162 | } | ||
163 | |||
164 | SXNETID *d2i_SXNETID(SXNETID **a, unsigned char **pp, long length) | ||
165 | { | ||
166 | M_ASN1_D2I_vars(a,SXNETID *,SXNETID_new); | ||
167 | M_ASN1_D2I_Init(); | ||
168 | M_ASN1_D2I_start_sequence(); | ||
169 | M_ASN1_D2I_get(ret->zone, d2i_ASN1_INTEGER); | ||
170 | M_ASN1_D2I_get(ret->user, d2i_ASN1_OCTET_STRING); | ||
171 | M_ASN1_D2I_Finish(a, SXNETID_free, ASN1_F_D2I_SXNETID); | ||
172 | } | ||
173 | |||
174 | void SXNETID_free(SXNETID *a) | ||
175 | { | ||
176 | if (a == NULL) return; | ||
177 | M_ASN1_INTEGER_free(a->zone); | ||
178 | M_ASN1_OCTET_STRING_free(a->user); | ||
179 | OPENSSL_free (a); | ||
180 | } | ||
181 | 103 | ||
182 | static int sxnet_i2r(X509V3_EXT_METHOD *method, SXNET *sx, BIO *out, | 104 | static int sxnet_i2r(X509V3_EXT_METHOD *method, SXNET *sx, BIO *out, |
183 | int indent) | 105 | int indent) |
diff --git a/src/lib/libcrypto/x509v3/v3_utl.c b/src/lib/libcrypto/x509v3/v3_utl.c index 619f161b58..283e943e46 100644 --- a/src/lib/libcrypto/x509v3/v3_utl.c +++ b/src/lib/libcrypto/x509v3/v3_utl.c | |||
@@ -66,7 +66,7 @@ | |||
66 | 66 | ||
67 | static char *strip_spaces(char *name); | 67 | static char *strip_spaces(char *name); |
68 | static int sk_strcmp(const char * const *a, const char * const *b); | 68 | static int sk_strcmp(const char * const *a, const char * const *b); |
69 | static STACK *get_email(X509_NAME *name, STACK_OF(GENERAL_NAME) *gens); | 69 | static STACK *get_email(X509_NAME *name, GENERAL_NAMES *gens); |
70 | static void str_free(void *str); | 70 | static void str_free(void *str); |
71 | static int append_ia5(STACK **sk, ASN1_IA5STRING *email); | 71 | static int append_ia5(STACK **sk, ASN1_IA5STRING *email); |
72 | 72 | ||
@@ -154,21 +154,40 @@ ASN1_INTEGER *s2i_ASN1_INTEGER(X509V3_EXT_METHOD *method, char *value) | |||
154 | { | 154 | { |
155 | BIGNUM *bn = NULL; | 155 | BIGNUM *bn = NULL; |
156 | ASN1_INTEGER *aint; | 156 | ASN1_INTEGER *aint; |
157 | int isneg, ishex; | ||
158 | int ret; | ||
157 | bn = BN_new(); | 159 | bn = BN_new(); |
158 | if(!value) { | 160 | if (!value) { |
159 | X509V3err(X509V3_F_S2I_ASN1_INTEGER,X509V3_R_INVALID_NULL_VALUE); | 161 | X509V3err(X509V3_F_S2I_ASN1_INTEGER,X509V3_R_INVALID_NULL_VALUE); |
160 | return 0; | 162 | return 0; |
161 | } | 163 | } |
162 | if(!BN_dec2bn(&bn, value)) { | 164 | if (value[0] == '-') { |
165 | value++; | ||
166 | isneg = 1; | ||
167 | } else isneg = 0; | ||
168 | |||
169 | if (value[0] == '0' && ((value[1] == 'x') || (value[1] == 'X'))) { | ||
170 | value += 2; | ||
171 | ishex = 1; | ||
172 | } else ishex = 0; | ||
173 | |||
174 | if (ishex) ret = BN_hex2bn(&bn, value); | ||
175 | else ret = BN_dec2bn(&bn, value); | ||
176 | |||
177 | if (!ret) { | ||
163 | X509V3err(X509V3_F_S2I_ASN1_INTEGER,X509V3_R_BN_DEC2BN_ERROR); | 178 | X509V3err(X509V3_F_S2I_ASN1_INTEGER,X509V3_R_BN_DEC2BN_ERROR); |
164 | return 0; | 179 | return 0; |
165 | } | 180 | } |
166 | 181 | ||
167 | if(!(aint = BN_to_ASN1_INTEGER(bn, NULL))) { | 182 | if (isneg && BN_is_zero(bn)) isneg = 0; |
183 | |||
184 | aint = BN_to_ASN1_INTEGER(bn, NULL); | ||
185 | BN_free(bn); | ||
186 | if (!aint) { | ||
168 | X509V3err(X509V3_F_S2I_ASN1_INTEGER,X509V3_R_BN_TO_ASN1_INTEGER_ERROR); | 187 | X509V3err(X509V3_F_S2I_ASN1_INTEGER,X509V3_R_BN_TO_ASN1_INTEGER_ERROR); |
169 | return 0; | 188 | return 0; |
170 | } | 189 | } |
171 | BN_free(bn); | 190 | if (isneg) aint->type |= V_ASN1_NEG; |
172 | return aint; | 191 | return aint; |
173 | } | 192 | } |
174 | 193 | ||
@@ -221,7 +240,7 @@ int X509V3_get_value_int(CONF_VALUE *value, ASN1_INTEGER **aint) | |||
221 | 240 | ||
222 | /*#define DEBUG*/ | 241 | /*#define DEBUG*/ |
223 | 242 | ||
224 | STACK_OF(CONF_VALUE) *X509V3_parse_list(char *line) | 243 | STACK_OF(CONF_VALUE) *X509V3_parse_list(const char *line) |
225 | { | 244 | { |
226 | char *p, *q, c; | 245 | char *p, *q, c; |
227 | char *ntmp, *vtmp; | 246 | char *ntmp, *vtmp; |
@@ -250,7 +269,7 @@ STACK_OF(CONF_VALUE) *X509V3_parse_list(char *line) | |||
250 | *p = 0; | 269 | *p = 0; |
251 | ntmp = strip_spaces(q); | 270 | ntmp = strip_spaces(q); |
252 | q = p + 1; | 271 | q = p + 1; |
253 | #ifdef DEBUG | 272 | #if 0 |
254 | printf("%s\n", ntmp); | 273 | printf("%s\n", ntmp); |
255 | #endif | 274 | #endif |
256 | if(!ntmp) { | 275 | if(!ntmp) { |
@@ -266,7 +285,7 @@ STACK_OF(CONF_VALUE) *X509V3_parse_list(char *line) | |||
266 | state = HDR_NAME; | 285 | state = HDR_NAME; |
267 | *p = 0; | 286 | *p = 0; |
268 | vtmp = strip_spaces(q); | 287 | vtmp = strip_spaces(q); |
269 | #ifdef DEBUG | 288 | #if 0 |
270 | printf("%s\n", ntmp); | 289 | printf("%s\n", ntmp); |
271 | #endif | 290 | #endif |
272 | if(!vtmp) { | 291 | if(!vtmp) { |
@@ -283,7 +302,7 @@ STACK_OF(CONF_VALUE) *X509V3_parse_list(char *line) | |||
283 | 302 | ||
284 | if(state == HDR_VALUE) { | 303 | if(state == HDR_VALUE) { |
285 | vtmp = strip_spaces(q); | 304 | vtmp = strip_spaces(q); |
286 | #ifdef DEBUG | 305 | #if 0 |
287 | printf("%s=%s\n", ntmp, vtmp); | 306 | printf("%s=%s\n", ntmp, vtmp); |
288 | #endif | 307 | #endif |
289 | if(!vtmp) { | 308 | if(!vtmp) { |
@@ -293,7 +312,7 @@ STACK_OF(CONF_VALUE) *X509V3_parse_list(char *line) | |||
293 | X509V3_add_value(ntmp, vtmp, &values); | 312 | X509V3_add_value(ntmp, vtmp, &values); |
294 | } else { | 313 | } else { |
295 | ntmp = strip_spaces(q); | 314 | ntmp = strip_spaces(q); |
296 | #ifdef DEBUG | 315 | #if 0 |
297 | printf("%s\n", ntmp); | 316 | printf("%s\n", ntmp); |
298 | #endif | 317 | #endif |
299 | if(!ntmp) { | 318 | if(!ntmp) { |
@@ -439,7 +458,7 @@ static int sk_strcmp(const char * const *a, const char * const *b) | |||
439 | 458 | ||
440 | STACK *X509_get1_email(X509 *x) | 459 | STACK *X509_get1_email(X509 *x) |
441 | { | 460 | { |
442 | STACK_OF(GENERAL_NAME) *gens; | 461 | GENERAL_NAMES *gens; |
443 | STACK *ret; | 462 | STACK *ret; |
444 | gens = X509_get_ext_d2i(x, NID_subject_alt_name, NULL, NULL); | 463 | gens = X509_get_ext_d2i(x, NID_subject_alt_name, NULL, NULL); |
445 | ret = get_email(X509_get_subject_name(x), gens); | 464 | ret = get_email(X509_get_subject_name(x), gens); |
@@ -449,7 +468,7 @@ STACK *X509_get1_email(X509 *x) | |||
449 | 468 | ||
450 | STACK *X509_REQ_get1_email(X509_REQ *x) | 469 | STACK *X509_REQ_get1_email(X509_REQ *x) |
451 | { | 470 | { |
452 | STACK_OF(GENERAL_NAME) *gens; | 471 | GENERAL_NAMES *gens; |
453 | STACK_OF(X509_EXTENSION) *exts; | 472 | STACK_OF(X509_EXTENSION) *exts; |
454 | STACK *ret; | 473 | STACK *ret; |
455 | exts = X509_REQ_get_extensions(x); | 474 | exts = X509_REQ_get_extensions(x); |
@@ -461,7 +480,7 @@ STACK *X509_REQ_get1_email(X509_REQ *x) | |||
461 | } | 480 | } |
462 | 481 | ||
463 | 482 | ||
464 | static STACK *get_email(X509_NAME *name, STACK_OF(GENERAL_NAME) *gens) | 483 | static STACK *get_email(X509_NAME *name, GENERAL_NAMES *gens) |
465 | { | 484 | { |
466 | STACK *ret = NULL; | 485 | STACK *ret = NULL; |
467 | X509_NAME_ENTRY *ne; | 486 | X509_NAME_ENTRY *ne; |
diff --git a/src/lib/libcrypto/x509v3/v3conf.c b/src/lib/libcrypto/x509v3/v3conf.c index 21cf746f45..67ee14f334 100644 --- a/src/lib/libcrypto/x509v3/v3conf.c +++ b/src/lib/libcrypto/x509v3/v3conf.c | |||
@@ -60,7 +60,6 @@ | |||
60 | #include <stdio.h> | 60 | #include <stdio.h> |
61 | #include "cryptlib.h" | 61 | #include "cryptlib.h" |
62 | #include <openssl/asn1.h> | 62 | #include <openssl/asn1.h> |
63 | #include <openssl/asn1_mac.h> | ||
64 | #include <openssl/conf.h> | 63 | #include <openssl/conf.h> |
65 | #include <openssl/x509.h> | 64 | #include <openssl/x509.h> |
66 | #include <openssl/x509v3.h> | 65 | #include <openssl/x509v3.h> |
diff --git a/src/lib/libcrypto/x509v3/v3err.c b/src/lib/libcrypto/x509v3/v3err.c index aa4a605dc4..6458e95bb9 100644 --- a/src/lib/libcrypto/x509v3/v3err.c +++ b/src/lib/libcrypto/x509v3/v3err.c | |||
@@ -63,7 +63,7 @@ | |||
63 | #include <openssl/x509v3.h> | 63 | #include <openssl/x509v3.h> |
64 | 64 | ||
65 | /* BEGIN ERROR CODES */ | 65 | /* BEGIN ERROR CODES */ |
66 | #ifndef NO_ERR | 66 | #ifndef OPENSSL_NO_ERR |
67 | static ERR_STRING_DATA X509V3_str_functs[]= | 67 | static ERR_STRING_DATA X509V3_str_functs[]= |
68 | { | 68 | { |
69 | {ERR_PACK(0,X509V3_F_COPY_EMAIL,0), "COPY_EMAIL"}, | 69 | {ERR_PACK(0,X509V3_F_COPY_EMAIL,0), "COPY_EMAIL"}, |
@@ -98,6 +98,7 @@ static ERR_STRING_DATA X509V3_str_functs[]= | |||
98 | {ERR_PACK(0,X509V3_F_V2I_GENERAL_NAME,0), "v2i_GENERAL_NAME"}, | 98 | {ERR_PACK(0,X509V3_F_V2I_GENERAL_NAME,0), "v2i_GENERAL_NAME"}, |
99 | {ERR_PACK(0,X509V3_F_V2I_GENERAL_NAMES,0), "v2i_GENERAL_NAMES"}, | 99 | {ERR_PACK(0,X509V3_F_V2I_GENERAL_NAMES,0), "v2i_GENERAL_NAMES"}, |
100 | {ERR_PACK(0,X509V3_F_V3_GENERIC_EXTENSION,0), "V3_GENERIC_EXTENSION"}, | 100 | {ERR_PACK(0,X509V3_F_V3_GENERIC_EXTENSION,0), "V3_GENERIC_EXTENSION"}, |
101 | {ERR_PACK(0,X509V3_F_X509V3_ADD_I2D,0), "X509V3_ADD_I2D"}, | ||
101 | {ERR_PACK(0,X509V3_F_X509V3_ADD_VALUE,0), "X509V3_add_value"}, | 102 | {ERR_PACK(0,X509V3_F_X509V3_ADD_VALUE,0), "X509V3_add_value"}, |
102 | {ERR_PACK(0,X509V3_F_X509V3_EXT_ADD,0), "X509V3_EXT_add"}, | 103 | {ERR_PACK(0,X509V3_F_X509V3_EXT_ADD,0), "X509V3_EXT_add"}, |
103 | {ERR_PACK(0,X509V3_F_X509V3_EXT_ADD_ALIAS,0), "X509V3_EXT_add_alias"}, | 104 | {ERR_PACK(0,X509V3_F_X509V3_EXT_ADD_ALIAS,0), "X509V3_EXT_add_alias"}, |
@@ -106,6 +107,7 @@ static ERR_STRING_DATA X509V3_str_functs[]= | |||
106 | {ERR_PACK(0,X509V3_F_X509V3_GET_VALUE_BOOL,0), "X509V3_get_value_bool"}, | 107 | {ERR_PACK(0,X509V3_F_X509V3_GET_VALUE_BOOL,0), "X509V3_get_value_bool"}, |
107 | {ERR_PACK(0,X509V3_F_X509V3_PARSE_LIST,0), "X509V3_parse_list"}, | 108 | {ERR_PACK(0,X509V3_F_X509V3_PARSE_LIST,0), "X509V3_parse_list"}, |
108 | {ERR_PACK(0,X509V3_F_X509_PURPOSE_ADD,0), "X509_PURPOSE_add"}, | 109 | {ERR_PACK(0,X509V3_F_X509_PURPOSE_ADD,0), "X509_PURPOSE_add"}, |
110 | {ERR_PACK(0,X509V3_F_X509_PURPOSE_SET,0), "X509_PURPOSE_set"}, | ||
109 | {0,NULL} | 111 | {0,NULL} |
110 | }; | 112 | }; |
111 | 113 | ||
@@ -117,8 +119,10 @@ static ERR_STRING_DATA X509V3_str_reasons[]= | |||
117 | {X509V3_R_BN_TO_ASN1_INTEGER_ERROR ,"bn to asn1 integer error"}, | 119 | {X509V3_R_BN_TO_ASN1_INTEGER_ERROR ,"bn to asn1 integer error"}, |
118 | {X509V3_R_DUPLICATE_ZONE_ID ,"duplicate zone id"}, | 120 | {X509V3_R_DUPLICATE_ZONE_ID ,"duplicate zone id"}, |
119 | {X509V3_R_ERROR_CONVERTING_ZONE ,"error converting zone"}, | 121 | {X509V3_R_ERROR_CONVERTING_ZONE ,"error converting zone"}, |
122 | {X509V3_R_ERROR_CREATING_EXTENSION ,"error creating extension"}, | ||
120 | {X509V3_R_ERROR_IN_EXTENSION ,"error in extension"}, | 123 | {X509V3_R_ERROR_IN_EXTENSION ,"error in extension"}, |
121 | {X509V3_R_EXPECTED_A_SECTION_NAME ,"expected a section name"}, | 124 | {X509V3_R_EXPECTED_A_SECTION_NAME ,"expected a section name"}, |
125 | {X509V3_R_EXTENSION_EXISTS ,"extension exists"}, | ||
122 | {X509V3_R_EXTENSION_NAME_ERROR ,"extension name error"}, | 126 | {X509V3_R_EXTENSION_NAME_ERROR ,"extension name error"}, |
123 | {X509V3_R_EXTENSION_NOT_FOUND ,"extension not found"}, | 127 | {X509V3_R_EXTENSION_NOT_FOUND ,"extension not found"}, |
124 | {X509V3_R_EXTENSION_SETTING_NOT_SUPPORTED,"extension setting not supported"}, | 128 | {X509V3_R_EXTENSION_SETTING_NOT_SUPPORTED,"extension setting not supported"}, |
@@ -135,6 +139,7 @@ static ERR_STRING_DATA X509V3_str_reasons[]= | |||
135 | {X509V3_R_INVALID_OBJECT_IDENTIFIER ,"invalid object identifier"}, | 139 | {X509V3_R_INVALID_OBJECT_IDENTIFIER ,"invalid object identifier"}, |
136 | {X509V3_R_INVALID_OPTION ,"invalid option"}, | 140 | {X509V3_R_INVALID_OPTION ,"invalid option"}, |
137 | {X509V3_R_INVALID_POLICY_IDENTIFIER ,"invalid policy identifier"}, | 141 | {X509V3_R_INVALID_POLICY_IDENTIFIER ,"invalid policy identifier"}, |
142 | {X509V3_R_INVALID_PURPOSE ,"invalid purpose"}, | ||
138 | {X509V3_R_INVALID_SECTION ,"invalid section"}, | 143 | {X509V3_R_INVALID_SECTION ,"invalid section"}, |
139 | {X509V3_R_INVALID_SYNTAX ,"invalid syntax"}, | 144 | {X509V3_R_INVALID_SYNTAX ,"invalid syntax"}, |
140 | {X509V3_R_ISSUER_DECODE_ERROR ,"issuer decode error"}, | 145 | {X509V3_R_ISSUER_DECODE_ERROR ,"issuer decode error"}, |
@@ -167,7 +172,7 @@ void ERR_load_X509V3_strings(void) | |||
167 | if (init) | 172 | if (init) |
168 | { | 173 | { |
169 | init=0; | 174 | init=0; |
170 | #ifndef NO_ERR | 175 | #ifndef OPENSSL_NO_ERR |
171 | ERR_load_strings(ERR_LIB_X509V3,X509V3_str_functs); | 176 | ERR_load_strings(ERR_LIB_X509V3,X509V3_str_functs); |
172 | ERR_load_strings(ERR_LIB_X509V3,X509V3_str_reasons); | 177 | ERR_load_strings(ERR_LIB_X509V3,X509V3_str_reasons); |
173 | #endif | 178 | #endif |
diff --git a/src/lib/libcrypto/x509v3/v3prin.c b/src/lib/libcrypto/x509v3/v3prin.c index ee798859f0..b529814319 100644 --- a/src/lib/libcrypto/x509v3/v3prin.c +++ b/src/lib/libcrypto/x509v3/v3prin.c | |||
@@ -59,9 +59,7 @@ | |||
59 | 59 | ||
60 | 60 | ||
61 | #include <stdio.h> | 61 | #include <stdio.h> |
62 | #include "cryptlib.h" | ||
63 | #include <openssl/asn1.h> | 62 | #include <openssl/asn1.h> |
64 | #include <openssl/asn1_mac.h> | ||
65 | #include <openssl/conf.h> | 63 | #include <openssl/conf.h> |
66 | #include <openssl/x509.h> | 64 | #include <openssl/x509.h> |
67 | #include <openssl/x509v3.h> | 65 | #include <openssl/x509v3.h> |
diff --git a/src/lib/libcrypto/x509v3/x509v3.h b/src/lib/libcrypto/x509v3/x509v3.h index 0453b12d63..daecc55271 100644 --- a/src/lib/libcrypto/x509v3/x509v3.h +++ b/src/lib/libcrypto/x509v3/x509v3.h | |||
@@ -88,6 +88,9 @@ typedef void * (*X509V3_EXT_R2I)(struct v3_ext_method *method, struct v3_ext_ctx | |||
88 | struct v3_ext_method { | 88 | struct v3_ext_method { |
89 | int ext_nid; | 89 | int ext_nid; |
90 | int ext_flags; | 90 | int ext_flags; |
91 | /* If this is set the following four fields are ignored */ | ||
92 | ASN1_ITEM_EXP *it; | ||
93 | /* Old style ASN1 calls */ | ||
91 | X509V3_EXT_NEW ext_new; | 94 | X509V3_EXT_NEW ext_new; |
92 | X509V3_EXT_FREE ext_free; | 95 | X509V3_EXT_FREE ext_free; |
93 | X509V3_EXT_D2I d2i; | 96 | X509V3_EXT_D2I d2i; |
@@ -156,35 +159,56 @@ ASN1_OBJECT *type_id; | |||
156 | ASN1_TYPE *value; | 159 | ASN1_TYPE *value; |
157 | } OTHERNAME; | 160 | } OTHERNAME; |
158 | 161 | ||
162 | typedef struct EDIPartyName_st { | ||
163 | ASN1_STRING *nameAssigner; | ||
164 | ASN1_STRING *partyName; | ||
165 | } EDIPARTYNAME; | ||
166 | |||
159 | typedef struct GENERAL_NAME_st { | 167 | typedef struct GENERAL_NAME_st { |
160 | 168 | ||
161 | #define GEN_OTHERNAME (0|V_ASN1_CONTEXT_SPECIFIC) | 169 | #define GEN_OTHERNAME 0 |
162 | #define GEN_EMAIL (1|V_ASN1_CONTEXT_SPECIFIC) | 170 | #define GEN_EMAIL 1 |
163 | #define GEN_DNS (2|V_ASN1_CONTEXT_SPECIFIC) | 171 | #define GEN_DNS 2 |
164 | #define GEN_X400 (3|V_ASN1_CONTEXT_SPECIFIC) | 172 | #define GEN_X400 3 |
165 | #define GEN_DIRNAME (4|V_ASN1_CONTEXT_SPECIFIC) | 173 | #define GEN_DIRNAME 4 |
166 | #define GEN_EDIPARTY (5|V_ASN1_CONTEXT_SPECIFIC) | 174 | #define GEN_EDIPARTY 5 |
167 | #define GEN_URI (6|V_ASN1_CONTEXT_SPECIFIC) | 175 | #define GEN_URI 6 |
168 | #define GEN_IPADD (7|V_ASN1_CONTEXT_SPECIFIC) | 176 | #define GEN_IPADD 7 |
169 | #define GEN_RID (8|V_ASN1_CONTEXT_SPECIFIC) | 177 | #define GEN_RID 8 |
170 | 178 | ||
171 | int type; | 179 | int type; |
172 | union { | 180 | union { |
173 | char *ptr; | 181 | char *ptr; |
174 | ASN1_IA5STRING *ia5;/* rfc822Name, dNSName, uniformResourceIdentifier */ | 182 | OTHERNAME *otherName; /* otherName */ |
183 | ASN1_IA5STRING *rfc822Name; | ||
184 | ASN1_IA5STRING *dNSName; | ||
185 | ASN1_TYPE *x400Address; | ||
186 | X509_NAME *directoryName; | ||
187 | EDIPARTYNAME *ediPartyName; | ||
188 | ASN1_IA5STRING *uniformResourceIdentifier; | ||
189 | ASN1_OCTET_STRING *iPAddress; | ||
190 | ASN1_OBJECT *registeredID; | ||
191 | |||
192 | /* Old names */ | ||
175 | ASN1_OCTET_STRING *ip; /* iPAddress */ | 193 | ASN1_OCTET_STRING *ip; /* iPAddress */ |
176 | X509_NAME *dirn; /* dirn */ | 194 | X509_NAME *dirn; /* dirn */ |
195 | ASN1_IA5STRING *ia5;/* rfc822Name, dNSName, uniformResourceIdentifier */ | ||
177 | ASN1_OBJECT *rid; /* registeredID */ | 196 | ASN1_OBJECT *rid; /* registeredID */ |
178 | OTHERNAME *otherName; /* otherName */ | 197 | ASN1_TYPE *other; /* x400Address */ |
179 | ASN1_TYPE *other; /* ediPartyName, x400Address */ | ||
180 | } d; | 198 | } d; |
181 | } GENERAL_NAME; | 199 | } GENERAL_NAME; |
182 | 200 | ||
201 | typedef STACK_OF(GENERAL_NAME) GENERAL_NAMES; | ||
202 | |||
183 | typedef struct ACCESS_DESCRIPTION_st { | 203 | typedef struct ACCESS_DESCRIPTION_st { |
184 | ASN1_OBJECT *method; | 204 | ASN1_OBJECT *method; |
185 | GENERAL_NAME *location; | 205 | GENERAL_NAME *location; |
186 | } ACCESS_DESCRIPTION; | 206 | } ACCESS_DESCRIPTION; |
187 | 207 | ||
208 | typedef STACK_OF(ACCESS_DESCRIPTION) AUTHORITY_INFO_ACCESS; | ||
209 | |||
210 | typedef STACK_OF(ASN1_OBJECT) EXTENDED_KEY_USAGE; | ||
211 | |||
188 | DECLARE_STACK_OF(GENERAL_NAME) | 212 | DECLARE_STACK_OF(GENERAL_NAME) |
189 | DECLARE_ASN1_SET_OF(GENERAL_NAME) | 213 | DECLARE_ASN1_SET_OF(GENERAL_NAME) |
190 | 214 | ||
@@ -192,23 +216,27 @@ DECLARE_STACK_OF(ACCESS_DESCRIPTION) | |||
192 | DECLARE_ASN1_SET_OF(ACCESS_DESCRIPTION) | 216 | DECLARE_ASN1_SET_OF(ACCESS_DESCRIPTION) |
193 | 217 | ||
194 | typedef struct DIST_POINT_NAME_st { | 218 | typedef struct DIST_POINT_NAME_st { |
195 | /* NB: this is a CHOICE type and only one of these should be set */ | 219 | int type; |
196 | STACK_OF(GENERAL_NAME) *fullname; | 220 | union { |
197 | STACK_OF(X509_NAME_ENTRY) *relativename; | 221 | GENERAL_NAMES *fullname; |
222 | STACK_OF(X509_NAME_ENTRY) *relativename; | ||
223 | } name; | ||
198 | } DIST_POINT_NAME; | 224 | } DIST_POINT_NAME; |
199 | 225 | ||
200 | typedef struct DIST_POINT_st { | 226 | typedef struct DIST_POINT_st { |
201 | DIST_POINT_NAME *distpoint; | 227 | DIST_POINT_NAME *distpoint; |
202 | ASN1_BIT_STRING *reasons; | 228 | ASN1_BIT_STRING *reasons; |
203 | STACK_OF(GENERAL_NAME) *CRLissuer; | 229 | GENERAL_NAMES *CRLissuer; |
204 | } DIST_POINT; | 230 | } DIST_POINT; |
205 | 231 | ||
232 | typedef STACK_OF(DIST_POINT) CRL_DIST_POINTS; | ||
233 | |||
206 | DECLARE_STACK_OF(DIST_POINT) | 234 | DECLARE_STACK_OF(DIST_POINT) |
207 | DECLARE_ASN1_SET_OF(DIST_POINT) | 235 | DECLARE_ASN1_SET_OF(DIST_POINT) |
208 | 236 | ||
209 | typedef struct AUTHORITY_KEYID_st { | 237 | typedef struct AUTHORITY_KEYID_st { |
210 | ASN1_OCTET_STRING *keyid; | 238 | ASN1_OCTET_STRING *keyid; |
211 | STACK_OF(GENERAL_NAME) *issuer; | 239 | GENERAL_NAMES *issuer; |
212 | ASN1_INTEGER *serial; | 240 | ASN1_INTEGER *serial; |
213 | } AUTHORITY_KEYID; | 241 | } AUTHORITY_KEYID; |
214 | 242 | ||
@@ -254,6 +282,8 @@ typedef struct POLICYINFO_st { | |||
254 | STACK_OF(POLICYQUALINFO) *qualifiers; | 282 | STACK_OF(POLICYQUALINFO) *qualifiers; |
255 | } POLICYINFO; | 283 | } POLICYINFO; |
256 | 284 | ||
285 | typedef STACK_OF(POLICYINFO) CERTIFICATEPOLICIES; | ||
286 | |||
257 | DECLARE_STACK_OF(POLICYINFO) | 287 | DECLARE_STACK_OF(POLICYINFO) |
258 | DECLARE_ASN1_SET_OF(POLICYINFO) | 288 | DECLARE_ASN1_SET_OF(POLICYINFO) |
259 | 289 | ||
@@ -262,32 +292,24 @@ DECLARE_ASN1_SET_OF(POLICYINFO) | |||
262 | 292 | ||
263 | #define X509V3_set_ctx_test(ctx) \ | 293 | #define X509V3_set_ctx_test(ctx) \ |
264 | X509V3_set_ctx(ctx, NULL, NULL, NULL, NULL, CTX_TEST) | 294 | X509V3_set_ctx(ctx, NULL, NULL, NULL, NULL, CTX_TEST) |
265 | #define X509V3_set_ctx_nodb(ctx) ctx->db = NULL; | 295 | #define X509V3_set_ctx_nodb(ctx) (ctx)->db = NULL; |
266 | 296 | ||
267 | #define EXT_BITSTRING(nid, table) { nid, 0, \ | 297 | #define EXT_BITSTRING(nid, table) { nid, 0, ASN1_ITEM_ref(ASN1_BIT_STRING), \ |
268 | (X509V3_EXT_NEW)ASN1_BIT_STRING_new, \ | 298 | 0,0,0,0, \ |
269 | (X509V3_EXT_FREE)ASN1_BIT_STRING_free, \ | 299 | 0,0, \ |
270 | (X509V3_EXT_D2I)d2i_ASN1_BIT_STRING, \ | ||
271 | (X509V3_EXT_I2D)i2d_ASN1_BIT_STRING, \ | ||
272 | NULL, NULL, \ | ||
273 | (X509V3_EXT_I2V)i2v_ASN1_BIT_STRING, \ | 300 | (X509V3_EXT_I2V)i2v_ASN1_BIT_STRING, \ |
274 | (X509V3_EXT_V2I)v2i_ASN1_BIT_STRING, \ | 301 | (X509V3_EXT_V2I)v2i_ASN1_BIT_STRING, \ |
275 | NULL, NULL, \ | 302 | NULL, NULL, \ |
276 | (char *)table} | 303 | table} |
277 | 304 | ||
278 | #define EXT_IA5STRING(nid) { nid, 0, \ | 305 | #define EXT_IA5STRING(nid) { nid, 0, ASN1_ITEM_ref(ASN1_IA5STRING), \ |
279 | (X509V3_EXT_NEW)ASN1_IA5STRING_new, \ | 306 | 0,0,0,0, \ |
280 | (X509V3_EXT_FREE)ASN1_IA5STRING_free, \ | ||
281 | (X509V3_EXT_D2I)d2i_ASN1_IA5STRING, \ | ||
282 | (X509V3_EXT_I2D)i2d_ASN1_IA5STRING, \ | ||
283 | (X509V3_EXT_I2S)i2s_ASN1_IA5STRING, \ | 307 | (X509V3_EXT_I2S)i2s_ASN1_IA5STRING, \ |
284 | (X509V3_EXT_S2I)s2i_ASN1_IA5STRING, \ | 308 | (X509V3_EXT_S2I)s2i_ASN1_IA5STRING, \ |
285 | NULL, NULL, NULL, NULL, \ | 309 | 0,0,0,0, \ |
286 | NULL} | 310 | NULL} |
287 | 311 | ||
288 | #define EXT_END { -1, 0, NULL, NULL, NULL, NULL, NULL, NULL, \ | 312 | #define EXT_END { -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} |
289 | NULL, NULL, NULL, NULL, \ | ||
290 | NULL} | ||
291 | 313 | ||
292 | 314 | ||
293 | /* X509_PURPOSE stuff */ | 315 | /* X509_PURPOSE stuff */ |
@@ -302,6 +324,7 @@ DECLARE_ASN1_SET_OF(POLICYINFO) | |||
302 | #define EXFLAG_V1 0x40 | 324 | #define EXFLAG_V1 0x40 |
303 | #define EXFLAG_INVALID 0x80 | 325 | #define EXFLAG_INVALID 0x80 |
304 | #define EXFLAG_SET 0x100 | 326 | #define EXFLAG_SET 0x100 |
327 | #define EXFLAG_CRITICAL 0x200 | ||
305 | 328 | ||
306 | #define KU_DIGITAL_SIGNATURE 0x0080 | 329 | #define KU_DIGITAL_SIGNATURE 0x0080 |
307 | #define KU_NON_REPUDIATION 0x0040 | 330 | #define KU_NON_REPUDIATION 0x0040 |
@@ -320,12 +343,15 @@ DECLARE_ASN1_SET_OF(POLICYINFO) | |||
320 | #define NS_SSL_CA 0x04 | 343 | #define NS_SSL_CA 0x04 |
321 | #define NS_SMIME_CA 0x02 | 344 | #define NS_SMIME_CA 0x02 |
322 | #define NS_OBJSIGN_CA 0x01 | 345 | #define NS_OBJSIGN_CA 0x01 |
346 | #define NS_ANY_CA (NS_SSL_CA|NS_SMIME_CA|NS_OBJSIGN_CA) | ||
323 | 347 | ||
324 | #define XKU_SSL_SERVER 0x1 | 348 | #define XKU_SSL_SERVER 0x1 |
325 | #define XKU_SSL_CLIENT 0x2 | 349 | #define XKU_SSL_CLIENT 0x2 |
326 | #define XKU_SMIME 0x4 | 350 | #define XKU_SMIME 0x4 |
327 | #define XKU_CODE_SIGN 0x8 | 351 | #define XKU_CODE_SIGN 0x8 |
328 | #define XKU_SGC 0x10 | 352 | #define XKU_SGC 0x10 |
353 | #define XKU_OCSP_SIGN 0x20 | ||
354 | #define XKU_TIMESTAMP 0x40 | ||
329 | 355 | ||
330 | #define X509_PURPOSE_DYNAMIC 0x1 | 356 | #define X509_PURPOSE_DYNAMIC 0x1 |
331 | #define X509_PURPOSE_DYNAMIC_NAME 0x2 | 357 | #define X509_PURPOSE_DYNAMIC_NAME 0x2 |
@@ -348,33 +374,40 @@ typedef struct x509_purpose_st { | |||
348 | #define X509_PURPOSE_SMIME_ENCRYPT 5 | 374 | #define X509_PURPOSE_SMIME_ENCRYPT 5 |
349 | #define X509_PURPOSE_CRL_SIGN 6 | 375 | #define X509_PURPOSE_CRL_SIGN 6 |
350 | #define X509_PURPOSE_ANY 7 | 376 | #define X509_PURPOSE_ANY 7 |
377 | #define X509_PURPOSE_OCSP_HELPER 8 | ||
351 | 378 | ||
352 | #define X509_PURPOSE_MIN 1 | 379 | #define X509_PURPOSE_MIN 1 |
353 | #define X509_PURPOSE_MAX 7 | 380 | #define X509_PURPOSE_MAX 8 |
381 | |||
382 | /* Flags for X509V3_EXT_print() */ | ||
383 | |||
384 | #define X509V3_EXT_UNKNOWN_MASK (0xfL << 16) | ||
385 | /* Return error for unknown extensions */ | ||
386 | #define X509V3_EXT_DEFAULT 0 | ||
387 | /* Print error for unknown extensions */ | ||
388 | #define X509V3_EXT_ERROR_UNKNOWN (1L << 16) | ||
389 | /* ASN1 parse unknown extensions */ | ||
390 | #define X509V3_EXT_PARSE_UNKNOWN (2L << 16) | ||
391 | /* BIO_dump unknown extensions */ | ||
392 | #define X509V3_EXT_DUMP_UNKNOWN (3L << 16) | ||
393 | |||
394 | /* Flags for X509V3_add1_i2d */ | ||
395 | |||
396 | #define X509V3_ADD_OP_MASK 0xfL | ||
397 | #define X509V3_ADD_DEFAULT 0L | ||
398 | #define X509V3_ADD_APPEND 1L | ||
399 | #define X509V3_ADD_REPLACE 2L | ||
400 | #define X509V3_ADD_REPLACE_EXISTING 3L | ||
401 | #define X509V3_ADD_KEEP_EXISTING 4L | ||
402 | #define X509V3_ADD_DELETE 5L | ||
403 | #define X509V3_ADD_SILENT 0x10 | ||
354 | 404 | ||
355 | DECLARE_STACK_OF(X509_PURPOSE) | 405 | DECLARE_STACK_OF(X509_PURPOSE) |
356 | 406 | ||
357 | void ERR_load_X509V3_strings(void); | 407 | DECLARE_ASN1_FUNCTIONS(BASIC_CONSTRAINTS) |
358 | int i2d_BASIC_CONSTRAINTS(BASIC_CONSTRAINTS *a, unsigned char **pp); | ||
359 | BASIC_CONSTRAINTS *d2i_BASIC_CONSTRAINTS(BASIC_CONSTRAINTS **a, unsigned char **pp, long length); | ||
360 | BASIC_CONSTRAINTS *BASIC_CONSTRAINTS_new(void); | ||
361 | void BASIC_CONSTRAINTS_free(BASIC_CONSTRAINTS *a); | ||
362 | |||
363 | int i2d_GENERAL_NAME(GENERAL_NAME *a, unsigned char **pp); | ||
364 | GENERAL_NAME *d2i_GENERAL_NAME(GENERAL_NAME **a, unsigned char **pp, long length); | ||
365 | GENERAL_NAME *GENERAL_NAME_new(void); | ||
366 | void GENERAL_NAME_free(GENERAL_NAME *a); | ||
367 | STACK_OF(CONF_VALUE) *i2v_GENERAL_NAME(X509V3_EXT_METHOD *method, GENERAL_NAME *gen, STACK_OF(CONF_VALUE) *ret); | ||
368 | |||
369 | int i2d_SXNET(SXNET *a, unsigned char **pp); | ||
370 | SXNET *d2i_SXNET(SXNET **a, unsigned char **pp, long length); | ||
371 | SXNET *SXNET_new(void); | ||
372 | void SXNET_free(SXNET *a); | ||
373 | 408 | ||
374 | int i2d_SXNETID(SXNETID *a, unsigned char **pp); | 409 | DECLARE_ASN1_FUNCTIONS(SXNET) |
375 | SXNETID *d2i_SXNETID(SXNETID **a, unsigned char **pp, long length); | 410 | DECLARE_ASN1_FUNCTIONS(SXNETID) |
376 | SXNETID *SXNETID_new(void); | ||
377 | void SXNETID_free(SXNETID *a); | ||
378 | 411 | ||
379 | int SXNET_add_id_asc(SXNET **psx, char *zone, char *user, int userlen); | 412 | int SXNET_add_id_asc(SXNET **psx, char *zone, char *user, int userlen); |
380 | int SXNET_add_id_ulong(SXNET **psx, unsigned long lzone, char *user, int userlen); | 413 | int SXNET_add_id_ulong(SXNET **psx, unsigned long lzone, char *user, int userlen); |
@@ -384,108 +417,66 @@ ASN1_OCTET_STRING *SXNET_get_id_asc(SXNET *sx, char *zone); | |||
384 | ASN1_OCTET_STRING *SXNET_get_id_ulong(SXNET *sx, unsigned long lzone); | 417 | ASN1_OCTET_STRING *SXNET_get_id_ulong(SXNET *sx, unsigned long lzone); |
385 | ASN1_OCTET_STRING *SXNET_get_id_INTEGER(SXNET *sx, ASN1_INTEGER *zone); | 418 | ASN1_OCTET_STRING *SXNET_get_id_INTEGER(SXNET *sx, ASN1_INTEGER *zone); |
386 | 419 | ||
387 | int i2d_AUTHORITY_KEYID(AUTHORITY_KEYID *a, unsigned char **pp); | 420 | DECLARE_ASN1_FUNCTIONS(AUTHORITY_KEYID) |
388 | AUTHORITY_KEYID *d2i_AUTHORITY_KEYID(AUTHORITY_KEYID **a, unsigned char **pp, long length); | ||
389 | AUTHORITY_KEYID *AUTHORITY_KEYID_new(void); | ||
390 | void AUTHORITY_KEYID_free(AUTHORITY_KEYID *a); | ||
391 | 421 | ||
392 | int i2d_PKEY_USAGE_PERIOD(PKEY_USAGE_PERIOD *a, unsigned char **pp); | 422 | DECLARE_ASN1_FUNCTIONS(PKEY_USAGE_PERIOD) |
393 | PKEY_USAGE_PERIOD *d2i_PKEY_USAGE_PERIOD(PKEY_USAGE_PERIOD **a, unsigned char **pp, long length); | 423 | |
394 | PKEY_USAGE_PERIOD *PKEY_USAGE_PERIOD_new(void); | 424 | DECLARE_ASN1_FUNCTIONS(GENERAL_NAME) |
395 | void PKEY_USAGE_PERIOD_free(PKEY_USAGE_PERIOD *a); | 425 | |
426 | STACK_OF(CONF_VALUE) *i2v_GENERAL_NAME(X509V3_EXT_METHOD *method, GENERAL_NAME *gen, STACK_OF(CONF_VALUE) *ret); | ||
427 | int GENERAL_NAME_print(BIO *out, GENERAL_NAME *gen); | ||
428 | |||
429 | DECLARE_ASN1_FUNCTIONS(GENERAL_NAMES) | ||
396 | 430 | ||
397 | STACK_OF(GENERAL_NAME) *GENERAL_NAMES_new(void); | ||
398 | void GENERAL_NAMES_free(STACK_OF(GENERAL_NAME) *a); | ||
399 | STACK_OF(GENERAL_NAME) *d2i_GENERAL_NAMES(STACK_OF(GENERAL_NAME) **a, unsigned char **pp, long length); | ||
400 | int i2d_GENERAL_NAMES(STACK_OF(GENERAL_NAME) *a, unsigned char **pp); | ||
401 | STACK_OF(CONF_VALUE) *i2v_GENERAL_NAMES(X509V3_EXT_METHOD *method, | 431 | STACK_OF(CONF_VALUE) *i2v_GENERAL_NAMES(X509V3_EXT_METHOD *method, |
402 | STACK_OF(GENERAL_NAME) *gen, STACK_OF(CONF_VALUE) *extlist); | 432 | GENERAL_NAMES *gen, STACK_OF(CONF_VALUE) *extlist); |
403 | STACK_OF(GENERAL_NAME) *v2i_GENERAL_NAMES(X509V3_EXT_METHOD *method, | 433 | GENERAL_NAMES *v2i_GENERAL_NAMES(X509V3_EXT_METHOD *method, |
404 | X509V3_CTX *ctx, STACK_OF(CONF_VALUE) *nval); | 434 | X509V3_CTX *ctx, STACK_OF(CONF_VALUE) *nval); |
405 | 435 | ||
406 | int i2d_OTHERNAME(OTHERNAME *a, unsigned char **pp); | 436 | DECLARE_ASN1_FUNCTIONS(OTHERNAME) |
407 | OTHERNAME *OTHERNAME_new(void); | 437 | DECLARE_ASN1_FUNCTIONS(EDIPARTYNAME) |
408 | OTHERNAME *d2i_OTHERNAME(OTHERNAME **a, unsigned char **pp, long length); | ||
409 | void OTHERNAME_free(OTHERNAME *a); | ||
410 | 438 | ||
411 | char *i2s_ASN1_OCTET_STRING(X509V3_EXT_METHOD *method, ASN1_OCTET_STRING *ia5); | 439 | char *i2s_ASN1_OCTET_STRING(X509V3_EXT_METHOD *method, ASN1_OCTET_STRING *ia5); |
412 | ASN1_OCTET_STRING *s2i_ASN1_OCTET_STRING(X509V3_EXT_METHOD *method, X509V3_CTX *ctx, char *str); | 440 | ASN1_OCTET_STRING *s2i_ASN1_OCTET_STRING(X509V3_EXT_METHOD *method, X509V3_CTX *ctx, char *str); |
413 | 441 | ||
414 | int i2d_ext_ku(STACK_OF(ASN1_OBJECT) *a, unsigned char **pp); | 442 | DECLARE_ASN1_FUNCTIONS(EXTENDED_KEY_USAGE) |
415 | STACK_OF(ASN1_OBJECT) *d2i_ext_ku(STACK_OF(ASN1_OBJECT) **a, | 443 | int i2a_ACCESS_DESCRIPTION(BIO *bp, ACCESS_DESCRIPTION* a); |
416 | unsigned char **pp, long length); | 444 | |
417 | void ext_ku_free(STACK_OF(ASN1_OBJECT) *a); | 445 | DECLARE_ASN1_FUNCTIONS(CERTIFICATEPOLICIES) |
418 | STACK_OF(ASN1_OBJECT) *ext_ku_new(void); | 446 | DECLARE_ASN1_FUNCTIONS(POLICYINFO) |
419 | 447 | DECLARE_ASN1_FUNCTIONS(POLICYQUALINFO) | |
420 | int i2d_CERTIFICATEPOLICIES(STACK_OF(POLICYINFO) *a, unsigned char **pp); | 448 | DECLARE_ASN1_FUNCTIONS(USERNOTICE) |
421 | STACK_OF(POLICYINFO) *CERTIFICATEPOLICIES_new(void); | 449 | DECLARE_ASN1_FUNCTIONS(NOTICEREF) |
422 | void CERTIFICATEPOLICIES_free(STACK_OF(POLICYINFO) *a); | ||
423 | STACK_OF(POLICYINFO) *d2i_CERTIFICATEPOLICIES(STACK_OF(POLICYINFO) **a, unsigned char **pp, long length); | ||
424 | |||
425 | int i2d_POLICYINFO(POLICYINFO *a, unsigned char **pp); | ||
426 | POLICYINFO *POLICYINFO_new(void); | ||
427 | POLICYINFO *d2i_POLICYINFO(POLICYINFO **a, unsigned char **pp, long length); | ||
428 | void POLICYINFO_free(POLICYINFO *a); | ||
429 | |||
430 | int i2d_POLICYQUALINFO(POLICYQUALINFO *a, unsigned char **pp); | ||
431 | POLICYQUALINFO *POLICYQUALINFO_new(void); | ||
432 | POLICYQUALINFO *d2i_POLICYQUALINFO(POLICYQUALINFO **a, unsigned char **pp, | ||
433 | long length); | ||
434 | void POLICYQUALINFO_free(POLICYQUALINFO *a); | ||
435 | |||
436 | int i2d_USERNOTICE(USERNOTICE *a, unsigned char **pp); | ||
437 | USERNOTICE *USERNOTICE_new(void); | ||
438 | USERNOTICE *d2i_USERNOTICE(USERNOTICE **a, unsigned char **pp, long length); | ||
439 | void USERNOTICE_free(USERNOTICE *a); | ||
440 | |||
441 | int i2d_NOTICEREF(NOTICEREF *a, unsigned char **pp); | ||
442 | NOTICEREF *NOTICEREF_new(void); | ||
443 | NOTICEREF *d2i_NOTICEREF(NOTICEREF **a, unsigned char **pp, long length); | ||
444 | void NOTICEREF_free(NOTICEREF *a); | ||
445 | |||
446 | int i2d_CRL_DIST_POINTS(STACK_OF(DIST_POINT) *a, unsigned char **pp); | ||
447 | STACK_OF(DIST_POINT) *CRL_DIST_POINTS_new(void); | ||
448 | void CRL_DIST_POINTS_free(STACK_OF(DIST_POINT) *a); | ||
449 | STACK_OF(DIST_POINT) *d2i_CRL_DIST_POINTS(STACK_OF(DIST_POINT) **a, | ||
450 | unsigned char **pp,long length); | ||
451 | |||
452 | int i2d_DIST_POINT(DIST_POINT *a, unsigned char **pp); | ||
453 | DIST_POINT *DIST_POINT_new(void); | ||
454 | DIST_POINT *d2i_DIST_POINT(DIST_POINT **a, unsigned char **pp, long length); | ||
455 | void DIST_POINT_free(DIST_POINT *a); | ||
456 | |||
457 | int i2d_DIST_POINT_NAME(DIST_POINT_NAME *a, unsigned char **pp); | ||
458 | DIST_POINT_NAME *DIST_POINT_NAME_new(void); | ||
459 | void DIST_POINT_NAME_free(DIST_POINT_NAME *a); | ||
460 | DIST_POINT_NAME *d2i_DIST_POINT_NAME(DIST_POINT_NAME **a, unsigned char **pp, | ||
461 | long length); | ||
462 | |||
463 | int i2d_ACCESS_DESCRIPTION(ACCESS_DESCRIPTION *a, unsigned char **pp); | ||
464 | ACCESS_DESCRIPTION *ACCESS_DESCRIPTION_new(void); | ||
465 | void ACCESS_DESCRIPTION_free(ACCESS_DESCRIPTION *a); | ||
466 | ACCESS_DESCRIPTION *d2i_ACCESS_DESCRIPTION(ACCESS_DESCRIPTION **a, unsigned char **pp, | ||
467 | long length); | ||
468 | |||
469 | STACK_OF(ACCESS_DESCRIPTION) *AUTHORITY_INFO_ACCESS_new(void); | ||
470 | void AUTHORITY_INFO_ACCESS_free(STACK_OF(ACCESS_DESCRIPTION) *a); | ||
471 | STACK_OF(ACCESS_DESCRIPTION) *d2i_AUTHORITY_INFO_ACCESS(STACK_OF(ACCESS_DESCRIPTION) **a, | ||
472 | unsigned char **pp, long length); | ||
473 | int i2d_AUTHORITY_INFO_ACCESS(STACK_OF(ACCESS_DESCRIPTION) *a, unsigned char **pp); | ||
474 | 450 | ||
451 | DECLARE_ASN1_FUNCTIONS(CRL_DIST_POINTS) | ||
452 | DECLARE_ASN1_FUNCTIONS(DIST_POINT) | ||
453 | DECLARE_ASN1_FUNCTIONS(DIST_POINT_NAME) | ||
475 | 454 | ||
455 | DECLARE_ASN1_FUNCTIONS(ACCESS_DESCRIPTION) | ||
456 | DECLARE_ASN1_FUNCTIONS(AUTHORITY_INFO_ACCESS) | ||
476 | 457 | ||
477 | #ifdef HEADER_CONF_H | 458 | #ifdef HEADER_CONF_H |
478 | GENERAL_NAME *v2i_GENERAL_NAME(X509V3_EXT_METHOD *method, X509V3_CTX *ctx, CONF_VALUE *cnf); | 459 | GENERAL_NAME *v2i_GENERAL_NAME(X509V3_EXT_METHOD *method, X509V3_CTX *ctx, CONF_VALUE *cnf); |
479 | void X509V3_conf_free(CONF_VALUE *val); | 460 | void X509V3_conf_free(CONF_VALUE *val); |
461 | |||
462 | X509_EXTENSION *X509V3_EXT_nconf_nid(CONF *conf, X509V3_CTX *ctx, int ext_nid, char *value); | ||
463 | X509_EXTENSION *X509V3_EXT_nconf(CONF *conf, X509V3_CTX *ctx, char *name, char *value); | ||
464 | int X509V3_EXT_add_nconf_sk(CONF *conf, X509V3_CTX *ctx, char *section, STACK_OF(X509_EXTENSION) **sk); | ||
465 | int X509V3_EXT_add_nconf(CONF *conf, X509V3_CTX *ctx, char *section, X509 *cert); | ||
466 | int X509V3_EXT_REQ_add_nconf(CONF *conf, X509V3_CTX *ctx, char *section, X509_REQ *req); | ||
467 | int X509V3_EXT_CRL_add_nconf(CONF *conf, X509V3_CTX *ctx, char *section, X509_CRL *crl); | ||
468 | |||
480 | X509_EXTENSION *X509V3_EXT_conf_nid(LHASH *conf, X509V3_CTX *ctx, int ext_nid, char *value); | 469 | X509_EXTENSION *X509V3_EXT_conf_nid(LHASH *conf, X509V3_CTX *ctx, int ext_nid, char *value); |
481 | X509_EXTENSION *X509V3_EXT_conf(LHASH *conf, X509V3_CTX *ctx, char *name, char *value); | 470 | X509_EXTENSION *X509V3_EXT_conf(LHASH *conf, X509V3_CTX *ctx, char *name, char *value); |
482 | int X509V3_EXT_add_conf(LHASH *conf, X509V3_CTX *ctx, char *section, X509 *cert); | 471 | int X509V3_EXT_add_conf(LHASH *conf, X509V3_CTX *ctx, char *section, X509 *cert); |
483 | int X509V3_EXT_REQ_add_conf(LHASH *conf, X509V3_CTX *ctx, char *section, X509_REQ *req); | 472 | int X509V3_EXT_REQ_add_conf(LHASH *conf, X509V3_CTX *ctx, char *section, X509_REQ *req); |
484 | int X509V3_EXT_CRL_add_conf(LHASH *conf, X509V3_CTX *ctx, char *section, X509_CRL *crl); | 473 | int X509V3_EXT_CRL_add_conf(LHASH *conf, X509V3_CTX *ctx, char *section, X509_CRL *crl); |
474 | |||
485 | int X509V3_add_value_bool_nf(char *name, int asn1_bool, | 475 | int X509V3_add_value_bool_nf(char *name, int asn1_bool, |
486 | STACK_OF(CONF_VALUE) **extlist); | 476 | STACK_OF(CONF_VALUE) **extlist); |
487 | int X509V3_get_value_bool(CONF_VALUE *value, int *asn1_bool); | 477 | int X509V3_get_value_bool(CONF_VALUE *value, int *asn1_bool); |
488 | int X509V3_get_value_int(CONF_VALUE *value, ASN1_INTEGER **aint); | 478 | int X509V3_get_value_int(CONF_VALUE *value, ASN1_INTEGER **aint); |
479 | void X509V3_set_nconf(X509V3_CTX *ctx, CONF *conf); | ||
489 | void X509V3_set_conf_lhash(X509V3_CTX *ctx, LHASH *lhash); | 480 | void X509V3_set_conf_lhash(X509V3_CTX *ctx, LHASH *lhash); |
490 | #endif | 481 | #endif |
491 | 482 | ||
@@ -516,11 +507,13 @@ void X509V3_EXT_cleanup(void); | |||
516 | X509V3_EXT_METHOD *X509V3_EXT_get(X509_EXTENSION *ext); | 507 | X509V3_EXT_METHOD *X509V3_EXT_get(X509_EXTENSION *ext); |
517 | X509V3_EXT_METHOD *X509V3_EXT_get_nid(int nid); | 508 | X509V3_EXT_METHOD *X509V3_EXT_get_nid(int nid); |
518 | int X509V3_add_standard_extensions(void); | 509 | int X509V3_add_standard_extensions(void); |
519 | STACK_OF(CONF_VALUE) *X509V3_parse_list(char *line); | 510 | STACK_OF(CONF_VALUE) *X509V3_parse_list(const char *line); |
520 | void *X509V3_EXT_d2i(X509_EXTENSION *ext); | 511 | void *X509V3_EXT_d2i(X509_EXTENSION *ext); |
521 | void *X509V3_get_d2i(STACK_OF(X509_EXTENSION) *x, int nid, int *crit, int *idx); | 512 | void *X509V3_get_d2i(STACK_OF(X509_EXTENSION) *x, int nid, int *crit, int *idx); |
522 | 513 | ||
514 | |||
523 | X509_EXTENSION *X509V3_EXT_i2d(int ext_nid, int crit, void *ext_struc); | 515 | X509_EXTENSION *X509V3_EXT_i2d(int ext_nid, int crit, void *ext_struc); |
516 | int X509V3_add1_i2d(STACK_OF(X509_EXTENSION) **x, int nid, void *value, int crit, unsigned long flags); | ||
524 | 517 | ||
525 | char *hex_to_string(unsigned char *buffer, long len); | 518 | char *hex_to_string(unsigned char *buffer, long len); |
526 | unsigned char *string_to_hex(char *str, long *len); | 519 | unsigned char *string_to_hex(char *str, long *len); |
@@ -528,10 +521,14 @@ int name_cmp(const char *name, const char *cmp); | |||
528 | 521 | ||
529 | void X509V3_EXT_val_prn(BIO *out, STACK_OF(CONF_VALUE) *val, int indent, | 522 | void X509V3_EXT_val_prn(BIO *out, STACK_OF(CONF_VALUE) *val, int indent, |
530 | int ml); | 523 | int ml); |
531 | int X509V3_EXT_print(BIO *out, X509_EXTENSION *ext, int flag, int indent); | 524 | int X509V3_EXT_print(BIO *out, X509_EXTENSION *ext, unsigned long flag, int indent); |
532 | int X509V3_EXT_print_fp(FILE *out, X509_EXTENSION *ext, int flag, int indent); | 525 | int X509V3_EXT_print_fp(FILE *out, X509_EXTENSION *ext, int flag, int indent); |
533 | 526 | ||
527 | int X509V3_extensions_print(BIO *out, char *title, STACK_OF(X509_EXTENSION) *exts, unsigned long flag, int indent); | ||
528 | |||
534 | int X509_check_purpose(X509 *x, int id, int ca); | 529 | int X509_check_purpose(X509 *x, int id, int ca); |
530 | int X509_supported_extension(X509_EXTENSION *ex); | ||
531 | int X509_PURPOSE_set(int *p, int purpose); | ||
535 | int X509_check_issued(X509 *issuer, X509 *subject); | 532 | int X509_check_issued(X509 *issuer, X509 *subject); |
536 | int X509_PURPOSE_get_count(void); | 533 | int X509_PURPOSE_get_count(void); |
537 | X509_PURPOSE * X509_PURPOSE_get0(int idx); | 534 | X509_PURPOSE * X509_PURPOSE_get0(int idx); |
@@ -555,6 +552,7 @@ void X509_email_free(STACK *sk); | |||
555 | /* The following lines are auto generated by the script mkerr.pl. Any changes | 552 | /* The following lines are auto generated by the script mkerr.pl. Any changes |
556 | * made after this point may be overwritten when the script is next run. | 553 | * made after this point may be overwritten when the script is next run. |
557 | */ | 554 | */ |
555 | void ERR_load_X509V3_strings(void); | ||
558 | 556 | ||
559 | /* Error codes for the X509V3 functions. */ | 557 | /* Error codes for the X509V3 functions. */ |
560 | 558 | ||
@@ -591,6 +589,7 @@ void X509_email_free(STACK *sk); | |||
591 | #define X509V3_F_V2I_GENERAL_NAME 117 | 589 | #define X509V3_F_V2I_GENERAL_NAME 117 |
592 | #define X509V3_F_V2I_GENERAL_NAMES 118 | 590 | #define X509V3_F_V2I_GENERAL_NAMES 118 |
593 | #define X509V3_F_V3_GENERIC_EXTENSION 116 | 591 | #define X509V3_F_V3_GENERIC_EXTENSION 116 |
592 | #define X509V3_F_X509V3_ADD_I2D 140 | ||
594 | #define X509V3_F_X509V3_ADD_VALUE 105 | 593 | #define X509V3_F_X509V3_ADD_VALUE 105 |
595 | #define X509V3_F_X509V3_EXT_ADD 104 | 594 | #define X509V3_F_X509V3_EXT_ADD 104 |
596 | #define X509V3_F_X509V3_EXT_ADD_ALIAS 106 | 595 | #define X509V3_F_X509V3_EXT_ADD_ALIAS 106 |
@@ -599,6 +598,7 @@ void X509_email_free(STACK *sk); | |||
599 | #define X509V3_F_X509V3_GET_VALUE_BOOL 110 | 598 | #define X509V3_F_X509V3_GET_VALUE_BOOL 110 |
600 | #define X509V3_F_X509V3_PARSE_LIST 109 | 599 | #define X509V3_F_X509V3_PARSE_LIST 109 |
601 | #define X509V3_F_X509_PURPOSE_ADD 137 | 600 | #define X509V3_F_X509_PURPOSE_ADD 137 |
601 | #define X509V3_F_X509_PURPOSE_SET 141 | ||
602 | 602 | ||
603 | /* Reason codes. */ | 603 | /* Reason codes. */ |
604 | #define X509V3_R_BAD_IP_ADDRESS 118 | 604 | #define X509V3_R_BAD_IP_ADDRESS 118 |
@@ -607,8 +607,10 @@ void X509_email_free(STACK *sk); | |||
607 | #define X509V3_R_BN_TO_ASN1_INTEGER_ERROR 101 | 607 | #define X509V3_R_BN_TO_ASN1_INTEGER_ERROR 101 |
608 | #define X509V3_R_DUPLICATE_ZONE_ID 133 | 608 | #define X509V3_R_DUPLICATE_ZONE_ID 133 |
609 | #define X509V3_R_ERROR_CONVERTING_ZONE 131 | 609 | #define X509V3_R_ERROR_CONVERTING_ZONE 131 |
610 | #define X509V3_R_ERROR_CREATING_EXTENSION 144 | ||
610 | #define X509V3_R_ERROR_IN_EXTENSION 128 | 611 | #define X509V3_R_ERROR_IN_EXTENSION 128 |
611 | #define X509V3_R_EXPECTED_A_SECTION_NAME 137 | 612 | #define X509V3_R_EXPECTED_A_SECTION_NAME 137 |
613 | #define X509V3_R_EXTENSION_EXISTS 145 | ||
612 | #define X509V3_R_EXTENSION_NAME_ERROR 115 | 614 | #define X509V3_R_EXTENSION_NAME_ERROR 115 |
613 | #define X509V3_R_EXTENSION_NOT_FOUND 102 | 615 | #define X509V3_R_EXTENSION_NOT_FOUND 102 |
614 | #define X509V3_R_EXTENSION_SETTING_NOT_SUPPORTED 103 | 616 | #define X509V3_R_EXTENSION_SETTING_NOT_SUPPORTED 103 |
@@ -625,6 +627,7 @@ void X509_email_free(STACK *sk); | |||
625 | #define X509V3_R_INVALID_OBJECT_IDENTIFIER 110 | 627 | #define X509V3_R_INVALID_OBJECT_IDENTIFIER 110 |
626 | #define X509V3_R_INVALID_OPTION 138 | 628 | #define X509V3_R_INVALID_OPTION 138 |
627 | #define X509V3_R_INVALID_POLICY_IDENTIFIER 134 | 629 | #define X509V3_R_INVALID_POLICY_IDENTIFIER 134 |
630 | #define X509V3_R_INVALID_PURPOSE 146 | ||
628 | #define X509V3_R_INVALID_SECTION 135 | 631 | #define X509V3_R_INVALID_SECTION 135 |
629 | #define X509V3_R_INVALID_SYNTAX 143 | 632 | #define X509V3_R_INVALID_SYNTAX 143 |
630 | #define X509V3_R_ISSUER_DECODE_ERROR 126 | 633 | #define X509V3_R_ISSUER_DECODE_ERROR 126 |
@@ -650,4 +653,3 @@ void X509_email_free(STACK *sk); | |||
650 | } | 653 | } |
651 | #endif | 654 | #endif |
652 | #endif | 655 | #endif |
653 | |||