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