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/x509 | |
| 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/x509')
| -rw-r--r-- | src/lib/libcrypto/x509/Makefile.ssl | 647 | ||||
| -rw-r--r-- | src/lib/libcrypto/x509/by_file.c | 4 | ||||
| -rw-r--r-- | src/lib/libcrypto/x509/x509.h | 321 | ||||
| -rw-r--r-- | src/lib/libcrypto/x509/x509_att.c | 26 | ||||
| -rw-r--r-- | src/lib/libcrypto/x509/x509_cmp.c | 37 | ||||
| -rw-r--r-- | src/lib/libcrypto/x509/x509_d2.c | 2 | ||||
| -rw-r--r-- | src/lib/libcrypto/x509/x509_err.c | 8 | ||||
| -rw-r--r-- | src/lib/libcrypto/x509/x509_ext.c | 19 | ||||
| -rw-r--r-- | src/lib/libcrypto/x509/x509_lu.c | 40 | ||||
| -rw-r--r-- | src/lib/libcrypto/x509/x509_obj.c | 1 | ||||
| -rw-r--r-- | src/lib/libcrypto/x509/x509_req.c | 16 | ||||
| -rw-r--r-- | src/lib/libcrypto/x509/x509_trs.c | 29 | ||||
| -rw-r--r-- | src/lib/libcrypto/x509/x509_txt.c | 10 | ||||
| -rw-r--r-- | src/lib/libcrypto/x509/x509_v3.c | 9 | ||||
| -rw-r--r-- | src/lib/libcrypto/x509/x509_vfy.c | 347 | ||||
| -rw-r--r-- | src/lib/libcrypto/x509/x509_vfy.h | 67 | ||||
| -rw-r--r-- | src/lib/libcrypto/x509/x509cset.c | 169 | ||||
| -rw-r--r-- | src/lib/libcrypto/x509/x509spki.c | 1 | ||||
| -rw-r--r-- | src/lib/libcrypto/x509/x_all.c | 203 |
19 files changed, 1134 insertions, 822 deletions
diff --git a/src/lib/libcrypto/x509/Makefile.ssl b/src/lib/libcrypto/x509/Makefile.ssl index 79f09d4f71..62243ae812 100644 --- a/src/lib/libcrypto/x509/Makefile.ssl +++ b/src/lib/libcrypto/x509/Makefile.ssl | |||
| @@ -5,13 +5,14 @@ | |||
| 5 | DIR= x509 | 5 | DIR= x509 |
| 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 | ||
| @@ -24,13 +25,13 @@ APPS= | |||
| 24 | LIB=$(TOP)/libcrypto.a | 25 | LIB=$(TOP)/libcrypto.a |
| 25 | LIBSRC= x509_def.c x509_d2.c x509_r2x.c x509_cmp.c \ | 26 | LIBSRC= x509_def.c x509_d2.c x509_r2x.c x509_cmp.c \ |
| 26 | x509_obj.c x509_req.c x509spki.c x509_vfy.c \ | 27 | x509_obj.c x509_req.c x509spki.c x509_vfy.c \ |
| 27 | x509_set.c x509rset.c x509_err.c \ | 28 | x509_set.c x509cset.c x509rset.c x509_err.c \ |
| 28 | x509name.c x509_v3.c x509_ext.c x509_att.c \ | 29 | x509name.c x509_v3.c x509_ext.c x509_att.c \ |
| 29 | x509type.c x509_lu.c x_all.c x509_txt.c \ | 30 | x509type.c x509_lu.c x_all.c x509_txt.c \ |
| 30 | x509_trs.c by_file.c by_dir.c | 31 | x509_trs.c by_file.c by_dir.c |
| 31 | LIBOBJ= x509_def.o x509_d2.o x509_r2x.o x509_cmp.o \ | 32 | LIBOBJ= x509_def.o x509_d2.o x509_r2x.o x509_cmp.o \ |
| 32 | x509_obj.o x509_req.o x509spki.o x509_vfy.o \ | 33 | x509_obj.o x509_req.o x509spki.o x509_vfy.o \ |
| 33 | x509_set.o x509rset.o x509_err.o \ | 34 | x509_set.o x509cset.o x509rset.o x509_err.o \ |
| 34 | x509name.o x509_v3.o x509_ext.o x509_att.o \ | 35 | x509name.o x509_v3.o x509_ext.o x509_att.o \ |
| 35 | x509type.o x509_lu.o x_all.o x509_txt.o \ | 36 | x509type.o x509_lu.o x_all.o x509_txt.o \ |
| 36 | x509_trs.o by_file.o by_dir.o | 37 | x509_trs.o by_file.o by_dir.o |
| @@ -49,8 +50,7 @@ all: lib | |||
| 49 | 50 | ||
| 50 | lib: $(LIBOBJ) | 51 | lib: $(LIBOBJ) |
| 51 | $(AR) $(LIB) $(LIBOBJ) | 52 | $(AR) $(LIB) $(LIBOBJ) |
| 52 | @echo You may get an error following this line. Please ignore. | 53 | $(RANLIB) $(LIB) || echo Never mind. |
| 53 | - $(RANLIB) $(LIB) | ||
| 54 | @touch lib | 54 | @touch lib |
| 55 | 55 | ||
| 56 | files: | 56 | files: |
| @@ -89,433 +89,322 @@ clean: | |||
| 89 | 89 | ||
| 90 | # DO NOT DELETE THIS LINE -- make depend depends on it. | 90 | # DO NOT DELETE THIS LINE -- make depend depends on it. |
| 91 | 91 | ||
| 92 | by_dir.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 92 | by_dir.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 93 | by_dir.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 93 | by_dir.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h |
| 94 | by_dir.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | 94 | by_dir.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h |
| 95 | by_dir.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | 95 | by_dir.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h |
| 96 | by_dir.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | ||
| 97 | by_dir.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | ||
| 98 | by_dir.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 96 | by_dir.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 99 | by_dir.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h | 97 | by_dir.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h |
| 100 | by_dir.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | 98 | by_dir.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h |
| 101 | by_dir.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 99 | by_dir.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h |
| 102 | by_dir.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | 100 | by_dir.o: ../../include/openssl/pkcs7.h ../../include/openssl/rsa.h |
| 103 | by_dir.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | ||
| 104 | by_dir.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h | ||
| 105 | by_dir.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | ||
| 106 | by_dir.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | ||
| 107 | by_dir.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 101 | by_dir.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h |
| 108 | by_dir.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | 102 | by_dir.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h |
| 109 | by_dir.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 103 | by_dir.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h |
| 110 | by_dir.o: ../cryptlib.h | 104 | by_dir.o: ../cryptlib.h by_dir.c |
| 111 | by_file.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 105 | by_file.o: ../../e_os.h ../../include/openssl/asn1.h |
| 112 | by_file.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 106 | by_file.o: ../../include/openssl/bio.h ../../include/openssl/bn.h |
| 113 | by_file.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | 107 | by_file.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h |
| 114 | by_file.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | ||
| 115 | by_file.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 108 | by_file.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 116 | by_file.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 109 | by_file.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 117 | by_file.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 110 | by_file.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h |
| 118 | by_file.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h | ||
| 119 | by_file.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 120 | by_file.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | ||
| 121 | by_file.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | 111 | by_file.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 122 | by_file.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 112 | by_file.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 123 | by_file.o: ../../include/openssl/pem.h ../../include/openssl/pem2.h | 113 | by_file.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pem.h |
| 124 | by_file.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h | 114 | by_file.o: ../../include/openssl/pem2.h ../../include/openssl/pkcs7.h |
| 125 | by_file.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 115 | by_file.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 126 | by_file.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 116 | by_file.o: ../../include/openssl/sha.h ../../include/openssl/stack.h |
| 127 | by_file.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 117 | by_file.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h |
| 128 | by_file.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | 118 | by_file.o: ../../include/openssl/x509_vfy.h ../cryptlib.h by_file.c |
| 129 | by_file.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 119 | x509_att.o: ../../e_os.h ../../include/openssl/asn1.h |
| 130 | by_file.o: ../cryptlib.h | 120 | x509_att.o: ../../include/openssl/bio.h ../../include/openssl/bn.h |
| 131 | x509_att.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 121 | x509_att.o: ../../include/openssl/buffer.h ../../include/openssl/conf.h |
| 132 | x509_att.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 122 | x509_att.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h |
| 133 | x509_att.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | 123 | x509_att.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h |
| 134 | x509_att.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h | ||
| 135 | x509_att.o: ../../include/openssl/des.h ../../include/openssl/dh.h | ||
| 136 | x509_att.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h | ||
| 137 | x509_att.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | ||
| 138 | x509_att.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 124 | x509_att.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 139 | x509_att.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h | 125 | x509_att.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h |
| 140 | x509_att.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | 126 | x509_att.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h |
| 141 | x509_att.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 127 | x509_att.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h |
| 142 | x509_att.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | 128 | x509_att.o: ../../include/openssl/pkcs7.h ../../include/openssl/rsa.h |
| 143 | x509_att.o: ../../include/openssl/opensslconf.h | 129 | x509_att.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h |
| 144 | x509_att.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 130 | x509_att.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h |
| 145 | x509_att.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 131 | x509_att.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h |
| 146 | x509_att.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 132 | x509_att.o: ../../include/openssl/x509v3.h ../cryptlib.h x509_att.c |
| 147 | x509_att.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 133 | x509_cmp.o: ../../e_os.h ../../include/openssl/asn1.h |
| 148 | x509_att.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 134 | x509_cmp.o: ../../include/openssl/bio.h ../../include/openssl/bn.h |
| 149 | x509_att.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | 135 | x509_cmp.o: ../../include/openssl/buffer.h ../../include/openssl/conf.h |
| 150 | x509_att.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h | 136 | x509_cmp.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h |
| 151 | x509_att.o: ../cryptlib.h | 137 | x509_cmp.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h |
| 152 | x509_cmp.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
| 153 | x509_cmp.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | ||
| 154 | x509_cmp.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | ||
| 155 | x509_cmp.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h | ||
| 156 | x509_cmp.o: ../../include/openssl/des.h ../../include/openssl/dh.h | ||
| 157 | x509_cmp.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h | ||
| 158 | x509_cmp.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | ||
| 159 | x509_cmp.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 138 | x509_cmp.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 160 | x509_cmp.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h | 139 | x509_cmp.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h |
| 161 | x509_cmp.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | 140 | x509_cmp.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h |
| 162 | x509_cmp.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 141 | x509_cmp.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h |
| 163 | x509_cmp.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | 142 | x509_cmp.o: ../../include/openssl/pkcs7.h ../../include/openssl/rsa.h |
| 164 | x509_cmp.o: ../../include/openssl/opensslconf.h | 143 | x509_cmp.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h |
| 165 | x509_cmp.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 144 | x509_cmp.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h |
| 166 | x509_cmp.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 145 | x509_cmp.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h |
| 167 | x509_cmp.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 146 | x509_cmp.o: ../../include/openssl/x509v3.h ../cryptlib.h x509_cmp.c |
| 168 | x509_cmp.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 147 | x509_d2.o: ../../e_os.h ../../include/openssl/asn1.h |
| 169 | x509_cmp.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 148 | x509_d2.o: ../../include/openssl/bio.h ../../include/openssl/bn.h |
| 170 | x509_cmp.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | 149 | x509_d2.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h |
| 171 | x509_cmp.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h | ||
| 172 | x509_cmp.o: ../cryptlib.h | ||
| 173 | x509_d2.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
| 174 | x509_d2.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | ||
| 175 | x509_d2.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | ||
| 176 | x509_d2.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | ||
| 177 | x509_d2.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 150 | x509_d2.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 178 | x509_d2.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 151 | x509_d2.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 179 | x509_d2.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 152 | x509_d2.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h |
| 180 | x509_d2.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h | ||
| 181 | x509_d2.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 182 | x509_d2.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | ||
| 183 | x509_d2.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | 153 | x509_d2.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 184 | x509_d2.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | 154 | x509_d2.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 185 | x509_d2.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h | 155 | x509_d2.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h |
| 186 | x509_d2.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | 156 | x509_d2.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h |
| 187 | x509_d2.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | 157 | x509_d2.o: ../../include/openssl/sha.h ../../include/openssl/stack.h |
| 188 | x509_d2.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 158 | x509_d2.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h |
| 189 | x509_d2.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | 159 | x509_d2.o: ../../include/openssl/x509_vfy.h ../cryptlib.h x509_d2.c |
| 190 | x509_d2.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 160 | x509_def.o: ../../e_os.h ../../include/openssl/asn1.h |
| 191 | x509_d2.o: ../cryptlib.h | 161 | x509_def.o: ../../include/openssl/bio.h ../../include/openssl/bn.h |
| 192 | x509_def.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 162 | x509_def.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h |
| 193 | x509_def.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | ||
| 194 | x509_def.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | ||
| 195 | x509_def.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | ||
| 196 | x509_def.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 163 | x509_def.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 197 | x509_def.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 164 | x509_def.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 198 | x509_def.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 165 | x509_def.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h |
| 199 | x509_def.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h | ||
| 200 | x509_def.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 201 | x509_def.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | ||
| 202 | x509_def.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | 166 | x509_def.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 203 | x509_def.o: ../../include/openssl/opensslconf.h | 167 | x509_def.o: ../../include/openssl/opensslconf.h |
| 204 | x509_def.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 168 | x509_def.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h |
| 205 | x509_def.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 169 | x509_def.o: ../../include/openssl/pkcs7.h ../../include/openssl/rsa.h |
| 206 | x509_def.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 170 | x509_def.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h |
| 207 | x509_def.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 171 | x509_def.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h |
| 208 | x509_def.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 172 | x509_def.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h |
| 209 | x509_def.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | 173 | x509_def.o: ../cryptlib.h x509_def.c |
| 210 | x509_def.o: ../../include/openssl/x509_vfy.h ../cryptlib.h | ||
| 211 | x509_err.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 174 | x509_err.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 212 | x509_err.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 175 | x509_err.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h |
| 213 | x509_err.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | 176 | x509_err.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h |
| 214 | x509_err.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | 177 | x509_err.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h |
| 215 | x509_err.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 178 | x509_err.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 216 | x509_err.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 179 | x509_err.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h |
| 217 | x509_err.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | ||
| 218 | x509_err.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h | ||
| 219 | x509_err.o: ../../include/openssl/md4.h ../../include/openssl/md5.h | ||
| 220 | x509_err.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h | ||
| 221 | x509_err.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 180 | x509_err.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h |
| 222 | x509_err.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 181 | x509_err.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h |
| 223 | x509_err.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 182 | x509_err.o: ../../include/openssl/pkcs7.h ../../include/openssl/rsa.h |
| 224 | x509_err.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 183 | x509_err.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h |
| 225 | x509_err.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 184 | x509_err.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h |
| 226 | x509_err.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 185 | x509_err.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h |
| 227 | x509_err.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | 186 | x509_err.o: x509_err.c |
| 228 | x509_err.o: ../../include/openssl/x509_vfy.h | 187 | x509_ext.o: ../../e_os.h ../../include/openssl/asn1.h |
| 229 | x509_ext.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 188 | x509_ext.o: ../../include/openssl/bio.h ../../include/openssl/bn.h |
| 230 | x509_ext.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 189 | x509_ext.o: ../../include/openssl/buffer.h ../../include/openssl/conf.h |
| 231 | x509_ext.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | 190 | x509_ext.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h |
| 232 | x509_ext.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h | 191 | x509_ext.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h |
| 233 | x509_ext.o: ../../include/openssl/des.h ../../include/openssl/dh.h | ||
| 234 | x509_ext.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h | ||
| 235 | x509_ext.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | ||
| 236 | x509_ext.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 192 | x509_ext.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 237 | x509_ext.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h | 193 | x509_ext.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h |
| 238 | x509_ext.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | 194 | x509_ext.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h |
| 239 | x509_ext.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 195 | x509_ext.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h |
| 240 | x509_ext.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | 196 | x509_ext.o: ../../include/openssl/pkcs7.h ../../include/openssl/rsa.h |
| 241 | x509_ext.o: ../../include/openssl/opensslconf.h | 197 | x509_ext.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h |
| 242 | x509_ext.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 198 | x509_ext.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h |
| 243 | x509_ext.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 199 | x509_ext.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h |
| 244 | x509_ext.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 200 | x509_ext.o: ../../include/openssl/x509v3.h ../cryptlib.h x509_ext.c |
| 245 | x509_ext.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 201 | x509_lu.o: ../../e_os.h ../../include/openssl/asn1.h |
| 246 | x509_ext.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 202 | x509_lu.o: ../../include/openssl/bio.h ../../include/openssl/bn.h |
| 247 | x509_ext.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | 203 | x509_lu.o: ../../include/openssl/buffer.h ../../include/openssl/conf.h |
| 248 | x509_ext.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h | 204 | x509_lu.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h |
| 249 | x509_ext.o: ../cryptlib.h | 205 | x509_lu.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h |
| 250 | x509_lu.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
| 251 | x509_lu.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | ||
| 252 | x509_lu.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | ||
| 253 | x509_lu.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | ||
| 254 | x509_lu.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | ||
| 255 | x509_lu.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | ||
| 256 | x509_lu.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 206 | x509_lu.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 257 | x509_lu.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h | 207 | x509_lu.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h |
| 258 | x509_lu.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | 208 | x509_lu.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h |
| 259 | x509_lu.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 209 | x509_lu.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h |
| 260 | x509_lu.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | 210 | x509_lu.o: ../../include/openssl/pkcs7.h ../../include/openssl/rsa.h |
| 261 | x509_lu.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | ||
| 262 | x509_lu.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h | ||
| 263 | x509_lu.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | ||
| 264 | x509_lu.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | ||
| 265 | x509_lu.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 211 | x509_lu.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h |
| 266 | x509_lu.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | 212 | x509_lu.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h |
| 267 | x509_lu.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 213 | x509_lu.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h |
| 268 | x509_lu.o: ../cryptlib.h | 214 | x509_lu.o: ../../include/openssl/x509v3.h ../cryptlib.h x509_lu.c |
| 269 | x509_obj.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 215 | x509_obj.o: ../../e_os.h ../../include/openssl/asn1.h |
| 270 | x509_obj.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 216 | x509_obj.o: ../../include/openssl/bio.h ../../include/openssl/bn.h |
| 271 | x509_obj.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | 217 | x509_obj.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h |
| 272 | x509_obj.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | ||
| 273 | x509_obj.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 218 | x509_obj.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 274 | x509_obj.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 219 | x509_obj.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 275 | x509_obj.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 220 | x509_obj.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h |
| 276 | x509_obj.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h | ||
| 277 | x509_obj.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 278 | x509_obj.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | ||
| 279 | x509_obj.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | 221 | x509_obj.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 280 | x509_obj.o: ../../include/openssl/opensslconf.h | 222 | x509_obj.o: ../../include/openssl/opensslconf.h |
| 281 | x509_obj.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 223 | x509_obj.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h |
| 282 | x509_obj.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 224 | x509_obj.o: ../../include/openssl/pkcs7.h ../../include/openssl/rsa.h |
| 283 | x509_obj.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 225 | x509_obj.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h |
| 284 | x509_obj.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 226 | x509_obj.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h |
| 285 | x509_obj.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 227 | x509_obj.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h |
| 286 | x509_obj.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | 228 | x509_obj.o: ../cryptlib.h x509_obj.c |
| 287 | x509_obj.o: ../../include/openssl/x509_vfy.h ../cryptlib.h | 229 | x509_r2x.o: ../../e_os.h ../../include/openssl/asn1.h |
| 288 | x509_r2x.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 230 | x509_r2x.o: ../../include/openssl/bio.h ../../include/openssl/bn.h |
| 289 | x509_r2x.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 231 | x509_r2x.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h |
| 290 | x509_r2x.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | ||
| 291 | x509_r2x.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | ||
| 292 | x509_r2x.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 232 | x509_r2x.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 293 | x509_r2x.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 233 | x509_r2x.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 294 | x509_r2x.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 234 | x509_r2x.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h |
| 295 | x509_r2x.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h | ||
| 296 | x509_r2x.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 297 | x509_r2x.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | ||
| 298 | x509_r2x.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | 235 | x509_r2x.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 299 | x509_r2x.o: ../../include/openssl/opensslconf.h | 236 | x509_r2x.o: ../../include/openssl/opensslconf.h |
| 300 | x509_r2x.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 237 | x509_r2x.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h |
| 301 | x509_r2x.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 238 | x509_r2x.o: ../../include/openssl/pkcs7.h ../../include/openssl/rsa.h |
| 302 | x509_r2x.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 239 | x509_r2x.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h |
| 303 | x509_r2x.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 240 | x509_r2x.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h |
| 304 | x509_r2x.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 241 | x509_r2x.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h |
| 305 | x509_r2x.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | 242 | x509_r2x.o: ../cryptlib.h x509_r2x.c |
| 306 | x509_r2x.o: ../../include/openssl/x509_vfy.h ../cryptlib.h | 243 | x509_req.o: ../../e_os.h ../../include/openssl/asn1.h |
| 307 | x509_req.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 244 | x509_req.o: ../../include/openssl/bio.h ../../include/openssl/bn.h |
| 308 | x509_req.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 245 | x509_req.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h |
| 309 | x509_req.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | ||
| 310 | x509_req.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | ||
| 311 | x509_req.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 246 | x509_req.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 312 | x509_req.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 247 | x509_req.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 313 | x509_req.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 248 | x509_req.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h |
| 314 | x509_req.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h | ||
| 315 | x509_req.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 316 | x509_req.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | ||
| 317 | x509_req.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | 249 | x509_req.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 318 | x509_req.o: ../../include/openssl/opensslconf.h | 250 | x509_req.o: ../../include/openssl/opensslconf.h |
| 319 | x509_req.o: ../../include/openssl/opensslv.h ../../include/openssl/pem.h | 251 | x509_req.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h |
| 320 | x509_req.o: ../../include/openssl/pem2.h ../../include/openssl/pkcs7.h | 252 | x509_req.o: ../../include/openssl/pem.h ../../include/openssl/pem2.h |
| 321 | x509_req.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 253 | x509_req.o: ../../include/openssl/pkcs7.h ../../include/openssl/rsa.h |
| 322 | x509_req.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 254 | x509_req.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h |
| 323 | x509_req.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 255 | x509_req.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h |
| 324 | x509_req.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 256 | x509_req.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h |
| 325 | x509_req.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | 257 | x509_req.o: ../cryptlib.h x509_req.c |
| 326 | x509_req.o: ../../include/openssl/x509_vfy.h ../cryptlib.h | 258 | x509_set.o: ../../e_os.h ../../include/openssl/asn1.h |
| 327 | x509_set.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 259 | x509_set.o: ../../include/openssl/bio.h ../../include/openssl/bn.h |
| 328 | x509_set.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 260 | x509_set.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h |
| 329 | x509_set.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | ||
| 330 | x509_set.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | ||
| 331 | x509_set.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 261 | x509_set.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 332 | x509_set.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 262 | x509_set.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 333 | x509_set.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 263 | x509_set.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h |
| 334 | x509_set.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h | ||
| 335 | x509_set.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 336 | x509_set.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | ||
| 337 | x509_set.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | 264 | x509_set.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 338 | x509_set.o: ../../include/openssl/opensslconf.h | 265 | x509_set.o: ../../include/openssl/opensslconf.h |
| 339 | x509_set.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 266 | x509_set.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h |
| 340 | x509_set.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 267 | x509_set.o: ../../include/openssl/pkcs7.h ../../include/openssl/rsa.h |
| 341 | x509_set.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 268 | x509_set.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h |
| 342 | x509_set.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 269 | x509_set.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h |
| 343 | x509_set.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 270 | x509_set.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h |
| 344 | x509_set.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | 271 | x509_set.o: ../cryptlib.h x509_set.c |
| 345 | x509_set.o: ../../include/openssl/x509_vfy.h ../cryptlib.h | 272 | x509_trs.o: ../../e_os.h ../../include/openssl/asn1.h |
| 346 | x509_trs.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 273 | x509_trs.o: ../../include/openssl/bio.h ../../include/openssl/bn.h |
| 347 | x509_trs.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 274 | x509_trs.o: ../../include/openssl/buffer.h ../../include/openssl/conf.h |
| 348 | x509_trs.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | 275 | x509_trs.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h |
| 349 | x509_trs.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h | 276 | x509_trs.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h |
| 350 | x509_trs.o: ../../include/openssl/des.h ../../include/openssl/dh.h | ||
| 351 | x509_trs.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h | ||
| 352 | x509_trs.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | ||
| 353 | x509_trs.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 277 | x509_trs.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 354 | x509_trs.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h | 278 | x509_trs.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h |
| 355 | x509_trs.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | 279 | x509_trs.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h |
| 356 | x509_trs.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 280 | x509_trs.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h |
| 357 | x509_trs.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | 281 | x509_trs.o: ../../include/openssl/pkcs7.h ../../include/openssl/rsa.h |
| 358 | x509_trs.o: ../../include/openssl/opensslconf.h | 282 | x509_trs.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h |
| 359 | x509_trs.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 283 | x509_trs.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h |
| 360 | x509_trs.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 284 | x509_trs.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h |
| 361 | x509_trs.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 285 | x509_trs.o: ../../include/openssl/x509v3.h ../cryptlib.h x509_trs.c |
| 362 | x509_trs.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 286 | x509_txt.o: ../../e_os.h ../../include/openssl/asn1.h |
| 363 | x509_trs.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 287 | x509_txt.o: ../../include/openssl/bio.h ../../include/openssl/bn.h |
| 364 | x509_trs.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | 288 | x509_txt.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h |
| 365 | x509_trs.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h | ||
| 366 | x509_trs.o: ../cryptlib.h | ||
| 367 | x509_txt.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
| 368 | x509_txt.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | ||
| 369 | x509_txt.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | ||
| 370 | x509_txt.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | ||
| 371 | x509_txt.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 289 | x509_txt.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 372 | x509_txt.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 290 | x509_txt.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 373 | x509_txt.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 291 | x509_txt.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h |
| 374 | x509_txt.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h | ||
| 375 | x509_txt.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 376 | x509_txt.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | ||
| 377 | x509_txt.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | 292 | x509_txt.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 378 | x509_txt.o: ../../include/openssl/opensslconf.h | 293 | x509_txt.o: ../../include/openssl/opensslconf.h |
| 379 | x509_txt.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 294 | x509_txt.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h |
| 380 | x509_txt.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 295 | x509_txt.o: ../../include/openssl/pkcs7.h ../../include/openssl/rsa.h |
| 381 | x509_txt.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 296 | x509_txt.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h |
| 382 | x509_txt.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 297 | x509_txt.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h |
| 383 | x509_txt.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 298 | x509_txt.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h |
| 384 | x509_txt.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | 299 | x509_txt.o: ../cryptlib.h x509_txt.c |
| 385 | x509_txt.o: ../../include/openssl/x509_vfy.h ../cryptlib.h | 300 | x509_v3.o: ../../e_os.h ../../include/openssl/asn1.h |
| 386 | x509_v3.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 301 | x509_v3.o: ../../include/openssl/bio.h ../../include/openssl/bn.h |
| 387 | x509_v3.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 302 | x509_v3.o: ../../include/openssl/buffer.h ../../include/openssl/conf.h |
| 388 | x509_v3.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | 303 | x509_v3.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h |
| 389 | x509_v3.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h | 304 | x509_v3.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h |
| 390 | x509_v3.o: ../../include/openssl/des.h ../../include/openssl/dh.h | ||
| 391 | x509_v3.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h | ||
| 392 | x509_v3.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | ||
| 393 | x509_v3.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 305 | x509_v3.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 394 | x509_v3.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h | 306 | x509_v3.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h |
| 395 | x509_v3.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | 307 | x509_v3.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h |
| 396 | x509_v3.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 308 | x509_v3.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h |
| 397 | x509_v3.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | 309 | x509_v3.o: ../../include/openssl/pkcs7.h ../../include/openssl/rsa.h |
| 398 | x509_v3.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | ||
| 399 | x509_v3.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h | ||
| 400 | x509_v3.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | ||
| 401 | x509_v3.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | ||
| 402 | x509_v3.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 310 | x509_v3.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h |
| 403 | x509_v3.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | 311 | x509_v3.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h |
| 404 | x509_v3.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 312 | x509_v3.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h |
| 405 | x509_v3.o: ../../include/openssl/x509v3.h ../cryptlib.h | 313 | x509_v3.o: ../../include/openssl/x509v3.h ../cryptlib.h x509_v3.c |
| 406 | x509_vfy.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 314 | x509_vfy.o: ../../e_os.h ../../include/openssl/asn1.h |
| 407 | x509_vfy.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 315 | x509_vfy.o: ../../include/openssl/bio.h ../../include/openssl/bn.h |
| 408 | x509_vfy.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | 316 | x509_vfy.o: ../../include/openssl/buffer.h ../../include/openssl/conf.h |
| 409 | x509_vfy.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h | 317 | x509_vfy.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h |
| 410 | x509_vfy.o: ../../include/openssl/des.h ../../include/openssl/dh.h | 318 | x509_vfy.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h |
| 411 | x509_vfy.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h | ||
| 412 | x509_vfy.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | ||
| 413 | x509_vfy.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 319 | x509_vfy.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 414 | x509_vfy.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h | 320 | x509_vfy.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h |
| 415 | x509_vfy.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | 321 | x509_vfy.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h |
| 416 | x509_vfy.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 322 | x509_vfy.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h |
| 417 | x509_vfy.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | 323 | x509_vfy.o: ../../include/openssl/pkcs7.h ../../include/openssl/rsa.h |
| 418 | x509_vfy.o: ../../include/openssl/opensslconf.h | 324 | x509_vfy.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h |
| 419 | x509_vfy.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 325 | x509_vfy.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h |
| 420 | x509_vfy.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 326 | x509_vfy.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h |
| 421 | x509_vfy.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 327 | x509_vfy.o: ../../include/openssl/x509v3.h ../cryptlib.h x509_vfy.c |
| 422 | x509_vfy.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 328 | x509cset.o: ../../e_os.h ../../include/openssl/asn1.h |
| 423 | x509_vfy.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 329 | x509cset.o: ../../include/openssl/bio.h ../../include/openssl/bn.h |
| 424 | x509_vfy.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | 330 | x509cset.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h |
| 425 | x509_vfy.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h | 331 | x509cset.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 426 | x509_vfy.o: ../cryptlib.h | 332 | x509cset.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 427 | x509name.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 333 | x509cset.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h |
| 428 | x509name.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 334 | x509cset.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 429 | x509name.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | 335 | x509cset.o: ../../include/openssl/opensslconf.h |
| 430 | x509name.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | 336 | x509cset.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h |
| 337 | x509cset.o: ../../include/openssl/pkcs7.h ../../include/openssl/rsa.h | ||
| 338 | x509cset.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | ||
| 339 | x509cset.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 340 | x509cset.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | ||
| 341 | x509cset.o: ../cryptlib.h x509cset.c | ||
| 342 | x509name.o: ../../e_os.h ../../include/openssl/asn1.h | ||
| 343 | x509name.o: ../../include/openssl/bio.h ../../include/openssl/bn.h | ||
| 344 | x509name.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | ||
| 431 | x509name.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 345 | x509name.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 432 | x509name.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 346 | x509name.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 433 | x509name.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 347 | x509name.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h |
| 434 | x509name.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h | ||
| 435 | x509name.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 436 | x509name.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | ||
| 437 | x509name.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | 348 | x509name.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 438 | x509name.o: ../../include/openssl/opensslconf.h | 349 | x509name.o: ../../include/openssl/opensslconf.h |
| 439 | x509name.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 350 | x509name.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h |
| 440 | x509name.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 351 | x509name.o: ../../include/openssl/pkcs7.h ../../include/openssl/rsa.h |
| 441 | x509name.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 352 | x509name.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h |
| 442 | x509name.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 353 | x509name.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h |
| 443 | x509name.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 354 | x509name.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h |
| 444 | x509name.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | 355 | x509name.o: ../cryptlib.h x509name.c |
| 445 | x509name.o: ../../include/openssl/x509_vfy.h ../cryptlib.h | 356 | x509rset.o: ../../e_os.h ../../include/openssl/asn1.h |
| 446 | x509rset.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 357 | x509rset.o: ../../include/openssl/bio.h ../../include/openssl/bn.h |
| 447 | x509rset.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 358 | x509rset.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h |
| 448 | x509rset.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | ||
| 449 | x509rset.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | ||
| 450 | x509rset.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 359 | x509rset.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 451 | x509rset.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 360 | x509rset.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 452 | x509rset.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 361 | x509rset.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h |
| 453 | x509rset.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h | ||
| 454 | x509rset.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 455 | x509rset.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | ||
| 456 | x509rset.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | 362 | x509rset.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 457 | x509rset.o: ../../include/openssl/opensslconf.h | 363 | x509rset.o: ../../include/openssl/opensslconf.h |
| 458 | x509rset.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 364 | x509rset.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h |
| 459 | x509rset.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 365 | x509rset.o: ../../include/openssl/pkcs7.h ../../include/openssl/rsa.h |
| 460 | x509rset.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 366 | x509rset.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h |
| 461 | x509rset.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 367 | x509rset.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h |
| 462 | x509rset.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 368 | x509rset.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h |
| 463 | x509rset.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | 369 | x509rset.o: ../cryptlib.h x509rset.c |
| 464 | x509rset.o: ../../include/openssl/x509_vfy.h ../cryptlib.h | 370 | x509spki.o: ../../e_os.h ../../include/openssl/asn1.h |
| 465 | x509spki.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h | 371 | x509spki.o: ../../include/openssl/bio.h ../../include/openssl/bn.h |
| 466 | x509spki.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h | 372 | x509spki.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h |
| 467 | x509spki.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | 373 | x509spki.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 468 | x509spki.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h | ||
| 469 | x509spki.o: ../../include/openssl/des.h ../../include/openssl/dh.h | ||
| 470 | x509spki.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h | ||
| 471 | x509spki.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 374 | x509spki.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 472 | x509spki.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | 375 | x509spki.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h |
| 473 | x509spki.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h | 376 | x509spki.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 474 | x509spki.o: ../../include/openssl/md4.h ../../include/openssl/md5.h | 377 | x509spki.o: ../../include/openssl/opensslconf.h |
| 475 | x509spki.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h | 378 | x509spki.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h |
| 476 | x509spki.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | 379 | x509spki.o: ../../include/openssl/pkcs7.h ../../include/openssl/rsa.h |
| 477 | x509spki.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 380 | x509spki.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h |
| 478 | x509spki.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 381 | x509spki.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h |
| 479 | x509spki.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 382 | x509spki.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h |
| 480 | x509spki.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 383 | x509spki.o: ../cryptlib.h x509spki.c |
| 481 | x509spki.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 384 | x509type.o: ../../e_os.h ../../include/openssl/asn1.h |
| 482 | x509spki.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | 385 | x509type.o: ../../include/openssl/bio.h ../../include/openssl/bn.h |
| 483 | x509spki.o: ../../include/openssl/x509_vfy.h ../cryptlib.h | 386 | x509type.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h |
| 484 | x509type.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
| 485 | x509type.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | ||
| 486 | x509type.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | ||
| 487 | x509type.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | ||
| 488 | x509type.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | 387 | x509type.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h |
| 489 | x509type.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | 388 | x509type.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
| 490 | x509type.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 389 | x509type.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h |
| 491 | x509type.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h | ||
| 492 | x509type.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 493 | x509type.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | ||
| 494 | x509type.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | 390 | x509type.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h |
| 495 | x509type.o: ../../include/openssl/opensslconf.h | 391 | x509type.o: ../../include/openssl/opensslconf.h |
| 496 | x509type.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h | 392 | x509type.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h |
| 497 | x509type.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | 393 | x509type.o: ../../include/openssl/pkcs7.h ../../include/openssl/rsa.h |
| 498 | x509type.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | 394 | x509type.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h |
| 499 | x509type.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | 395 | x509type.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h |
| 500 | x509type.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | 396 | x509type.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h |
| 501 | x509type.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | 397 | x509type.o: ../cryptlib.h x509type.c |
| 502 | x509type.o: ../../include/openssl/x509_vfy.h ../cryptlib.h | 398 | x_all.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h |
| 503 | x_all.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | 399 | x_all.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h |
| 504 | x_all.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | 400 | x_all.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h |
| 505 | x_all.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | 401 | x_all.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h |
| 506 | x_all.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | ||
| 507 | x_all.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | ||
| 508 | x_all.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h | ||
| 509 | x_all.o: ../../include/openssl/err.h ../../include/openssl/evp.h | 402 | x_all.o: ../../include/openssl/err.h ../../include/openssl/evp.h |
| 510 | x_all.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h | 403 | x_all.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h |
| 511 | x_all.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | 404 | x_all.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h |
| 512 | x_all.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | 405 | x_all.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h |
| 513 | x_all.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | 406 | x_all.o: ../../include/openssl/pkcs7.h ../../include/openssl/rsa.h |
| 514 | x_all.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | ||
| 515 | x_all.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h | ||
| 516 | x_all.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | ||
| 517 | x_all.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | ||
| 518 | x_all.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | 407 | x_all.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h |
| 519 | x_all.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | 408 | x_all.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h |
| 520 | x_all.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | 409 | x_all.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h |
| 521 | x_all.o: ../cryptlib.h | 410 | x_all.o: ../cryptlib.h x_all.c |
diff --git a/src/lib/libcrypto/x509/by_file.c b/src/lib/libcrypto/x509/by_file.c index 78e9240a8d..92e00d2d73 100644 --- a/src/lib/libcrypto/x509/by_file.c +++ b/src/lib/libcrypto/x509/by_file.c | |||
| @@ -66,7 +66,7 @@ | |||
| 66 | #include <openssl/x509.h> | 66 | #include <openssl/x509.h> |
| 67 | #include <openssl/pem.h> | 67 | #include <openssl/pem.h> |
| 68 | 68 | ||
| 69 | #ifndef NO_STDIO | 69 | #ifndef OPENSSL_NO_STDIO |
| 70 | 70 | ||
| 71 | static int by_file_ctrl(X509_LOOKUP *ctx, int cmd, const char *argc, | 71 | static int by_file_ctrl(X509_LOOKUP *ctx, int cmd, const char *argc, |
| 72 | long argl, char **ret); | 72 | long argl, char **ret); |
| @@ -294,5 +294,5 @@ int X509_load_cert_crl_file(X509_LOOKUP *ctx, const char *file, int type) | |||
| 294 | } | 294 | } |
| 295 | 295 | ||
| 296 | 296 | ||
| 297 | #endif /* NO_STDIO */ | 297 | #endif /* OPENSSL_NO_STDIO */ |
| 298 | 298 | ||
diff --git a/src/lib/libcrypto/x509/x509.h b/src/lib/libcrypto/x509/x509.h index 813c8adffd..c75aa0c717 100644 --- a/src/lib/libcrypto/x509/x509.h +++ b/src/lib/libcrypto/x509/x509.h | |||
| @@ -60,47 +60,46 @@ | |||
| 60 | #define HEADER_X509_H | 60 | #define HEADER_X509_H |
| 61 | 61 | ||
| 62 | #include <openssl/symhacks.h> | 62 | #include <openssl/symhacks.h> |
| 63 | #ifndef NO_BUFFER | 63 | #ifndef OPENSSL_NO_BUFFER |
| 64 | #include <openssl/buffer.h> | 64 | #include <openssl/buffer.h> |
| 65 | #endif | 65 | #endif |
| 66 | #ifndef NO_EVP | 66 | #ifndef OPENSSL_NO_EVP |
| 67 | #include <openssl/evp.h> | 67 | #include <openssl/evp.h> |
| 68 | #endif | 68 | #endif |
| 69 | #ifndef NO_BIO | 69 | #ifndef OPENSSL_NO_BIO |
| 70 | #include <openssl/bio.h> | 70 | #include <openssl/bio.h> |
| 71 | #endif | 71 | #endif |
| 72 | #include <openssl/stack.h> | 72 | #include <openssl/stack.h> |
| 73 | #include <openssl/asn1.h> | 73 | #include <openssl/asn1.h> |
| 74 | #include <openssl/safestack.h> | 74 | #include <openssl/safestack.h> |
| 75 | 75 | ||
| 76 | #ifndef NO_RSA | 76 | #ifndef OPENSSL_NO_RSA |
| 77 | #include <openssl/rsa.h> | 77 | #include <openssl/rsa.h> |
| 78 | #endif | 78 | #endif |
| 79 | 79 | ||
| 80 | #ifndef NO_DSA | 80 | #ifndef OPENSSL_NO_DSA |
| 81 | #include <openssl/dsa.h> | 81 | #include <openssl/dsa.h> |
| 82 | #endif | 82 | #endif |
| 83 | 83 | ||
| 84 | #ifndef NO_DH | 84 | #ifndef OPENSSL_NO_DH |
| 85 | #include <openssl/dh.h> | 85 | #include <openssl/dh.h> |
| 86 | #endif | 86 | #endif |
| 87 | 87 | #ifndef OPENSSL_NO_SHA | |
| 88 | #include <openssl/sha.h> | ||
| 89 | #endif | ||
| 88 | #include <openssl/evp.h> | 90 | #include <openssl/evp.h> |
| 89 | 91 | #include <openssl/e_os2.h> | |
| 92 | #include <openssl/ossl_typ.h> | ||
| 90 | 93 | ||
| 91 | #ifdef __cplusplus | 94 | #ifdef __cplusplus |
| 92 | extern "C" { | 95 | extern "C" { |
| 93 | #endif | 96 | #endif |
| 94 | 97 | ||
| 95 | #ifdef WIN32 | 98 | #ifdef OPENSSL_SYS_WIN32 |
| 96 | /* Under Win32 this is defined in wincrypt.h */ | 99 | /* Under Win32 this is defined in wincrypt.h */ |
| 97 | #undef X509_NAME | 100 | #undef X509_NAME |
| 98 | #endif | 101 | #endif |
| 99 | 102 | ||
| 100 | /* If placed in pkcs12.h, we end up with a circular depency with pkcs7.h */ | ||
| 101 | #define DECLARE_PKCS12_STACK_OF(type) /* Nothing */ | ||
| 102 | #define IMPLEMENT_PKCS12_STACK_OF(type) /* Nothing */ | ||
| 103 | |||
| 104 | #define X509_FILETYPE_PEM 1 | 103 | #define X509_FILETYPE_PEM 1 |
| 105 | #define X509_FILETYPE_ASN1 2 | 104 | #define X509_FILETYPE_ASN1 2 |
| 106 | #define X509_FILETYPE_DEFAULT 3 | 105 | #define X509_FILETYPE_DEFAULT 3 |
| @@ -123,11 +122,11 @@ typedef struct X509_objects_st | |||
| 123 | int (*i2a)(); | 122 | int (*i2a)(); |
| 124 | } X509_OBJECTS; | 123 | } X509_OBJECTS; |
| 125 | 124 | ||
| 126 | typedef struct X509_algor_st | 125 | struct X509_algor_st |
| 127 | { | 126 | { |
| 128 | ASN1_OBJECT *algorithm; | 127 | ASN1_OBJECT *algorithm; |
| 129 | ASN1_TYPE *parameter; | 128 | ASN1_TYPE *parameter; |
| 130 | } X509_ALGOR; | 129 | } /* X509_ALGOR */; |
| 131 | 130 | ||
| 132 | DECLARE_STACK_OF(X509_ALGOR) | 131 | DECLARE_STACK_OF(X509_ALGOR) |
| 133 | DECLARE_ASN1_SET_OF(X509_ALGOR) | 132 | DECLARE_ASN1_SET_OF(X509_ALGOR) |
| @@ -163,17 +162,17 @@ DECLARE_STACK_OF(X509_NAME_ENTRY) | |||
| 163 | DECLARE_ASN1_SET_OF(X509_NAME_ENTRY) | 162 | DECLARE_ASN1_SET_OF(X509_NAME_ENTRY) |
| 164 | 163 | ||
| 165 | /* we always keep X509_NAMEs in 2 forms. */ | 164 | /* we always keep X509_NAMEs in 2 forms. */ |
| 166 | typedef struct X509_name_st | 165 | struct X509_name_st |
| 167 | { | 166 | { |
| 168 | STACK_OF(X509_NAME_ENTRY) *entries; | 167 | STACK_OF(X509_NAME_ENTRY) *entries; |
| 169 | int modified; /* true if 'bytes' needs to be built */ | 168 | int modified; /* true if 'bytes' needs to be built */ |
| 170 | #ifndef NO_BUFFER | 169 | #ifndef OPENSSL_NO_BUFFER |
| 171 | BUF_MEM *bytes; | 170 | BUF_MEM *bytes; |
| 172 | #else | 171 | #else |
| 173 | char *bytes; | 172 | char *bytes; |
| 174 | #endif | 173 | #endif |
| 175 | unsigned long hash; /* Keep the hash around for lookups */ | 174 | unsigned long hash; /* Keep the hash around for lookups */ |
| 176 | } X509_NAME; | 175 | } /* X509_NAME */; |
| 177 | 176 | ||
| 178 | DECLARE_STACK_OF(X509_NAME) | 177 | DECLARE_STACK_OF(X509_NAME) |
| 179 | 178 | ||
| @@ -182,11 +181,8 @@ DECLARE_STACK_OF(X509_NAME) | |||
| 182 | typedef struct X509_extension_st | 181 | typedef struct X509_extension_st |
| 183 | { | 182 | { |
| 184 | ASN1_OBJECT *object; | 183 | ASN1_OBJECT *object; |
| 185 | short critical; | 184 | ASN1_BOOLEAN critical; |
| 186 | short netscape_hack; | ||
| 187 | ASN1_OCTET_STRING *value; | 185 | ASN1_OCTET_STRING *value; |
| 188 | struct v3_ext_method *method; /* V3 method to use */ | ||
| 189 | void *ext_val; /* extension value */ | ||
| 190 | } X509_EXTENSION; | 186 | } X509_EXTENSION; |
| 191 | 187 | ||
| 192 | DECLARE_STACK_OF(X509_EXTENSION) | 188 | DECLARE_STACK_OF(X509_EXTENSION) |
| @@ -196,27 +192,26 @@ DECLARE_ASN1_SET_OF(X509_EXTENSION) | |||
| 196 | typedef struct x509_attributes_st | 192 | typedef struct x509_attributes_st |
| 197 | { | 193 | { |
| 198 | ASN1_OBJECT *object; | 194 | ASN1_OBJECT *object; |
| 199 | int set; /* 1 for a set, 0 for a single item (which is wrong) */ | 195 | int single; /* 0 for a set, 1 for a single item (which is wrong) */ |
| 200 | union { | 196 | union { |
| 201 | char *ptr; | 197 | char *ptr; |
| 202 | /* 1 */ STACK_OF(ASN1_TYPE) *set; | 198 | /* 0 */ STACK_OF(ASN1_TYPE) *set; |
| 203 | /* 0 */ ASN1_TYPE *single; | 199 | /* 1 */ ASN1_TYPE *single; |
| 204 | } value; | 200 | } value; |
| 205 | } X509_ATTRIBUTE; | 201 | } X509_ATTRIBUTE; |
| 206 | 202 | ||
| 207 | DECLARE_STACK_OF(X509_ATTRIBUTE) | 203 | DECLARE_STACK_OF(X509_ATTRIBUTE) |
| 208 | DECLARE_ASN1_SET_OF(X509_ATTRIBUTE) | 204 | DECLARE_ASN1_SET_OF(X509_ATTRIBUTE) |
| 209 | 205 | ||
| 206 | |||
| 210 | typedef struct X509_req_info_st | 207 | typedef struct X509_req_info_st |
| 211 | { | 208 | { |
| 212 | unsigned char *asn1; | 209 | ASN1_ENCODING enc; |
| 213 | int length; | ||
| 214 | ASN1_INTEGER *version; | 210 | ASN1_INTEGER *version; |
| 215 | X509_NAME *subject; | 211 | X509_NAME *subject; |
| 216 | X509_PUBKEY *pubkey; | 212 | X509_PUBKEY *pubkey; |
| 217 | /* d=2 hl=2 l= 0 cons: cont: 00 */ | 213 | /* d=2 hl=2 l= 0 cons: cont: 00 */ |
| 218 | STACK_OF(X509_ATTRIBUTE) *attributes; /* [ 0 ] */ | 214 | STACK_OF(X509_ATTRIBUTE) *attributes; /* [ 0 ] */ |
| 219 | int req_kludge; | ||
| 220 | } X509_REQ_INFO; | 215 | } X509_REQ_INFO; |
| 221 | 216 | ||
| 222 | typedef struct X509_req_st | 217 | typedef struct X509_req_st |
| @@ -256,7 +251,7 @@ typedef struct x509_cert_aux_st | |||
| 256 | STACK_OF(X509_ALGOR) *other; /* other unspecified info */ | 251 | STACK_OF(X509_ALGOR) *other; /* other unspecified info */ |
| 257 | } X509_CERT_AUX; | 252 | } X509_CERT_AUX; |
| 258 | 253 | ||
| 259 | typedef struct x509_st | 254 | struct x509_st |
| 260 | { | 255 | { |
| 261 | X509_CINF *cert_info; | 256 | X509_CINF *cert_info; |
| 262 | X509_ALGOR *sig_alg; | 257 | X509_ALGOR *sig_alg; |
| @@ -273,11 +268,11 @@ typedef struct x509_st | |||
| 273 | unsigned long ex_nscert; | 268 | unsigned long ex_nscert; |
| 274 | ASN1_OCTET_STRING *skid; | 269 | ASN1_OCTET_STRING *skid; |
| 275 | struct AUTHORITY_KEYID_st *akid; | 270 | struct AUTHORITY_KEYID_st *akid; |
| 276 | #ifndef NO_SHA | 271 | #ifndef OPENSSL_NO_SHA |
| 277 | unsigned char sha1_hash[SHA_DIGEST_LENGTH]; | 272 | unsigned char sha1_hash[SHA_DIGEST_LENGTH]; |
| 278 | #endif | 273 | #endif |
| 279 | X509_CERT_AUX *aux; | 274 | X509_CERT_AUX *aux; |
| 280 | } X509; | 275 | } /* X509 */; |
| 281 | 276 | ||
| 282 | DECLARE_STACK_OF(X509) | 277 | DECLARE_STACK_OF(X509) |
| 283 | DECLARE_ASN1_SET_OF(X509) | 278 | DECLARE_ASN1_SET_OF(X509) |
| @@ -304,10 +299,12 @@ DECLARE_STACK_OF(X509_TRUST) | |||
| 304 | #define X509_TRUST_SSL_SERVER 3 | 299 | #define X509_TRUST_SSL_SERVER 3 |
| 305 | #define X509_TRUST_EMAIL 4 | 300 | #define X509_TRUST_EMAIL 4 |
| 306 | #define X509_TRUST_OBJECT_SIGN 5 | 301 | #define X509_TRUST_OBJECT_SIGN 5 |
| 302 | #define X509_TRUST_OCSP_SIGN 6 | ||
| 303 | #define X509_TRUST_OCSP_REQUEST 7 | ||
| 307 | 304 | ||
| 308 | /* Keep these up to date! */ | 305 | /* Keep these up to date! */ |
| 309 | #define X509_TRUST_MIN 1 | 306 | #define X509_TRUST_MIN 1 |
| 310 | #define X509_TRUST_MAX 5 | 307 | #define X509_TRUST_MAX 7 |
| 311 | 308 | ||
| 312 | 309 | ||
| 313 | /* trust_flags values */ | 310 | /* trust_flags values */ |
| @@ -320,6 +317,21 @@ DECLARE_STACK_OF(X509_TRUST) | |||
| 320 | #define X509_TRUST_REJECTED 2 | 317 | #define X509_TRUST_REJECTED 2 |
| 321 | #define X509_TRUST_UNTRUSTED 3 | 318 | #define X509_TRUST_UNTRUSTED 3 |
| 322 | 319 | ||
| 320 | /* Flags for X509_print_ex() */ | ||
| 321 | |||
| 322 | #define X509_FLAG_COMPAT 0 | ||
| 323 | #define X509_FLAG_NO_HEADER 1L | ||
| 324 | #define X509_FLAG_NO_VERSION (1L << 1) | ||
| 325 | #define X509_FLAG_NO_SERIAL (1L << 2) | ||
| 326 | #define X509_FLAG_NO_SIGNAME (1L << 3) | ||
| 327 | #define X509_FLAG_NO_ISSUER (1L << 4) | ||
| 328 | #define X509_FLAG_NO_VALIDITY (1L << 5) | ||
| 329 | #define X509_FLAG_NO_SUBJECT (1L << 6) | ||
| 330 | #define X509_FLAG_NO_PUBKEY (1L << 7) | ||
| 331 | #define X509_FLAG_NO_EXTENSIONS (1L << 8) | ||
| 332 | #define X509_FLAG_NO_SIGDUMP (1L << 9) | ||
| 333 | #define X509_FLAG_NO_AUX (1L << 10) | ||
| 334 | |||
| 323 | /* Flags specific to X509_NAME_print_ex() */ | 335 | /* Flags specific to X509_NAME_print_ex() */ |
| 324 | 336 | ||
| 325 | /* The field separator information */ | 337 | /* The field separator information */ |
| @@ -351,6 +363,8 @@ DECLARE_STACK_OF(X509_TRUST) | |||
| 351 | 363 | ||
| 352 | #define XN_FLAG_DUMP_UNKNOWN_FIELDS (1 << 24) | 364 | #define XN_FLAG_DUMP_UNKNOWN_FIELDS (1 << 24) |
| 353 | 365 | ||
| 366 | #define XN_FLAG_FN_ALIGN (1 << 25) /* Align field names to 20 characters */ | ||
| 367 | |||
| 354 | /* Complete set of RFC2253 flags */ | 368 | /* Complete set of RFC2253 flags */ |
| 355 | 369 | ||
| 356 | #define XN_FLAG_RFC2253 (ASN1_STRFLGS_RFC2253 | \ | 370 | #define XN_FLAG_RFC2253 (ASN1_STRFLGS_RFC2253 | \ |
| @@ -373,7 +387,8 @@ DECLARE_STACK_OF(X509_TRUST) | |||
| 373 | ASN1_STRFLGS_ESC_MSB | \ | 387 | ASN1_STRFLGS_ESC_MSB | \ |
| 374 | XN_FLAG_SEP_MULTILINE | \ | 388 | XN_FLAG_SEP_MULTILINE | \ |
| 375 | XN_FLAG_SPC_EQ | \ | 389 | XN_FLAG_SPC_EQ | \ |
| 376 | XN_FLAG_FN_LN) | 390 | XN_FLAG_FN_LN | \ |
| 391 | XN_FLAG_FN_ALIGN) | ||
| 377 | 392 | ||
| 378 | typedef struct X509_revoked_st | 393 | typedef struct X509_revoked_st |
| 379 | { | 394 | { |
| @@ -397,14 +412,14 @@ typedef struct X509_crl_info_st | |||
| 397 | STACK_OF(X509_EXTENSION) /* [0] */ *extensions; | 412 | STACK_OF(X509_EXTENSION) /* [0] */ *extensions; |
| 398 | } X509_CRL_INFO; | 413 | } X509_CRL_INFO; |
| 399 | 414 | ||
| 400 | typedef struct X509_crl_st | 415 | struct X509_crl_st |
| 401 | { | 416 | { |
| 402 | /* actual signature */ | 417 | /* actual signature */ |
| 403 | X509_CRL_INFO *crl; | 418 | X509_CRL_INFO *crl; |
| 404 | X509_ALGOR *sig_alg; | 419 | X509_ALGOR *sig_alg; |
| 405 | ASN1_BIT_STRING *signature; | 420 | ASN1_BIT_STRING *signature; |
| 406 | int references; | 421 | int references; |
| 407 | } X509_CRL; | 422 | } /* X509_CRL */; |
| 408 | 423 | ||
| 409 | DECLARE_STACK_OF(X509_CRL) | 424 | DECLARE_STACK_OF(X509_CRL) |
| 410 | DECLARE_ASN1_SET_OF(X509_CRL) | 425 | DECLARE_ASN1_SET_OF(X509_CRL) |
| @@ -430,7 +445,7 @@ typedef struct private_key_st | |||
| 430 | int references; | 445 | int references; |
| 431 | } X509_PKEY; | 446 | } X509_PKEY; |
| 432 | 447 | ||
| 433 | #ifndef NO_EVP | 448 | #ifndef OPENSSL_NO_EVP |
| 434 | typedef struct X509_info_st | 449 | typedef struct X509_info_st |
| 435 | { | 450 | { |
| 436 | X509 *x509; | 451 | X509 *x509; |
| @@ -686,7 +701,7 @@ extern "C" { | |||
| 686 | const char *X509_verify_cert_error_string(long n); | 701 | const char *X509_verify_cert_error_string(long n); |
| 687 | 702 | ||
| 688 | #ifndef SSLEAY_MACROS | 703 | #ifndef SSLEAY_MACROS |
| 689 | #ifndef NO_EVP | 704 | #ifndef OPENSSL_NO_EVP |
| 690 | int X509_verify(X509 *a, EVP_PKEY *r); | 705 | int X509_verify(X509 *a, EVP_PKEY *r); |
| 691 | 706 | ||
| 692 | int X509_REQ_verify(X509_REQ *a, EVP_PKEY *r); | 707 | int X509_REQ_verify(X509_REQ *a, EVP_PKEY *r); |
| @@ -700,11 +715,15 @@ int NETSCAPE_SPKI_set_pubkey(NETSCAPE_SPKI *x, EVP_PKEY *pkey); | |||
| 700 | 715 | ||
| 701 | int NETSCAPE_SPKI_print(BIO *out, NETSCAPE_SPKI *spki); | 716 | int NETSCAPE_SPKI_print(BIO *out, NETSCAPE_SPKI *spki); |
| 702 | 717 | ||
| 718 | int X509_signature_print(BIO *bp,X509_ALGOR *alg, ASN1_STRING *sig); | ||
| 719 | |||
| 703 | int X509_sign(X509 *x, EVP_PKEY *pkey, const EVP_MD *md); | 720 | int X509_sign(X509 *x, EVP_PKEY *pkey, const EVP_MD *md); |
| 704 | int X509_REQ_sign(X509_REQ *x, EVP_PKEY *pkey, const EVP_MD *md); | 721 | int X509_REQ_sign(X509_REQ *x, EVP_PKEY *pkey, const EVP_MD *md); |
| 705 | int X509_CRL_sign(X509_CRL *x, EVP_PKEY *pkey, const EVP_MD *md); | 722 | int X509_CRL_sign(X509_CRL *x, EVP_PKEY *pkey, const EVP_MD *md); |
| 706 | int NETSCAPE_SPKI_sign(NETSCAPE_SPKI *x, EVP_PKEY *pkey, const EVP_MD *md); | 723 | int NETSCAPE_SPKI_sign(NETSCAPE_SPKI *x, EVP_PKEY *pkey, const EVP_MD *md); |
| 707 | 724 | ||
| 725 | int X509_pubkey_digest(const X509 *data,const EVP_MD *type, | ||
| 726 | unsigned char *md, unsigned int *len); | ||
| 708 | int X509_digest(const X509 *data,const EVP_MD *type, | 727 | int X509_digest(const X509 *data,const EVP_MD *type, |
| 709 | unsigned char *md, unsigned int *len); | 728 | unsigned char *md, unsigned int *len); |
| 710 | int X509_CRL_digest(const X509_CRL *data,const EVP_MD *type, | 729 | int X509_CRL_digest(const X509_CRL *data,const EVP_MD *type, |
| @@ -715,14 +734,14 @@ int X509_NAME_digest(const X509_NAME *data,const EVP_MD *type, | |||
| 715 | unsigned char *md, unsigned int *len); | 734 | unsigned char *md, unsigned int *len); |
| 716 | #endif | 735 | #endif |
| 717 | 736 | ||
| 718 | #ifndef NO_FP_API | 737 | #ifndef OPENSSL_NO_FP_API |
| 719 | X509 *d2i_X509_fp(FILE *fp, X509 **x509); | 738 | X509 *d2i_X509_fp(FILE *fp, X509 **x509); |
| 720 | int i2d_X509_fp(FILE *fp,X509 *x509); | 739 | int i2d_X509_fp(FILE *fp,X509 *x509); |
| 721 | X509_CRL *d2i_X509_CRL_fp(FILE *fp,X509_CRL **crl); | 740 | X509_CRL *d2i_X509_CRL_fp(FILE *fp,X509_CRL **crl); |
| 722 | int i2d_X509_CRL_fp(FILE *fp,X509_CRL *crl); | 741 | int i2d_X509_CRL_fp(FILE *fp,X509_CRL *crl); |
| 723 | X509_REQ *d2i_X509_REQ_fp(FILE *fp,X509_REQ **req); | 742 | X509_REQ *d2i_X509_REQ_fp(FILE *fp,X509_REQ **req); |
| 724 | int i2d_X509_REQ_fp(FILE *fp,X509_REQ *req); | 743 | int i2d_X509_REQ_fp(FILE *fp,X509_REQ *req); |
| 725 | #ifndef NO_RSA | 744 | #ifndef OPENSSL_NO_RSA |
| 726 | RSA *d2i_RSAPrivateKey_fp(FILE *fp,RSA **rsa); | 745 | RSA *d2i_RSAPrivateKey_fp(FILE *fp,RSA **rsa); |
| 727 | int i2d_RSAPrivateKey_fp(FILE *fp,RSA *rsa); | 746 | int i2d_RSAPrivateKey_fp(FILE *fp,RSA *rsa); |
| 728 | RSA *d2i_RSAPublicKey_fp(FILE *fp,RSA **rsa); | 747 | RSA *d2i_RSAPublicKey_fp(FILE *fp,RSA **rsa); |
| @@ -730,7 +749,7 @@ int i2d_RSAPublicKey_fp(FILE *fp,RSA *rsa); | |||
| 730 | RSA *d2i_RSA_PUBKEY_fp(FILE *fp,RSA **rsa); | 749 | RSA *d2i_RSA_PUBKEY_fp(FILE *fp,RSA **rsa); |
| 731 | int i2d_RSA_PUBKEY_fp(FILE *fp,RSA *rsa); | 750 | int i2d_RSA_PUBKEY_fp(FILE *fp,RSA *rsa); |
| 732 | #endif | 751 | #endif |
| 733 | #ifndef NO_DSA | 752 | #ifndef OPENSSL_NO_DSA |
| 734 | DSA *d2i_DSA_PUBKEY_fp(FILE *fp, DSA **dsa); | 753 | DSA *d2i_DSA_PUBKEY_fp(FILE *fp, DSA **dsa); |
| 735 | int i2d_DSA_PUBKEY_fp(FILE *fp, DSA *dsa); | 754 | int i2d_DSA_PUBKEY_fp(FILE *fp, DSA *dsa); |
| 736 | DSA *d2i_DSAPrivateKey_fp(FILE *fp, DSA **dsa); | 755 | DSA *d2i_DSAPrivateKey_fp(FILE *fp, DSA **dsa); |
| @@ -748,14 +767,14 @@ int i2d_PUBKEY_fp(FILE *fp, EVP_PKEY *pkey); | |||
| 748 | EVP_PKEY *d2i_PUBKEY_fp(FILE *fp, EVP_PKEY **a); | 767 | EVP_PKEY *d2i_PUBKEY_fp(FILE *fp, EVP_PKEY **a); |
| 749 | #endif | 768 | #endif |
| 750 | 769 | ||
| 751 | #ifndef NO_BIO | 770 | #ifndef OPENSSL_NO_BIO |
| 752 | X509 *d2i_X509_bio(BIO *bp,X509 **x509); | 771 | X509 *d2i_X509_bio(BIO *bp,X509 **x509); |
| 753 | int i2d_X509_bio(BIO *bp,X509 *x509); | 772 | int i2d_X509_bio(BIO *bp,X509 *x509); |
| 754 | X509_CRL *d2i_X509_CRL_bio(BIO *bp,X509_CRL **crl); | 773 | X509_CRL *d2i_X509_CRL_bio(BIO *bp,X509_CRL **crl); |
| 755 | int i2d_X509_CRL_bio(BIO *bp,X509_CRL *crl); | 774 | int i2d_X509_CRL_bio(BIO *bp,X509_CRL *crl); |
| 756 | X509_REQ *d2i_X509_REQ_bio(BIO *bp,X509_REQ **req); | 775 | X509_REQ *d2i_X509_REQ_bio(BIO *bp,X509_REQ **req); |
| 757 | int i2d_X509_REQ_bio(BIO *bp,X509_REQ *req); | 776 | int i2d_X509_REQ_bio(BIO *bp,X509_REQ *req); |
| 758 | #ifndef NO_RSA | 777 | #ifndef OPENSSL_NO_RSA |
| 759 | RSA *d2i_RSAPrivateKey_bio(BIO *bp,RSA **rsa); | 778 | RSA *d2i_RSAPrivateKey_bio(BIO *bp,RSA **rsa); |
| 760 | int i2d_RSAPrivateKey_bio(BIO *bp,RSA *rsa); | 779 | int i2d_RSAPrivateKey_bio(BIO *bp,RSA *rsa); |
| 761 | RSA *d2i_RSAPublicKey_bio(BIO *bp,RSA **rsa); | 780 | RSA *d2i_RSAPublicKey_bio(BIO *bp,RSA **rsa); |
| @@ -763,7 +782,7 @@ int i2d_RSAPublicKey_bio(BIO *bp,RSA *rsa); | |||
| 763 | RSA *d2i_RSA_PUBKEY_bio(BIO *bp,RSA **rsa); | 782 | RSA *d2i_RSA_PUBKEY_bio(BIO *bp,RSA **rsa); |
| 764 | int i2d_RSA_PUBKEY_bio(BIO *bp,RSA *rsa); | 783 | int i2d_RSA_PUBKEY_bio(BIO *bp,RSA *rsa); |
| 765 | #endif | 784 | #endif |
| 766 | #ifndef NO_DSA | 785 | #ifndef OPENSSL_NO_DSA |
| 767 | DSA *d2i_DSA_PUBKEY_bio(BIO *bp, DSA **dsa); | 786 | DSA *d2i_DSA_PUBKEY_bio(BIO *bp, DSA **dsa); |
| 768 | int i2d_DSA_PUBKEY_bio(BIO *bp, DSA *dsa); | 787 | int i2d_DSA_PUBKEY_bio(BIO *bp, DSA *dsa); |
| 769 | DSA *d2i_DSAPrivateKey_bio(BIO *bp, DSA **dsa); | 788 | DSA *d2i_DSAPrivateKey_bio(BIO *bp, DSA **dsa); |
| @@ -789,7 +808,7 @@ X509_REQ *X509_REQ_dup(X509_REQ *req); | |||
| 789 | X509_ALGOR *X509_ALGOR_dup(X509_ALGOR *xn); | 808 | X509_ALGOR *X509_ALGOR_dup(X509_ALGOR *xn); |
| 790 | X509_NAME *X509_NAME_dup(X509_NAME *xn); | 809 | X509_NAME *X509_NAME_dup(X509_NAME *xn); |
| 791 | X509_NAME_ENTRY *X509_NAME_ENTRY_dup(X509_NAME_ENTRY *ne); | 810 | X509_NAME_ENTRY *X509_NAME_ENTRY_dup(X509_NAME_ENTRY *ne); |
| 792 | #ifndef NO_RSA | 811 | #ifndef OPENSSL_NO_RSA |
| 793 | RSA *RSAPublicKey_dup(RSA *rsa); | 812 | RSA *RSAPublicKey_dup(RSA *rsa); |
| 794 | RSA *RSAPrivateKey_dup(RSA *rsa); | 813 | RSA *RSAPrivateKey_dup(RSA *rsa); |
| 795 | #endif | 814 | #endif |
| @@ -810,25 +829,12 @@ const char * X509_get_default_private_dir(void ); | |||
| 810 | 829 | ||
| 811 | X509_REQ * X509_to_X509_REQ(X509 *x, EVP_PKEY *pkey, const EVP_MD *md); | 830 | X509_REQ * X509_to_X509_REQ(X509 *x, EVP_PKEY *pkey, const EVP_MD *md); |
| 812 | X509 * X509_REQ_to_X509(X509_REQ *r, int days,EVP_PKEY *pkey); | 831 | X509 * X509_REQ_to_X509(X509_REQ *r, int days,EVP_PKEY *pkey); |
| 813 | void ERR_load_X509_strings(void ); | ||
| 814 | 832 | ||
| 815 | X509_ALGOR * X509_ALGOR_new(void ); | 833 | DECLARE_ASN1_FUNCTIONS(X509_ALGOR) |
| 816 | void X509_ALGOR_free(X509_ALGOR *a); | 834 | DECLARE_ASN1_FUNCTIONS(X509_VAL) |
| 817 | int i2d_X509_ALGOR(X509_ALGOR *a,unsigned char **pp); | ||
| 818 | X509_ALGOR * d2i_X509_ALGOR(X509_ALGOR **a,unsigned char **pp, | ||
| 819 | long length); | ||
| 820 | 835 | ||
| 821 | X509_VAL * X509_VAL_new(void ); | 836 | DECLARE_ASN1_FUNCTIONS(X509_PUBKEY) |
| 822 | void X509_VAL_free(X509_VAL *a); | ||
| 823 | int i2d_X509_VAL(X509_VAL *a,unsigned char **pp); | ||
| 824 | X509_VAL * d2i_X509_VAL(X509_VAL **a,unsigned char **pp, | ||
| 825 | long length); | ||
| 826 | 837 | ||
| 827 | X509_PUBKEY * X509_PUBKEY_new(void ); | ||
| 828 | void X509_PUBKEY_free(X509_PUBKEY *a); | ||
| 829 | int i2d_X509_PUBKEY(X509_PUBKEY *a,unsigned char **pp); | ||
| 830 | X509_PUBKEY * d2i_X509_PUBKEY(X509_PUBKEY **a,unsigned char **pp, | ||
| 831 | long length); | ||
| 832 | int X509_PUBKEY_set(X509_PUBKEY **x, EVP_PKEY *pkey); | 838 | int X509_PUBKEY_set(X509_PUBKEY **x, EVP_PKEY *pkey); |
| 833 | EVP_PKEY * X509_PUBKEY_get(X509_PUBKEY *key); | 839 | EVP_PKEY * X509_PUBKEY_get(X509_PUBKEY *key); |
| 834 | int X509_get_pubkey_parameters(EVP_PKEY *pkey, | 840 | int X509_get_pubkey_parameters(EVP_PKEY *pkey, |
| @@ -836,69 +842,37 @@ int X509_get_pubkey_parameters(EVP_PKEY *pkey, | |||
| 836 | int i2d_PUBKEY(EVP_PKEY *a,unsigned char **pp); | 842 | int i2d_PUBKEY(EVP_PKEY *a,unsigned char **pp); |
| 837 | EVP_PKEY * d2i_PUBKEY(EVP_PKEY **a,unsigned char **pp, | 843 | EVP_PKEY * d2i_PUBKEY(EVP_PKEY **a,unsigned char **pp, |
| 838 | long length); | 844 | long length); |
| 839 | #ifndef NO_RSA | 845 | #ifndef OPENSSL_NO_RSA |
| 840 | int i2d_RSA_PUBKEY(RSA *a,unsigned char **pp); | 846 | int i2d_RSA_PUBKEY(RSA *a,unsigned char **pp); |
| 841 | RSA * d2i_RSA_PUBKEY(RSA **a,unsigned char **pp, | 847 | RSA * d2i_RSA_PUBKEY(RSA **a,unsigned char **pp, |
| 842 | long length); | 848 | long length); |
| 843 | #endif | 849 | #endif |
| 844 | #ifndef NO_DSA | 850 | #ifndef OPENSSL_NO_DSA |
| 845 | int i2d_DSA_PUBKEY(DSA *a,unsigned char **pp); | 851 | int i2d_DSA_PUBKEY(DSA *a,unsigned char **pp); |
| 846 | DSA * d2i_DSA_PUBKEY(DSA **a,unsigned char **pp, | 852 | DSA * d2i_DSA_PUBKEY(DSA **a,unsigned char **pp, |
| 847 | long length); | 853 | long length); |
| 848 | #endif | 854 | #endif |
| 849 | 855 | ||
| 850 | X509_SIG * X509_SIG_new(void ); | 856 | DECLARE_ASN1_FUNCTIONS(X509_SIG) |
| 851 | void X509_SIG_free(X509_SIG *a); | 857 | DECLARE_ASN1_FUNCTIONS(X509_REQ_INFO) |
| 852 | int i2d_X509_SIG(X509_SIG *a,unsigned char **pp); | 858 | DECLARE_ASN1_FUNCTIONS(X509_REQ) |
| 853 | X509_SIG * d2i_X509_SIG(X509_SIG **a,unsigned char **pp,long length); | ||
| 854 | |||
| 855 | X509_REQ_INFO *X509_REQ_INFO_new(void); | ||
| 856 | void X509_REQ_INFO_free(X509_REQ_INFO *a); | ||
| 857 | int i2d_X509_REQ_INFO(X509_REQ_INFO *a,unsigned char **pp); | ||
| 858 | X509_REQ_INFO *d2i_X509_REQ_INFO(X509_REQ_INFO **a,unsigned char **pp, | ||
| 859 | long length); | ||
| 860 | 859 | ||
| 861 | X509_REQ * X509_REQ_new(void); | 860 | DECLARE_ASN1_FUNCTIONS(X509_ATTRIBUTE) |
| 862 | void X509_REQ_free(X509_REQ *a); | ||
| 863 | int i2d_X509_REQ(X509_REQ *a,unsigned char **pp); | ||
| 864 | X509_REQ * d2i_X509_REQ(X509_REQ **a,unsigned char **pp,long length); | ||
| 865 | |||
| 866 | X509_ATTRIBUTE *X509_ATTRIBUTE_new(void ); | ||
| 867 | void X509_ATTRIBUTE_free(X509_ATTRIBUTE *a); | ||
| 868 | int i2d_X509_ATTRIBUTE(X509_ATTRIBUTE *a,unsigned char **pp); | ||
| 869 | X509_ATTRIBUTE *d2i_X509_ATTRIBUTE(X509_ATTRIBUTE **a,unsigned char **pp, | ||
| 870 | long length); | ||
| 871 | X509_ATTRIBUTE *X509_ATTRIBUTE_create(int nid, int atrtype, void *value); | 861 | X509_ATTRIBUTE *X509_ATTRIBUTE_create(int nid, int atrtype, void *value); |
| 872 | 862 | ||
| 863 | DECLARE_ASN1_FUNCTIONS(X509_EXTENSION) | ||
| 873 | 864 | ||
| 874 | X509_EXTENSION *X509_EXTENSION_new(void ); | 865 | DECLARE_ASN1_FUNCTIONS(X509_NAME_ENTRY) |
| 875 | void X509_EXTENSION_free(X509_EXTENSION *a); | ||
| 876 | int i2d_X509_EXTENSION(X509_EXTENSION *a,unsigned char **pp); | ||
| 877 | X509_EXTENSION *d2i_X509_EXTENSION(X509_EXTENSION **a,unsigned char **pp, | ||
| 878 | long length); | ||
| 879 | 866 | ||
| 880 | X509_NAME_ENTRY *X509_NAME_ENTRY_new(void); | 867 | DECLARE_ASN1_FUNCTIONS(X509_NAME) |
| 881 | void X509_NAME_ENTRY_free(X509_NAME_ENTRY *a); | ||
| 882 | int i2d_X509_NAME_ENTRY(X509_NAME_ENTRY *a,unsigned char **pp); | ||
| 883 | X509_NAME_ENTRY *d2i_X509_NAME_ENTRY(X509_NAME_ENTRY **a,unsigned char **pp, | ||
| 884 | long length); | ||
| 885 | 868 | ||
| 886 | X509_NAME * X509_NAME_new(void); | ||
| 887 | void X509_NAME_free(X509_NAME *a); | ||
| 888 | int i2d_X509_NAME(X509_NAME *a,unsigned char **pp); | ||
| 889 | X509_NAME * d2i_X509_NAME(X509_NAME **a,unsigned char **pp,long length); | ||
| 890 | int X509_NAME_set(X509_NAME **xn, X509_NAME *name); | 869 | int X509_NAME_set(X509_NAME **xn, X509_NAME *name); |
| 891 | 870 | ||
| 871 | DECLARE_ASN1_FUNCTIONS(X509_CINF) | ||
| 892 | 872 | ||
| 893 | X509_CINF * X509_CINF_new(void); | 873 | DECLARE_ASN1_FUNCTIONS(X509) |
| 894 | void X509_CINF_free(X509_CINF *a); | 874 | DECLARE_ASN1_FUNCTIONS(X509_CERT_AUX) |
| 895 | int i2d_X509_CINF(X509_CINF *a,unsigned char **pp); | ||
| 896 | X509_CINF * d2i_X509_CINF(X509_CINF **a,unsigned char **pp,long length); | ||
| 897 | 875 | ||
| 898 | X509 * X509_new(void); | ||
| 899 | void X509_free(X509 *a); | ||
| 900 | int i2d_X509(X509 *a,unsigned char **pp); | ||
| 901 | X509 * d2i_X509(X509 **a,unsigned char **pp,long length); | ||
| 902 | int X509_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func, | 876 | int X509_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func, |
| 903 | CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func); | 877 | CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func); |
| 904 | int X509_set_ex_data(X509 *r, int idx, void *arg); | 878 | int X509_set_ex_data(X509 *r, int idx, void *arg); |
| @@ -906,60 +880,32 @@ void *X509_get_ex_data(X509 *r, int idx); | |||
| 906 | int i2d_X509_AUX(X509 *a,unsigned char **pp); | 880 | int i2d_X509_AUX(X509 *a,unsigned char **pp); |
| 907 | X509 * d2i_X509_AUX(X509 **a,unsigned char **pp,long length); | 881 | X509 * d2i_X509_AUX(X509 **a,unsigned char **pp,long length); |
| 908 | 882 | ||
| 909 | X509_CERT_AUX * X509_CERT_AUX_new(void); | ||
| 910 | void X509_CERT_AUX_free(X509_CERT_AUX *a); | ||
| 911 | int i2d_X509_CERT_AUX(X509_CERT_AUX *a,unsigned char **pp); | ||
| 912 | X509_CERT_AUX * d2i_X509_CERT_AUX(X509_CERT_AUX **a,unsigned char **pp, | ||
| 913 | long length); | ||
| 914 | int X509_alias_set1(X509 *x, unsigned char *name, int len); | 883 | int X509_alias_set1(X509 *x, unsigned char *name, int len); |
| 915 | int X509_keyid_set1(X509 *x, unsigned char *id, int len); | 884 | int X509_keyid_set1(X509 *x, unsigned char *id, int len); |
| 916 | unsigned char * X509_alias_get0(X509 *x, int *len); | 885 | unsigned char * X509_alias_get0(X509 *x, int *len); |
| 917 | int (*X509_TRUST_set_default(int (*trust)(int , X509 *, int)))(int, X509 *, int); | 886 | int (*X509_TRUST_set_default(int (*trust)(int , X509 *, int)))(int, X509 *, int); |
| 887 | int X509_TRUST_set(int *t, int trust); | ||
| 918 | int X509_add1_trust_object(X509 *x, ASN1_OBJECT *obj); | 888 | int X509_add1_trust_object(X509 *x, ASN1_OBJECT *obj); |
| 919 | int X509_add1_reject_object(X509 *x, ASN1_OBJECT *obj); | 889 | int X509_add1_reject_object(X509 *x, ASN1_OBJECT *obj); |
| 920 | void X509_trust_clear(X509 *x); | 890 | void X509_trust_clear(X509 *x); |
| 921 | void X509_reject_clear(X509 *x); | 891 | void X509_reject_clear(X509 *x); |
| 922 | 892 | ||
| 923 | X509_REVOKED * X509_REVOKED_new(void); | 893 | DECLARE_ASN1_FUNCTIONS(X509_REVOKED) |
| 924 | void X509_REVOKED_free(X509_REVOKED *a); | 894 | DECLARE_ASN1_FUNCTIONS(X509_CRL_INFO) |
| 925 | int i2d_X509_REVOKED(X509_REVOKED *a,unsigned char **pp); | 895 | DECLARE_ASN1_FUNCTIONS(X509_CRL) |
| 926 | X509_REVOKED * d2i_X509_REVOKED(X509_REVOKED **a,unsigned char **pp,long length); | ||
| 927 | 896 | ||
| 928 | X509_CRL_INFO *X509_CRL_INFO_new(void); | 897 | int X509_CRL_add0_revoked(X509_CRL *crl, X509_REVOKED *rev); |
| 929 | void X509_CRL_INFO_free(X509_CRL_INFO *a); | ||
| 930 | int i2d_X509_CRL_INFO(X509_CRL_INFO *a,unsigned char **pp); | ||
| 931 | X509_CRL_INFO *d2i_X509_CRL_INFO(X509_CRL_INFO **a,unsigned char **pp, | ||
| 932 | long length); | ||
| 933 | |||
| 934 | X509_CRL * X509_CRL_new(void); | ||
| 935 | void X509_CRL_free(X509_CRL *a); | ||
| 936 | int i2d_X509_CRL(X509_CRL *a,unsigned char **pp); | ||
| 937 | X509_CRL * d2i_X509_CRL(X509_CRL **a,unsigned char **pp,long length); | ||
| 938 | 898 | ||
| 939 | X509_PKEY * X509_PKEY_new(void ); | 899 | X509_PKEY * X509_PKEY_new(void ); |
| 940 | void X509_PKEY_free(X509_PKEY *a); | 900 | void X509_PKEY_free(X509_PKEY *a); |
| 941 | int i2d_X509_PKEY(X509_PKEY *a,unsigned char **pp); | 901 | int i2d_X509_PKEY(X509_PKEY *a,unsigned char **pp); |
| 942 | X509_PKEY * d2i_X509_PKEY(X509_PKEY **a,unsigned char **pp,long length); | 902 | X509_PKEY * d2i_X509_PKEY(X509_PKEY **a,unsigned char **pp,long length); |
| 943 | 903 | ||
| 944 | NETSCAPE_SPKI * NETSCAPE_SPKI_new(void ); | 904 | DECLARE_ASN1_FUNCTIONS(NETSCAPE_SPKI) |
| 945 | void NETSCAPE_SPKI_free(NETSCAPE_SPKI *a); | 905 | DECLARE_ASN1_FUNCTIONS(NETSCAPE_SPKAC) |
| 946 | int i2d_NETSCAPE_SPKI(NETSCAPE_SPKI *a,unsigned char **pp); | 906 | DECLARE_ASN1_FUNCTIONS(NETSCAPE_CERT_SEQUENCE) |
| 947 | NETSCAPE_SPKI * d2i_NETSCAPE_SPKI(NETSCAPE_SPKI **a,unsigned char **pp, | ||
| 948 | long length); | ||
| 949 | 907 | ||
| 950 | NETSCAPE_SPKAC *NETSCAPE_SPKAC_new(void ); | 908 | #ifndef OPENSSL_NO_EVP |
| 951 | void NETSCAPE_SPKAC_free(NETSCAPE_SPKAC *a); | ||
| 952 | int i2d_NETSCAPE_SPKAC(NETSCAPE_SPKAC *a,unsigned char **pp); | ||
| 953 | NETSCAPE_SPKAC *d2i_NETSCAPE_SPKAC(NETSCAPE_SPKAC **a,unsigned char **pp, | ||
| 954 | long length); | ||
| 955 | |||
| 956 | |||
| 957 | int i2d_NETSCAPE_CERT_SEQUENCE(NETSCAPE_CERT_SEQUENCE *a, unsigned char **pp); | ||
| 958 | NETSCAPE_CERT_SEQUENCE *NETSCAPE_CERT_SEQUENCE_new(void); | ||
| 959 | NETSCAPE_CERT_SEQUENCE *d2i_NETSCAPE_CERT_SEQUENCE(NETSCAPE_CERT_SEQUENCE **a, unsigned char **pp, long length); | ||
| 960 | void NETSCAPE_CERT_SEQUENCE_free(NETSCAPE_CERT_SEQUENCE *a); | ||
| 961 | |||
| 962 | #ifndef NO_EVP | ||
| 963 | X509_INFO * X509_INFO_new(void); | 909 | X509_INFO * X509_INFO_new(void); |
| 964 | void X509_INFO_free(X509_INFO *a); | 910 | void X509_INFO_free(X509_INFO *a); |
| 965 | char * X509_NAME_oneline(X509_NAME *a,char *buf,int size); | 911 | char * X509_NAME_oneline(X509_NAME *a,char *buf,int size); |
| @@ -973,6 +919,16 @@ int ASN1_digest(int (*i2d)(),const EVP_MD *type,char *data, | |||
| 973 | int ASN1_sign(int (*i2d)(), X509_ALGOR *algor1, X509_ALGOR *algor2, | 919 | int ASN1_sign(int (*i2d)(), X509_ALGOR *algor1, X509_ALGOR *algor2, |
| 974 | ASN1_BIT_STRING *signature, | 920 | ASN1_BIT_STRING *signature, |
| 975 | char *data,EVP_PKEY *pkey, const EVP_MD *type); | 921 | char *data,EVP_PKEY *pkey, const EVP_MD *type); |
| 922 | |||
| 923 | int ASN1_item_digest(const ASN1_ITEM *it,const EVP_MD *type,void *data, | ||
| 924 | unsigned char *md,unsigned int *len); | ||
| 925 | |||
| 926 | int ASN1_item_verify(const ASN1_ITEM *it, X509_ALGOR *algor1, | ||
| 927 | ASN1_BIT_STRING *signature,void *data,EVP_PKEY *pkey); | ||
| 928 | |||
| 929 | int ASN1_item_sign(const ASN1_ITEM *it, X509_ALGOR *algor1, X509_ALGOR *algor2, | ||
| 930 | ASN1_BIT_STRING *signature, | ||
| 931 | void *data, EVP_PKEY *pkey, const EVP_MD *type); | ||
| 976 | #endif | 932 | #endif |
| 977 | 933 | ||
| 978 | int X509_set_version(X509 *x,long version); | 934 | int X509_set_version(X509 *x,long version); |
| @@ -986,6 +942,7 @@ int X509_set_notBefore(X509 *x, ASN1_TIME *tm); | |||
| 986 | int X509_set_notAfter(X509 *x, ASN1_TIME *tm); | 942 | int X509_set_notAfter(X509 *x, ASN1_TIME *tm); |
| 987 | int X509_set_pubkey(X509 *x, EVP_PKEY *pkey); | 943 | int X509_set_pubkey(X509 *x, EVP_PKEY *pkey); |
| 988 | EVP_PKEY * X509_get_pubkey(X509 *x); | 944 | EVP_PKEY * X509_get_pubkey(X509 *x); |
| 945 | ASN1_BIT_STRING * X509_get0_pubkey_bitstr(const X509 *x); | ||
| 989 | int X509_certificate_type(X509 *x,EVP_PKEY *pubkey /* optional */); | 946 | int X509_certificate_type(X509 *x,EVP_PKEY *pubkey /* optional */); |
| 990 | 947 | ||
| 991 | int X509_REQ_set_version(X509_REQ *x,long version); | 948 | int X509_REQ_set_version(X509_REQ *x,long version); |
| @@ -1008,14 +965,23 @@ X509_ATTRIBUTE *X509_REQ_get_attr(const X509_REQ *req, int loc); | |||
| 1008 | X509_ATTRIBUTE *X509_REQ_delete_attr(X509_REQ *req, int loc); | 965 | X509_ATTRIBUTE *X509_REQ_delete_attr(X509_REQ *req, int loc); |
| 1009 | int X509_REQ_add1_attr(X509_REQ *req, X509_ATTRIBUTE *attr); | 966 | int X509_REQ_add1_attr(X509_REQ *req, X509_ATTRIBUTE *attr); |
| 1010 | int X509_REQ_add1_attr_by_OBJ(X509_REQ *req, | 967 | int X509_REQ_add1_attr_by_OBJ(X509_REQ *req, |
| 1011 | ASN1_OBJECT *obj, int type, | 968 | const ASN1_OBJECT *obj, int type, |
| 1012 | unsigned char *bytes, int len); | 969 | const unsigned char *bytes, int len); |
| 1013 | int X509_REQ_add1_attr_by_NID(X509_REQ *req, | 970 | int X509_REQ_add1_attr_by_NID(X509_REQ *req, |
| 1014 | int nid, int type, | 971 | int nid, int type, |
| 1015 | unsigned char *bytes, int len); | 972 | const unsigned char *bytes, int len); |
| 1016 | int X509_REQ_add1_attr_by_txt(X509_REQ *req, | 973 | int X509_REQ_add1_attr_by_txt(X509_REQ *req, |
| 1017 | char *attrname, int type, | 974 | const char *attrname, int type, |
| 1018 | unsigned char *bytes, int len); | 975 | const unsigned char *bytes, int len); |
| 976 | |||
| 977 | int X509_CRL_set_version(X509_CRL *x, long version); | ||
| 978 | int X509_CRL_set_issuer_name(X509_CRL *x, X509_NAME *name); | ||
| 979 | int X509_CRL_set_lastUpdate(X509_CRL *x, ASN1_TIME *tm); | ||
| 980 | int X509_CRL_set_nextUpdate(X509_CRL *x, ASN1_TIME *tm); | ||
| 981 | int X509_CRL_sort(X509_CRL *crl); | ||
| 982 | |||
| 983 | int X509_REVOKED_set_serialNumber(X509_REVOKED *x, ASN1_INTEGER *serial); | ||
| 984 | int X509_REVOKED_set_revocationDate(X509_REVOKED *r, ASN1_TIME *tm); | ||
| 1019 | 985 | ||
| 1020 | int X509_check_private_key(X509 *x509,EVP_PKEY *pkey); | 986 | int X509_check_private_key(X509 *x509,EVP_PKEY *pkey); |
| 1021 | 987 | ||
| @@ -1033,17 +999,20 @@ int X509_NAME_cmp(const X509_NAME *a, const X509_NAME *b); | |||
| 1033 | unsigned long X509_NAME_hash(X509_NAME *x); | 999 | unsigned long X509_NAME_hash(X509_NAME *x); |
| 1034 | 1000 | ||
| 1035 | int X509_CRL_cmp(const X509_CRL *a, const X509_CRL *b); | 1001 | int X509_CRL_cmp(const X509_CRL *a, const X509_CRL *b); |
| 1036 | #ifndef NO_FP_API | 1002 | #ifndef OPENSSL_NO_FP_API |
| 1003 | int X509_print_ex_fp(FILE *bp,X509 *x, unsigned long nmflag, unsigned long cflag); | ||
| 1037 | int X509_print_fp(FILE *bp,X509 *x); | 1004 | int X509_print_fp(FILE *bp,X509 *x); |
| 1038 | int X509_CRL_print_fp(FILE *bp,X509_CRL *x); | 1005 | int X509_CRL_print_fp(FILE *bp,X509_CRL *x); |
| 1039 | int X509_REQ_print_fp(FILE *bp,X509_REQ *req); | 1006 | int X509_REQ_print_fp(FILE *bp,X509_REQ *req); |
| 1040 | int X509_NAME_print_ex_fp(FILE *fp, X509_NAME *nm, int indent, unsigned long flags); | 1007 | int X509_NAME_print_ex_fp(FILE *fp, X509_NAME *nm, int indent, unsigned long flags); |
| 1041 | #endif | 1008 | #endif |
| 1042 | 1009 | ||
| 1043 | #ifndef NO_BIO | 1010 | #ifndef OPENSSL_NO_BIO |
| 1044 | int X509_NAME_print(BIO *bp, X509_NAME *name, int obase); | 1011 | int X509_NAME_print(BIO *bp, X509_NAME *name, int obase); |
| 1045 | int X509_NAME_print_ex(BIO *out, X509_NAME *nm, int indent, unsigned long flags); | 1012 | int X509_NAME_print_ex(BIO *out, X509_NAME *nm, int indent, unsigned long flags); |
| 1013 | int X509_print_ex(BIO *bp,X509 *x, unsigned long nmflag, unsigned long cflag); | ||
| 1046 | int X509_print(BIO *bp,X509 *x); | 1014 | int X509_print(BIO *bp,X509 *x); |
| 1015 | int X509_ocspid_print(BIO *bp,X509 *x); | ||
| 1047 | int X509_CERT_AUX_print(BIO *bp,X509_CERT_AUX *x, int indent); | 1016 | int X509_CERT_AUX_print(BIO *bp,X509_CERT_AUX *x, int indent); |
| 1048 | int X509_CRL_print(BIO *bp,X509_CRL *x); | 1017 | int X509_CRL_print(BIO *bp,X509_CRL *x); |
| 1049 | int X509_REQ_print(BIO *bp,X509_REQ *req); | 1018 | int X509_REQ_print(BIO *bp,X509_REQ *req); |
| @@ -1104,6 +1073,8 @@ X509_EXTENSION *X509_get_ext(X509 *x, int loc); | |||
| 1104 | X509_EXTENSION *X509_delete_ext(X509 *x, int loc); | 1073 | X509_EXTENSION *X509_delete_ext(X509 *x, int loc); |
| 1105 | int X509_add_ext(X509 *x, X509_EXTENSION *ex, int loc); | 1074 | int X509_add_ext(X509 *x, X509_EXTENSION *ex, int loc); |
| 1106 | void * X509_get_ext_d2i(X509 *x, int nid, int *crit, int *idx); | 1075 | void * X509_get_ext_d2i(X509 *x, int nid, int *crit, int *idx); |
| 1076 | int X509_add1_ext_i2d(X509 *x, int nid, void *value, int crit, | ||
| 1077 | unsigned long flags); | ||
| 1107 | 1078 | ||
| 1108 | int X509_CRL_get_ext_count(X509_CRL *x); | 1079 | int X509_CRL_get_ext_count(X509_CRL *x); |
| 1109 | int X509_CRL_get_ext_by_NID(X509_CRL *x, int nid, int lastpos); | 1080 | int X509_CRL_get_ext_by_NID(X509_CRL *x, int nid, int lastpos); |
| @@ -1113,6 +1084,8 @@ X509_EXTENSION *X509_CRL_get_ext(X509_CRL *x, int loc); | |||
| 1113 | X509_EXTENSION *X509_CRL_delete_ext(X509_CRL *x, int loc); | 1084 | X509_EXTENSION *X509_CRL_delete_ext(X509_CRL *x, int loc); |
| 1114 | int X509_CRL_add_ext(X509_CRL *x, X509_EXTENSION *ex, int loc); | 1085 | int X509_CRL_add_ext(X509_CRL *x, X509_EXTENSION *ex, int loc); |
| 1115 | void * X509_CRL_get_ext_d2i(X509_CRL *x, int nid, int *crit, int *idx); | 1086 | void * X509_CRL_get_ext_d2i(X509_CRL *x, int nid, int *crit, int *idx); |
| 1087 | int X509_CRL_add1_ext_i2d(X509_CRL *x, int nid, void *value, int crit, | ||
| 1088 | unsigned long flags); | ||
| 1116 | 1089 | ||
| 1117 | int X509_REVOKED_get_ext_count(X509_REVOKED *x); | 1090 | int X509_REVOKED_get_ext_count(X509_REVOKED *x); |
| 1118 | int X509_REVOKED_get_ext_by_NID(X509_REVOKED *x, int nid, int lastpos); | 1091 | int X509_REVOKED_get_ext_by_NID(X509_REVOKED *x, int nid, int lastpos); |
| @@ -1122,6 +1095,8 @@ X509_EXTENSION *X509_REVOKED_get_ext(X509_REVOKED *x, int loc); | |||
| 1122 | X509_EXTENSION *X509_REVOKED_delete_ext(X509_REVOKED *x, int loc); | 1095 | X509_EXTENSION *X509_REVOKED_delete_ext(X509_REVOKED *x, int loc); |
| 1123 | int X509_REVOKED_add_ext(X509_REVOKED *x, X509_EXTENSION *ex, int loc); | 1096 | int X509_REVOKED_add_ext(X509_REVOKED *x, X509_EXTENSION *ex, int loc); |
| 1124 | void * X509_REVOKED_get_ext_d2i(X509_REVOKED *x, int nid, int *crit, int *idx); | 1097 | void * X509_REVOKED_get_ext_d2i(X509_REVOKED *x, int nid, int *crit, int *idx); |
| 1098 | int X509_REVOKED_add1_ext_i2d(X509_REVOKED *x, int nid, void *value, int crit, | ||
| 1099 | unsigned long flags); | ||
| 1125 | 1100 | ||
| 1126 | X509_EXTENSION *X509_EXTENSION_create_by_NID(X509_EXTENSION **ex, | 1101 | X509_EXTENSION *X509_EXTENSION_create_by_NID(X509_EXTENSION **ex, |
| 1127 | int nid, int crit, ASN1_OCTET_STRING *data); | 1102 | int nid, int crit, ASN1_OCTET_STRING *data); |
| @@ -1145,22 +1120,22 @@ X509_ATTRIBUTE *X509at_delete_attr(STACK_OF(X509_ATTRIBUTE) *x, int loc); | |||
| 1145 | STACK_OF(X509_ATTRIBUTE) *X509at_add1_attr(STACK_OF(X509_ATTRIBUTE) **x, | 1120 | STACK_OF(X509_ATTRIBUTE) *X509at_add1_attr(STACK_OF(X509_ATTRIBUTE) **x, |
| 1146 | X509_ATTRIBUTE *attr); | 1121 | X509_ATTRIBUTE *attr); |
| 1147 | STACK_OF(X509_ATTRIBUTE) *X509at_add1_attr_by_OBJ(STACK_OF(X509_ATTRIBUTE) **x, | 1122 | STACK_OF(X509_ATTRIBUTE) *X509at_add1_attr_by_OBJ(STACK_OF(X509_ATTRIBUTE) **x, |
| 1148 | ASN1_OBJECT *obj, int type, | 1123 | const ASN1_OBJECT *obj, int type, |
| 1149 | unsigned char *bytes, int len); | 1124 | const unsigned char *bytes, int len); |
| 1150 | STACK_OF(X509_ATTRIBUTE) *X509at_add1_attr_by_NID(STACK_OF(X509_ATTRIBUTE) **x, | 1125 | STACK_OF(X509_ATTRIBUTE) *X509at_add1_attr_by_NID(STACK_OF(X509_ATTRIBUTE) **x, |
| 1151 | int nid, int type, | 1126 | int nid, int type, |
| 1152 | unsigned char *bytes, int len); | 1127 | const unsigned char *bytes, int len); |
| 1153 | STACK_OF(X509_ATTRIBUTE) *X509at_add1_attr_by_txt(STACK_OF(X509_ATTRIBUTE) **x, | 1128 | STACK_OF(X509_ATTRIBUTE) *X509at_add1_attr_by_txt(STACK_OF(X509_ATTRIBUTE) **x, |
| 1154 | char *attrname, int type, | 1129 | const char *attrname, int type, |
| 1155 | unsigned char *bytes, int len); | 1130 | const unsigned char *bytes, int len); |
| 1156 | X509_ATTRIBUTE *X509_ATTRIBUTE_create_by_NID(X509_ATTRIBUTE **attr, int nid, | 1131 | X509_ATTRIBUTE *X509_ATTRIBUTE_create_by_NID(X509_ATTRIBUTE **attr, int nid, |
| 1157 | int atrtype, void *data, int len); | 1132 | int atrtype, const void *data, int len); |
| 1158 | X509_ATTRIBUTE *X509_ATTRIBUTE_create_by_OBJ(X509_ATTRIBUTE **attr, | 1133 | X509_ATTRIBUTE *X509_ATTRIBUTE_create_by_OBJ(X509_ATTRIBUTE **attr, |
| 1159 | ASN1_OBJECT *obj, int atrtype, void *data, int len); | 1134 | const ASN1_OBJECT *obj, int atrtype, const void *data, int len); |
| 1160 | X509_ATTRIBUTE *X509_ATTRIBUTE_create_by_txt(X509_ATTRIBUTE **attr, | 1135 | X509_ATTRIBUTE *X509_ATTRIBUTE_create_by_txt(X509_ATTRIBUTE **attr, |
| 1161 | char *atrname, int type, unsigned char *bytes, int len); | 1136 | const char *atrname, int type, const unsigned char *bytes, int len); |
| 1162 | int X509_ATTRIBUTE_set1_object(X509_ATTRIBUTE *attr, ASN1_OBJECT *obj); | 1137 | int X509_ATTRIBUTE_set1_object(X509_ATTRIBUTE *attr, const ASN1_OBJECT *obj); |
| 1163 | int X509_ATTRIBUTE_set1_data(X509_ATTRIBUTE *attr, int attrtype, void *data, int len); | 1138 | int X509_ATTRIBUTE_set1_data(X509_ATTRIBUTE *attr, int attrtype, const void *data, int len); |
| 1164 | void *X509_ATTRIBUTE_get0_data(X509_ATTRIBUTE *attr, int idx, | 1139 | void *X509_ATTRIBUTE_get0_data(X509_ATTRIBUTE *attr, int idx, |
| 1165 | int atrtype, void *data); | 1140 | int atrtype, void *data); |
| 1166 | int X509_ATTRIBUTE_count(X509_ATTRIBUTE *attr); | 1141 | int X509_ATTRIBUTE_count(X509_ATTRIBUTE *attr); |
| @@ -1174,31 +1149,17 @@ X509 *X509_find_by_issuer_and_serial(STACK_OF(X509) *sk,X509_NAME *name, | |||
| 1174 | ASN1_INTEGER *serial); | 1149 | ASN1_INTEGER *serial); |
| 1175 | X509 *X509_find_by_subject(STACK_OF(X509) *sk,X509_NAME *name); | 1150 | X509 *X509_find_by_subject(STACK_OF(X509) *sk,X509_NAME *name); |
| 1176 | 1151 | ||
| 1177 | int i2d_PBEPARAM(PBEPARAM *a, unsigned char **pp); | 1152 | DECLARE_ASN1_FUNCTIONS(PBEPARAM) |
| 1178 | PBEPARAM *PBEPARAM_new(void); | 1153 | DECLARE_ASN1_FUNCTIONS(PBE2PARAM) |
| 1179 | PBEPARAM *d2i_PBEPARAM(PBEPARAM **a, unsigned char **pp, long length); | 1154 | DECLARE_ASN1_FUNCTIONS(PBKDF2PARAM) |
| 1180 | void PBEPARAM_free(PBEPARAM *a); | 1155 | |
| 1181 | X509_ALGOR *PKCS5_pbe_set(int alg, int iter, unsigned char *salt, int saltlen); | 1156 | X509_ALGOR *PKCS5_pbe_set(int alg, int iter, unsigned char *salt, int saltlen); |
| 1182 | X509_ALGOR *PKCS5_pbe2_set(const EVP_CIPHER *cipher, int iter, | 1157 | X509_ALGOR *PKCS5_pbe2_set(const EVP_CIPHER *cipher, int iter, |
| 1183 | unsigned char *salt, int saltlen); | 1158 | unsigned char *salt, int saltlen); |
| 1184 | 1159 | ||
| 1185 | int i2d_PBKDF2PARAM(PBKDF2PARAM *a, unsigned char **pp); | ||
| 1186 | PBKDF2PARAM *PBKDF2PARAM_new(void); | ||
| 1187 | PBKDF2PARAM *d2i_PBKDF2PARAM(PBKDF2PARAM **a, unsigned char **pp, long length); | ||
| 1188 | void PBKDF2PARAM_free(PBKDF2PARAM *a); | ||
| 1189 | |||
| 1190 | int i2d_PBE2PARAM(PBE2PARAM *a, unsigned char **pp); | ||
| 1191 | PBE2PARAM *PBE2PARAM_new(void); | ||
| 1192 | PBE2PARAM *d2i_PBE2PARAM(PBE2PARAM **a, unsigned char **pp, long length); | ||
| 1193 | void PBE2PARAM_free(PBE2PARAM *a); | ||
| 1194 | |||
| 1195 | /* PKCS#8 utilities */ | 1160 | /* PKCS#8 utilities */ |
| 1196 | 1161 | ||
| 1197 | int i2d_PKCS8_PRIV_KEY_INFO(PKCS8_PRIV_KEY_INFO *a, unsigned char **pp); | 1162 | DECLARE_ASN1_FUNCTIONS(PKCS8_PRIV_KEY_INFO) |
| 1198 | PKCS8_PRIV_KEY_INFO *PKCS8_PRIV_KEY_INFO_new(void); | ||
| 1199 | PKCS8_PRIV_KEY_INFO *d2i_PKCS8_PRIV_KEY_INFO(PKCS8_PRIV_KEY_INFO **a, | ||
| 1200 | unsigned char **pp, long length); | ||
| 1201 | void PKCS8_PRIV_KEY_INFO_free(PKCS8_PRIV_KEY_INFO *a); | ||
| 1202 | 1163 | ||
| 1203 | EVP_PKEY *EVP_PKCS82PKEY(PKCS8_PRIV_KEY_INFO *p8); | 1164 | EVP_PKEY *EVP_PKCS82PKEY(PKCS8_PRIV_KEY_INFO *p8); |
| 1204 | PKCS8_PRIV_KEY_INFO *EVP_PKEY2PKCS8(EVP_PKEY *pkey); | 1165 | PKCS8_PRIV_KEY_INFO *EVP_PKEY2PKCS8(EVP_PKEY *pkey); |
| @@ -1220,6 +1181,7 @@ int X509_TRUST_get_trust(X509_TRUST *xp); | |||
| 1220 | /* The following lines are auto generated by the script mkerr.pl. Any changes | 1181 | /* The following lines are auto generated by the script mkerr.pl. Any changes |
| 1221 | * made after this point may be overwritten when the script is next run. | 1182 | * made after this point may be overwritten when the script is next run. |
| 1222 | */ | 1183 | */ |
| 1184 | void ERR_load_X509_strings(void); | ||
| 1223 | 1185 | ||
| 1224 | /* Error codes for the X509 functions. */ | 1186 | /* Error codes for the X509 functions. */ |
| 1225 | 1187 | ||
| @@ -1258,9 +1220,12 @@ int X509_TRUST_get_trust(X509_TRUST *xp); | |||
| 1258 | #define X509_F_X509_REQ_TO_X509 123 | 1220 | #define X509_F_X509_REQ_TO_X509 123 |
| 1259 | #define X509_F_X509_STORE_ADD_CERT 124 | 1221 | #define X509_F_X509_STORE_ADD_CERT 124 |
| 1260 | #define X509_F_X509_STORE_ADD_CRL 125 | 1222 | #define X509_F_X509_STORE_ADD_CRL 125 |
| 1223 | #define X509_F_X509_STORE_CTX_INIT 143 | ||
| 1224 | #define X509_F_X509_STORE_CTX_NEW 142 | ||
| 1261 | #define X509_F_X509_STORE_CTX_PURPOSE_INHERIT 134 | 1225 | #define X509_F_X509_STORE_CTX_PURPOSE_INHERIT 134 |
| 1262 | #define X509_F_X509_TO_X509_REQ 126 | 1226 | #define X509_F_X509_TO_X509_REQ 126 |
| 1263 | #define X509_F_X509_TRUST_ADD 133 | 1227 | #define X509_F_X509_TRUST_ADD 133 |
| 1228 | #define X509_F_X509_TRUST_SET 141 | ||
| 1264 | #define X509_F_X509_VERIFY_CERT 127 | 1229 | #define X509_F_X509_VERIFY_CERT 127 |
| 1265 | 1230 | ||
| 1266 | /* Reason codes. */ | 1231 | /* Reason codes. */ |
| @@ -1271,6 +1236,7 @@ int X509_TRUST_get_trust(X509_TRUST *xp); | |||
| 1271 | #define X509_R_ERR_ASN1_LIB 102 | 1236 | #define X509_R_ERR_ASN1_LIB 102 |
| 1272 | #define X509_R_INVALID_DIRECTORY 113 | 1237 | #define X509_R_INVALID_DIRECTORY 113 |
| 1273 | #define X509_R_INVALID_FIELD_NAME 119 | 1238 | #define X509_R_INVALID_FIELD_NAME 119 |
| 1239 | #define X509_R_INVALID_TRUST 123 | ||
| 1274 | #define X509_R_KEY_TYPE_MISMATCH 115 | 1240 | #define X509_R_KEY_TYPE_MISMATCH 115 |
| 1275 | #define X509_R_KEY_VALUES_MISMATCH 116 | 1241 | #define X509_R_KEY_VALUES_MISMATCH 116 |
| 1276 | #define X509_R_LOADING_CERT_DIR 103 | 1242 | #define X509_R_LOADING_CERT_DIR 103 |
| @@ -1291,4 +1257,3 @@ int X509_TRUST_get_trust(X509_TRUST *xp); | |||
| 1291 | } | 1257 | } |
| 1292 | #endif | 1258 | #endif |
| 1293 | #endif | 1259 | #endif |
| 1294 | |||
diff --git a/src/lib/libcrypto/x509/x509_att.c b/src/lib/libcrypto/x509/x509_att.c index caafde658f..0bae3d32a1 100644 --- a/src/lib/libcrypto/x509/x509_att.c +++ b/src/lib/libcrypto/x509/x509_att.c | |||
| @@ -149,8 +149,8 @@ err2: | |||
| 149 | } | 149 | } |
| 150 | 150 | ||
| 151 | STACK_OF(X509_ATTRIBUTE) *X509at_add1_attr_by_OBJ(STACK_OF(X509_ATTRIBUTE) **x, | 151 | STACK_OF(X509_ATTRIBUTE) *X509at_add1_attr_by_OBJ(STACK_OF(X509_ATTRIBUTE) **x, |
| 152 | ASN1_OBJECT *obj, int type, | 152 | const ASN1_OBJECT *obj, int type, |
| 153 | unsigned char *bytes, int len) | 153 | const unsigned char *bytes, int len) |
| 154 | { | 154 | { |
| 155 | X509_ATTRIBUTE *attr; | 155 | X509_ATTRIBUTE *attr; |
| 156 | STACK_OF(X509_ATTRIBUTE) *ret; | 156 | STACK_OF(X509_ATTRIBUTE) *ret; |
| @@ -163,7 +163,7 @@ STACK_OF(X509_ATTRIBUTE) *X509at_add1_attr_by_OBJ(STACK_OF(X509_ATTRIBUTE) **x, | |||
| 163 | 163 | ||
| 164 | STACK_OF(X509_ATTRIBUTE) *X509at_add1_attr_by_NID(STACK_OF(X509_ATTRIBUTE) **x, | 164 | STACK_OF(X509_ATTRIBUTE) *X509at_add1_attr_by_NID(STACK_OF(X509_ATTRIBUTE) **x, |
| 165 | int nid, int type, | 165 | int nid, int type, |
| 166 | unsigned char *bytes, int len) | 166 | const unsigned char *bytes, int len) |
| 167 | { | 167 | { |
| 168 | X509_ATTRIBUTE *attr; | 168 | X509_ATTRIBUTE *attr; |
| 169 | STACK_OF(X509_ATTRIBUTE) *ret; | 169 | STACK_OF(X509_ATTRIBUTE) *ret; |
| @@ -175,8 +175,8 @@ STACK_OF(X509_ATTRIBUTE) *X509at_add1_attr_by_NID(STACK_OF(X509_ATTRIBUTE) **x, | |||
| 175 | } | 175 | } |
| 176 | 176 | ||
| 177 | STACK_OF(X509_ATTRIBUTE) *X509at_add1_attr_by_txt(STACK_OF(X509_ATTRIBUTE) **x, | 177 | STACK_OF(X509_ATTRIBUTE) *X509at_add1_attr_by_txt(STACK_OF(X509_ATTRIBUTE) **x, |
| 178 | char *attrname, int type, | 178 | const char *attrname, int type, |
| 179 | unsigned char *bytes, int len) | 179 | const unsigned char *bytes, int len) |
| 180 | { | 180 | { |
| 181 | X509_ATTRIBUTE *attr; | 181 | X509_ATTRIBUTE *attr; |
| 182 | STACK_OF(X509_ATTRIBUTE) *ret; | 182 | STACK_OF(X509_ATTRIBUTE) *ret; |
| @@ -188,7 +188,7 @@ STACK_OF(X509_ATTRIBUTE) *X509at_add1_attr_by_txt(STACK_OF(X509_ATTRIBUTE) **x, | |||
| 188 | } | 188 | } |
| 189 | 189 | ||
| 190 | X509_ATTRIBUTE *X509_ATTRIBUTE_create_by_NID(X509_ATTRIBUTE **attr, int nid, | 190 | X509_ATTRIBUTE *X509_ATTRIBUTE_create_by_NID(X509_ATTRIBUTE **attr, int nid, |
| 191 | int atrtype, void *data, int len) | 191 | int atrtype, const void *data, int len) |
| 192 | { | 192 | { |
| 193 | ASN1_OBJECT *obj; | 193 | ASN1_OBJECT *obj; |
| 194 | X509_ATTRIBUTE *ret; | 194 | X509_ATTRIBUTE *ret; |
| @@ -205,7 +205,7 @@ X509_ATTRIBUTE *X509_ATTRIBUTE_create_by_NID(X509_ATTRIBUTE **attr, int nid, | |||
| 205 | } | 205 | } |
| 206 | 206 | ||
| 207 | X509_ATTRIBUTE *X509_ATTRIBUTE_create_by_OBJ(X509_ATTRIBUTE **attr, | 207 | X509_ATTRIBUTE *X509_ATTRIBUTE_create_by_OBJ(X509_ATTRIBUTE **attr, |
| 208 | ASN1_OBJECT *obj, int atrtype, void *data, int len) | 208 | const ASN1_OBJECT *obj, int atrtype, const void *data, int len) |
| 209 | { | 209 | { |
| 210 | X509_ATTRIBUTE *ret; | 210 | X509_ATTRIBUTE *ret; |
| 211 | 211 | ||
| @@ -234,7 +234,7 @@ err: | |||
| 234 | } | 234 | } |
| 235 | 235 | ||
| 236 | X509_ATTRIBUTE *X509_ATTRIBUTE_create_by_txt(X509_ATTRIBUTE **attr, | 236 | X509_ATTRIBUTE *X509_ATTRIBUTE_create_by_txt(X509_ATTRIBUTE **attr, |
| 237 | char *atrname, int type, unsigned char *bytes, int len) | 237 | const char *atrname, int type, const unsigned char *bytes, int len) |
| 238 | { | 238 | { |
| 239 | ASN1_OBJECT *obj; | 239 | ASN1_OBJECT *obj; |
| 240 | X509_ATTRIBUTE *nattr; | 240 | X509_ATTRIBUTE *nattr; |
| @@ -252,7 +252,7 @@ X509_ATTRIBUTE *X509_ATTRIBUTE_create_by_txt(X509_ATTRIBUTE **attr, | |||
| 252 | return nattr; | 252 | return nattr; |
| 253 | } | 253 | } |
| 254 | 254 | ||
| 255 | int X509_ATTRIBUTE_set1_object(X509_ATTRIBUTE *attr, ASN1_OBJECT *obj) | 255 | int X509_ATTRIBUTE_set1_object(X509_ATTRIBUTE *attr, const ASN1_OBJECT *obj) |
| 256 | { | 256 | { |
| 257 | if ((attr == NULL) || (obj == NULL)) | 257 | if ((attr == NULL) || (obj == NULL)) |
| 258 | return(0); | 258 | return(0); |
| @@ -261,7 +261,7 @@ int X509_ATTRIBUTE_set1_object(X509_ATTRIBUTE *attr, ASN1_OBJECT *obj) | |||
| 261 | return(1); | 261 | return(1); |
| 262 | } | 262 | } |
| 263 | 263 | ||
| 264 | int X509_ATTRIBUTE_set1_data(X509_ATTRIBUTE *attr, int attrtype, void *data, int len) | 264 | int X509_ATTRIBUTE_set1_data(X509_ATTRIBUTE *attr, int attrtype, const void *data, int len) |
| 265 | { | 265 | { |
| 266 | ASN1_TYPE *ttmp; | 266 | ASN1_TYPE *ttmp; |
| 267 | ASN1_STRING *stmp; | 267 | ASN1_STRING *stmp; |
| @@ -283,7 +283,7 @@ int X509_ATTRIBUTE_set1_data(X509_ATTRIBUTE *attr, int attrtype, void *data, int | |||
| 283 | if(!(attr->value.set = sk_ASN1_TYPE_new_null())) goto err; | 283 | if(!(attr->value.set = sk_ASN1_TYPE_new_null())) goto err; |
| 284 | if(!(ttmp = ASN1_TYPE_new())) goto err; | 284 | if(!(ttmp = ASN1_TYPE_new())) goto err; |
| 285 | if(!sk_ASN1_TYPE_push(attr->value.set, ttmp)) goto err; | 285 | if(!sk_ASN1_TYPE_push(attr->value.set, ttmp)) goto err; |
| 286 | attr->set = 1; | 286 | attr->single = 0; |
| 287 | ASN1_TYPE_set(ttmp, atype, stmp); | 287 | ASN1_TYPE_set(ttmp, atype, stmp); |
| 288 | return 1; | 288 | return 1; |
| 289 | err: | 289 | err: |
| @@ -293,7 +293,7 @@ int X509_ATTRIBUTE_set1_data(X509_ATTRIBUTE *attr, int attrtype, void *data, int | |||
| 293 | 293 | ||
| 294 | int X509_ATTRIBUTE_count(X509_ATTRIBUTE *attr) | 294 | int X509_ATTRIBUTE_count(X509_ATTRIBUTE *attr) |
| 295 | { | 295 | { |
| 296 | if(attr->set) return sk_ASN1_TYPE_num(attr->value.set); | 296 | if(!attr->single) return sk_ASN1_TYPE_num(attr->value.set); |
| 297 | if(attr->value.single) return 1; | 297 | if(attr->value.single) return 1; |
| 298 | return 0; | 298 | return 0; |
| 299 | } | 299 | } |
| @@ -321,6 +321,6 @@ ASN1_TYPE *X509_ATTRIBUTE_get0_type(X509_ATTRIBUTE *attr, int idx) | |||
| 321 | { | 321 | { |
| 322 | if (attr == NULL) return(NULL); | 322 | if (attr == NULL) return(NULL); |
| 323 | if(idx >= X509_ATTRIBUTE_count(attr)) return NULL; | 323 | if(idx >= X509_ATTRIBUTE_count(attr)) return NULL; |
| 324 | if(attr->set) return sk_ASN1_TYPE_value(attr->value.set, idx); | 324 | if(!attr->single) return sk_ASN1_TYPE_value(attr->value.set, idx); |
| 325 | else return attr->value.single; | 325 | else return attr->value.single; |
| 326 | } | 326 | } |
diff --git a/src/lib/libcrypto/x509/x509_cmp.c b/src/lib/libcrypto/x509/x509_cmp.c index 3f9f9b3d47..cd20b6d66f 100644 --- a/src/lib/libcrypto/x509/x509_cmp.c +++ b/src/lib/libcrypto/x509/x509_cmp.c | |||
| @@ -75,24 +75,26 @@ int X509_issuer_and_serial_cmp(const X509 *a, const X509 *b) | |||
| 75 | return(X509_NAME_cmp(ai->issuer,bi->issuer)); | 75 | return(X509_NAME_cmp(ai->issuer,bi->issuer)); |
| 76 | } | 76 | } |
| 77 | 77 | ||
| 78 | #ifndef NO_MD5 | 78 | #ifndef OPENSSL_NO_MD5 |
| 79 | unsigned long X509_issuer_and_serial_hash(X509 *a) | 79 | unsigned long X509_issuer_and_serial_hash(X509 *a) |
| 80 | { | 80 | { |
| 81 | unsigned long ret=0; | 81 | unsigned long ret=0; |
| 82 | MD5_CTX ctx; | 82 | EVP_MD_CTX ctx; |
| 83 | unsigned char md[16]; | 83 | unsigned char md[16]; |
| 84 | char str[256]; | 84 | char str[256]; |
| 85 | 85 | ||
| 86 | EVP_MD_CTX_init(&ctx); | ||
| 86 | X509_NAME_oneline(a->cert_info->issuer,str,256); | 87 | X509_NAME_oneline(a->cert_info->issuer,str,256); |
| 87 | ret=strlen(str); | 88 | ret=strlen(str); |
| 88 | MD5_Init(&ctx); | 89 | EVP_DigestInit_ex(&ctx, EVP_md5(), NULL); |
| 89 | MD5_Update(&ctx,(unsigned char *)str,ret); | 90 | EVP_DigestUpdate(&ctx,(unsigned char *)str,ret); |
| 90 | MD5_Update(&ctx,(unsigned char *)a->cert_info->serialNumber->data, | 91 | EVP_DigestUpdate(&ctx,(unsigned char *)a->cert_info->serialNumber->data, |
| 91 | (unsigned long)a->cert_info->serialNumber->length); | 92 | (unsigned long)a->cert_info->serialNumber->length); |
| 92 | MD5_Final(&(md[0]),&ctx); | 93 | EVP_DigestFinal_ex(&ctx,&(md[0]),NULL); |
| 93 | ret=( ((unsigned long)md[0] )|((unsigned long)md[1]<<8L)| | 94 | ret=( ((unsigned long)md[0] )|((unsigned long)md[1]<<8L)| |
| 94 | ((unsigned long)md[2]<<16L)|((unsigned long)md[3]<<24L) | 95 | ((unsigned long)md[2]<<16L)|((unsigned long)md[3]<<24L) |
| 95 | )&0xffffffffL; | 96 | )&0xffffffffL; |
| 97 | EVP_MD_CTX_cleanup(&ctx); | ||
| 96 | return(ret); | 98 | return(ret); |
| 97 | } | 99 | } |
| 98 | #endif | 100 | #endif |
| @@ -137,7 +139,7 @@ unsigned long X509_subject_name_hash(X509 *x) | |||
| 137 | return(X509_NAME_hash(x->cert_info->subject)); | 139 | return(X509_NAME_hash(x->cert_info->subject)); |
| 138 | } | 140 | } |
| 139 | 141 | ||
| 140 | #ifndef NO_SHA | 142 | #ifndef OPENSSL_NO_SHA |
| 141 | /* Compare two certificates: they must be identical for | 143 | /* Compare two certificates: they must be identical for |
| 142 | * this to work. NB: Although "cmp" operations are generally | 144 | * this to work. NB: Although "cmp" operations are generally |
| 143 | * prototyped to take "const" arguments (eg. for use in | 145 | * prototyped to take "const" arguments (eg. for use in |
| @@ -192,7 +194,7 @@ int X509_NAME_cmp(const X509_NAME *a, const X509_NAME *b) | |||
| 192 | return(0); | 194 | return(0); |
| 193 | } | 195 | } |
| 194 | 196 | ||
| 195 | #ifndef NO_MD5 | 197 | #ifndef OPENSSL_NO_MD5 |
| 196 | /* I now DER encode the name and hash it. Since I cache the DER encoding, | 198 | /* I now DER encode the name and hash it. Since I cache the DER encoding, |
| 197 | * this is reasonably efficient. */ | 199 | * this is reasonably efficient. */ |
| 198 | unsigned long X509_NAME_hash(X509_NAME *x) | 200 | unsigned long X509_NAME_hash(X509_NAME *x) |
| @@ -200,12 +202,9 @@ unsigned long X509_NAME_hash(X509_NAME *x) | |||
| 200 | unsigned long ret=0; | 202 | unsigned long ret=0; |
| 201 | unsigned char md[16]; | 203 | unsigned char md[16]; |
| 202 | 204 | ||
| 203 | /* Ensure cached version is up to date */ | 205 | /* Make sure X509_NAME structure contains valid cached encoding */ |
| 204 | i2d_X509_NAME(x,NULL); | 206 | i2d_X509_NAME(x,NULL); |
| 205 | /* Use cached encoding directly rather than copying: this should | 207 | EVP_Digest(x->bytes->data, x->bytes->length, md, NULL, EVP_md5(), NULL); |
| 206 | * keep libsafe happy. | ||
| 207 | */ | ||
| 208 | MD5((unsigned char *)x->bytes->data,x->bytes->length,&(md[0])); | ||
| 209 | 208 | ||
| 210 | ret=( ((unsigned long)md[0] )|((unsigned long)md[1]<<8L)| | 209 | ret=( ((unsigned long)md[0] )|((unsigned long)md[1]<<8L)| |
| 211 | ((unsigned long)md[2]<<16L)|((unsigned long)md[3]<<24L) | 210 | ((unsigned long)md[2]<<16L)|((unsigned long)md[3]<<24L) |
| @@ -258,6 +257,12 @@ EVP_PKEY *X509_get_pubkey(X509 *x) | |||
| 258 | return(X509_PUBKEY_get(x->cert_info->key)); | 257 | return(X509_PUBKEY_get(x->cert_info->key)); |
| 259 | } | 258 | } |
| 260 | 259 | ||
| 260 | ASN1_BIT_STRING *X509_get0_pubkey_bitstr(const X509 *x) | ||
| 261 | { | ||
| 262 | if(!x) return NULL; | ||
| 263 | return x->cert_info->key->public_key; | ||
| 264 | } | ||
| 265 | |||
| 261 | int X509_check_private_key(X509 *x, EVP_PKEY *k) | 266 | int X509_check_private_key(X509 *x, EVP_PKEY *k) |
| 262 | { | 267 | { |
| 263 | EVP_PKEY *xk=NULL; | 268 | EVP_PKEY *xk=NULL; |
| @@ -271,7 +276,7 @@ int X509_check_private_key(X509 *x, EVP_PKEY *k) | |||
| 271 | } | 276 | } |
| 272 | switch (k->type) | 277 | switch (k->type) |
| 273 | { | 278 | { |
| 274 | #ifndef NO_RSA | 279 | #ifndef OPENSSL_NO_RSA |
| 275 | case EVP_PKEY_RSA: | 280 | case EVP_PKEY_RSA: |
| 276 | if (BN_cmp(xk->pkey.rsa->n,k->pkey.rsa->n) != 0 | 281 | if (BN_cmp(xk->pkey.rsa->n,k->pkey.rsa->n) != 0 |
| 277 | || BN_cmp(xk->pkey.rsa->e,k->pkey.rsa->e) != 0) | 282 | || BN_cmp(xk->pkey.rsa->e,k->pkey.rsa->e) != 0) |
| @@ -281,7 +286,7 @@ int X509_check_private_key(X509 *x, EVP_PKEY *k) | |||
| 281 | } | 286 | } |
| 282 | break; | 287 | break; |
| 283 | #endif | 288 | #endif |
| 284 | #ifndef NO_DSA | 289 | #ifndef OPENSSL_NO_DSA |
| 285 | case EVP_PKEY_DSA: | 290 | case EVP_PKEY_DSA: |
| 286 | if (BN_cmp(xk->pkey.dsa->pub_key,k->pkey.dsa->pub_key) != 0) | 291 | if (BN_cmp(xk->pkey.dsa->pub_key,k->pkey.dsa->pub_key) != 0) |
| 287 | { | 292 | { |
| @@ -290,7 +295,7 @@ int X509_check_private_key(X509 *x, EVP_PKEY *k) | |||
| 290 | } | 295 | } |
| 291 | break; | 296 | break; |
| 292 | #endif | 297 | #endif |
| 293 | #ifndef NO_DH | 298 | #ifndef OPENSSL_NO_DH |
| 294 | case EVP_PKEY_DH: | 299 | case EVP_PKEY_DH: |
| 295 | /* No idea */ | 300 | /* No idea */ |
| 296 | X509err(X509_F_X509_CHECK_PRIVATE_KEY,X509_R_CANT_CHECK_DH_KEY); | 301 | X509err(X509_F_X509_CHECK_PRIVATE_KEY,X509_R_CANT_CHECK_DH_KEY); |
diff --git a/src/lib/libcrypto/x509/x509_d2.c b/src/lib/libcrypto/x509/x509_d2.c index 753d53eb43..51410cfd1a 100644 --- a/src/lib/libcrypto/x509/x509_d2.c +++ b/src/lib/libcrypto/x509/x509_d2.c | |||
| @@ -61,7 +61,7 @@ | |||
| 61 | #include <openssl/crypto.h> | 61 | #include <openssl/crypto.h> |
| 62 | #include <openssl/x509.h> | 62 | #include <openssl/x509.h> |
| 63 | 63 | ||
| 64 | #ifndef NO_STDIO | 64 | #ifndef OPENSSL_NO_STDIO |
| 65 | int X509_STORE_set_default_paths(X509_STORE *ctx) | 65 | int X509_STORE_set_default_paths(X509_STORE *ctx) |
| 66 | { | 66 | { |
| 67 | X509_LOOKUP *lookup; | 67 | X509_LOOKUP *lookup; |
diff --git a/src/lib/libcrypto/x509/x509_err.c b/src/lib/libcrypto/x509/x509_err.c index 848add56e9..5bbf4acf76 100644 --- a/src/lib/libcrypto/x509/x509_err.c +++ b/src/lib/libcrypto/x509/x509_err.c | |||
| @@ -63,7 +63,7 @@ | |||
| 63 | #include <openssl/x509.h> | 63 | #include <openssl/x509.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 X509_str_functs[]= | 67 | static ERR_STRING_DATA X509_str_functs[]= |
| 68 | { | 68 | { |
| 69 | {ERR_PACK(0,X509_F_ADD_CERT_DIR,0), "ADD_CERT_DIR"}, | 69 | {ERR_PACK(0,X509_F_ADD_CERT_DIR,0), "ADD_CERT_DIR"}, |
| @@ -100,9 +100,12 @@ static ERR_STRING_DATA X509_str_functs[]= | |||
| 100 | {ERR_PACK(0,X509_F_X509_REQ_TO_X509,0), "X509_REQ_to_X509"}, | 100 | {ERR_PACK(0,X509_F_X509_REQ_TO_X509,0), "X509_REQ_to_X509"}, |
| 101 | {ERR_PACK(0,X509_F_X509_STORE_ADD_CERT,0), "X509_STORE_add_cert"}, | 101 | {ERR_PACK(0,X509_F_X509_STORE_ADD_CERT,0), "X509_STORE_add_cert"}, |
| 102 | {ERR_PACK(0,X509_F_X509_STORE_ADD_CRL,0), "X509_STORE_add_crl"}, | 102 | {ERR_PACK(0,X509_F_X509_STORE_ADD_CRL,0), "X509_STORE_add_crl"}, |
| 103 | {ERR_PACK(0,X509_F_X509_STORE_CTX_INIT,0), "X509_STORE_CTX_init"}, | ||
| 104 | {ERR_PACK(0,X509_F_X509_STORE_CTX_NEW,0), "X509_STORE_CTX_new"}, | ||
| 103 | {ERR_PACK(0,X509_F_X509_STORE_CTX_PURPOSE_INHERIT,0), "X509_STORE_CTX_purpose_inherit"}, | 105 | {ERR_PACK(0,X509_F_X509_STORE_CTX_PURPOSE_INHERIT,0), "X509_STORE_CTX_purpose_inherit"}, |
| 104 | {ERR_PACK(0,X509_F_X509_TO_X509_REQ,0), "X509_to_X509_REQ"}, | 106 | {ERR_PACK(0,X509_F_X509_TO_X509_REQ,0), "X509_to_X509_REQ"}, |
| 105 | {ERR_PACK(0,X509_F_X509_TRUST_ADD,0), "X509_TRUST_add"}, | 107 | {ERR_PACK(0,X509_F_X509_TRUST_ADD,0), "X509_TRUST_add"}, |
| 108 | {ERR_PACK(0,X509_F_X509_TRUST_SET,0), "X509_TRUST_set"}, | ||
| 106 | {ERR_PACK(0,X509_F_X509_VERIFY_CERT,0), "X509_verify_cert"}, | 109 | {ERR_PACK(0,X509_F_X509_VERIFY_CERT,0), "X509_verify_cert"}, |
| 107 | {0,NULL} | 110 | {0,NULL} |
| 108 | }; | 111 | }; |
| @@ -116,6 +119,7 @@ static ERR_STRING_DATA X509_str_reasons[]= | |||
| 116 | {X509_R_ERR_ASN1_LIB ,"err asn1 lib"}, | 119 | {X509_R_ERR_ASN1_LIB ,"err asn1 lib"}, |
| 117 | {X509_R_INVALID_DIRECTORY ,"invalid directory"}, | 120 | {X509_R_INVALID_DIRECTORY ,"invalid directory"}, |
| 118 | {X509_R_INVALID_FIELD_NAME ,"invalid field name"}, | 121 | {X509_R_INVALID_FIELD_NAME ,"invalid field name"}, |
| 122 | {X509_R_INVALID_TRUST ,"invalid trust"}, | ||
| 119 | {X509_R_KEY_TYPE_MISMATCH ,"key type mismatch"}, | 123 | {X509_R_KEY_TYPE_MISMATCH ,"key type mismatch"}, |
| 120 | {X509_R_KEY_VALUES_MISMATCH ,"key values mismatch"}, | 124 | {X509_R_KEY_VALUES_MISMATCH ,"key values mismatch"}, |
| 121 | {X509_R_LOADING_CERT_DIR ,"loading cert dir"}, | 125 | {X509_R_LOADING_CERT_DIR ,"loading cert dir"}, |
| @@ -143,7 +147,7 @@ void ERR_load_X509_strings(void) | |||
| 143 | if (init) | 147 | if (init) |
| 144 | { | 148 | { |
| 145 | init=0; | 149 | init=0; |
| 146 | #ifndef NO_ERR | 150 | #ifndef OPENSSL_NO_ERR |
| 147 | ERR_load_strings(ERR_LIB_X509,X509_str_functs); | 151 | ERR_load_strings(ERR_LIB_X509,X509_str_functs); |
| 148 | ERR_load_strings(ERR_LIB_X509,X509_str_reasons); | 152 | ERR_load_strings(ERR_LIB_X509,X509_str_reasons); |
| 149 | #endif | 153 | #endif |
diff --git a/src/lib/libcrypto/x509/x509_ext.c b/src/lib/libcrypto/x509/x509_ext.c index 2955989807..e7fdacb5e4 100644 --- a/src/lib/libcrypto/x509/x509_ext.c +++ b/src/lib/libcrypto/x509/x509_ext.c | |||
| @@ -101,6 +101,12 @@ void *X509_CRL_get_ext_d2i(X509_CRL *x, int nid, int *crit, int *idx) | |||
| 101 | return X509V3_get_d2i(x->crl->extensions, nid, crit, idx); | 101 | return X509V3_get_d2i(x->crl->extensions, nid, crit, idx); |
| 102 | } | 102 | } |
| 103 | 103 | ||
| 104 | int X509_CRL_add1_ext_i2d(X509_CRL *x, int nid, void *value, int crit, | ||
| 105 | unsigned long flags) | ||
| 106 | { | ||
| 107 | return X509V3_add1_i2d(&x->crl->extensions, nid, value, crit, flags); | ||
| 108 | } | ||
| 109 | |||
| 104 | int X509_CRL_add_ext(X509_CRL *x, X509_EXTENSION *ex, int loc) | 110 | int X509_CRL_add_ext(X509_CRL *x, X509_EXTENSION *ex, int loc) |
| 105 | { | 111 | { |
| 106 | return(X509v3_add_ext(&(x->crl->extensions),ex,loc) != NULL); | 112 | return(X509v3_add_ext(&(x->crl->extensions),ex,loc) != NULL); |
| @@ -146,6 +152,13 @@ void *X509_get_ext_d2i(X509 *x, int nid, int *crit, int *idx) | |||
| 146 | return X509V3_get_d2i(x->cert_info->extensions, nid, crit, idx); | 152 | return X509V3_get_d2i(x->cert_info->extensions, nid, crit, idx); |
| 147 | } | 153 | } |
| 148 | 154 | ||
| 155 | int X509_add1_ext_i2d(X509 *x, int nid, void *value, int crit, | ||
| 156 | unsigned long flags) | ||
| 157 | { | ||
| 158 | return X509V3_add1_i2d(&x->cert_info->extensions, nid, value, crit, | ||
| 159 | flags); | ||
| 160 | } | ||
| 161 | |||
| 149 | int X509_REVOKED_get_ext_count(X509_REVOKED *x) | 162 | int X509_REVOKED_get_ext_count(X509_REVOKED *x) |
| 150 | { | 163 | { |
| 151 | return(X509v3_get_ext_count(x->extensions)); | 164 | return(X509v3_get_ext_count(x->extensions)); |
| @@ -187,5 +200,11 @@ void *X509_REVOKED_get_ext_d2i(X509_REVOKED *x, int nid, int *crit, int *idx) | |||
| 187 | return X509V3_get_d2i(x->extensions, nid, crit, idx); | 200 | return X509V3_get_d2i(x->extensions, nid, crit, idx); |
| 188 | } | 201 | } |
| 189 | 202 | ||
| 203 | int X509_REVOKED_add1_ext_i2d(X509_REVOKED *x, int nid, void *value, int crit, | ||
| 204 | unsigned long flags) | ||
| 205 | { | ||
| 206 | return X509V3_add1_i2d(&x->extensions, nid, value, crit, flags); | ||
| 207 | } | ||
| 208 | |||
| 190 | IMPLEMENT_STACK_OF(X509_EXTENSION) | 209 | IMPLEMENT_STACK_OF(X509_EXTENSION) |
| 191 | IMPLEMENT_ASN1_SET_OF(X509_EXTENSION) | 210 | IMPLEMENT_ASN1_SET_OF(X509_EXTENSION) |
diff --git a/src/lib/libcrypto/x509/x509_lu.c b/src/lib/libcrypto/x509/x509_lu.c index 863c738cad..b780dae5e2 100644 --- a/src/lib/libcrypto/x509/x509_lu.c +++ b/src/lib/libcrypto/x509/x509_lu.c | |||
| @@ -60,8 +60,7 @@ | |||
| 60 | #include "cryptlib.h" | 60 | #include "cryptlib.h" |
| 61 | #include <openssl/lhash.h> | 61 | #include <openssl/lhash.h> |
| 62 | #include <openssl/x509.h> | 62 | #include <openssl/x509.h> |
| 63 | 63 | #include <openssl/x509v3.h> | |
| 64 | static STACK_OF(CRYPTO_EX_DATA_FUNCS) *x509_store_meth=NULL; | ||
| 65 | 64 | ||
| 66 | X509_LOOKUP *X509_LOOKUP_new(X509_LOOKUP_METHOD *method) | 65 | X509_LOOKUP *X509_LOOKUP_new(X509_LOOKUP_METHOD *method) |
| 67 | { | 66 | { |
| @@ -185,9 +184,23 @@ X509_STORE *X509_STORE_new(void) | |||
| 185 | ret->objs = sk_X509_OBJECT_new(x509_object_cmp); | 184 | ret->objs = sk_X509_OBJECT_new(x509_object_cmp); |
| 186 | ret->cache=1; | 185 | ret->cache=1; |
| 187 | ret->get_cert_methods=sk_X509_LOOKUP_new_null(); | 186 | ret->get_cert_methods=sk_X509_LOOKUP_new_null(); |
| 188 | ret->verify=NULL; | 187 | ret->verify=0; |
| 189 | ret->verify_cb=NULL; | 188 | ret->verify_cb=0; |
| 190 | memset(&ret->ex_data,0,sizeof(CRYPTO_EX_DATA)); | 189 | |
| 190 | ret->purpose = 0; | ||
| 191 | ret->trust = 0; | ||
| 192 | |||
| 193 | ret->flags = 0; | ||
| 194 | |||
| 195 | ret->get_issuer = 0; | ||
| 196 | ret->check_issued = 0; | ||
| 197 | ret->check_revocation = 0; | ||
| 198 | ret->get_crl = 0; | ||
| 199 | ret->check_crl = 0; | ||
| 200 | ret->cert_crl = 0; | ||
| 201 | ret->cleanup = 0; | ||
| 202 | |||
| 203 | CRYPTO_new_ex_data(CRYPTO_EX_INDEX_X509_STORE, ret, &ret->ex_data); | ||
| 191 | ret->references=1; | 204 | ret->references=1; |
| 192 | ret->depth=0; | 205 | ret->depth=0; |
| 193 | return ret; | 206 | return ret; |
| @@ -230,7 +243,7 @@ void X509_STORE_free(X509_STORE *vfy) | |||
| 230 | sk_X509_LOOKUP_free(sk); | 243 | sk_X509_LOOKUP_free(sk); |
| 231 | sk_X509_OBJECT_pop_free(vfy->objs, cleanup); | 244 | sk_X509_OBJECT_pop_free(vfy->objs, cleanup); |
| 232 | 245 | ||
| 233 | CRYPTO_free_ex_data(x509_store_meth,vfy,&vfy->ex_data); | 246 | CRYPTO_free_ex_data(CRYPTO_EX_INDEX_X509_STORE, vfy, &vfy->ex_data); |
| 234 | OPENSSL_free(vfy); | 247 | OPENSSL_free(vfy); |
| 235 | } | 248 | } |
| 236 | 249 | ||
| @@ -525,5 +538,20 @@ int X509_STORE_CTX_get1_issuer(X509 **issuer, X509_STORE_CTX *ctx, X509 *x) | |||
| 525 | return 0; | 538 | return 0; |
| 526 | } | 539 | } |
| 527 | 540 | ||
| 541 | void X509_STORE_set_flags(X509_STORE *ctx, long flags) | ||
| 542 | { | ||
| 543 | ctx->flags |= flags; | ||
| 544 | } | ||
| 545 | |||
| 546 | int X509_STORE_set_purpose(X509_STORE *ctx, int purpose) | ||
| 547 | { | ||
| 548 | return X509_PURPOSE_set(&ctx->purpose, purpose); | ||
| 549 | } | ||
| 550 | |||
| 551 | int X509_STORE_set_trust(X509_STORE *ctx, int trust) | ||
| 552 | { | ||
| 553 | return X509_TRUST_set(&ctx->trust, trust); | ||
| 554 | } | ||
| 555 | |||
| 528 | IMPLEMENT_STACK_OF(X509_LOOKUP) | 556 | IMPLEMENT_STACK_OF(X509_LOOKUP) |
| 529 | IMPLEMENT_STACK_OF(X509_OBJECT) | 557 | IMPLEMENT_STACK_OF(X509_OBJECT) |
diff --git a/src/lib/libcrypto/x509/x509_obj.c b/src/lib/libcrypto/x509/x509_obj.c index f0271fdfa1..1e718f76eb 100644 --- a/src/lib/libcrypto/x509/x509_obj.c +++ b/src/lib/libcrypto/x509/x509_obj.c | |||
| @@ -94,6 +94,7 @@ int i; | |||
| 94 | OPENSSL_free(b); | 94 | OPENSSL_free(b); |
| 95 | } | 95 | } |
| 96 | strncpy(buf,"NO X509_NAME",len); | 96 | strncpy(buf,"NO X509_NAME",len); |
| 97 | buf[len-1]='\0'; | ||
| 97 | return buf; | 98 | return buf; |
| 98 | } | 99 | } |
| 99 | 100 | ||
diff --git a/src/lib/libcrypto/x509/x509_req.c b/src/lib/libcrypto/x509/x509_req.c index 7eca1bd57a..0affa3bf30 100644 --- a/src/lib/libcrypto/x509/x509_req.c +++ b/src/lib/libcrypto/x509/x509_req.c | |||
| @@ -156,9 +156,9 @@ STACK_OF(X509_EXTENSION) *X509_REQ_get_extensions(X509_REQ *req) | |||
| 156 | for(i = 0; i < sk_X509_ATTRIBUTE_num(sk); i++) { | 156 | for(i = 0; i < sk_X509_ATTRIBUTE_num(sk); i++) { |
| 157 | attr = sk_X509_ATTRIBUTE_value(sk, i); | 157 | attr = sk_X509_ATTRIBUTE_value(sk, i); |
| 158 | if(X509_REQ_extension_nid(OBJ_obj2nid(attr->object))) { | 158 | if(X509_REQ_extension_nid(OBJ_obj2nid(attr->object))) { |
| 159 | if(attr->set && sk_ASN1_TYPE_num(attr->value.set)) | 159 | if(attr->single) ext = attr->value.single; |
| 160 | else if(sk_ASN1_TYPE_num(attr->value.set)) | ||
| 160 | ext = sk_ASN1_TYPE_value(attr->value.set, 0); | 161 | ext = sk_ASN1_TYPE_value(attr->value.set, 0); |
| 161 | else ext = attr->value.single; | ||
| 162 | break; | 162 | break; |
| 163 | } | 163 | } |
| 164 | } | 164 | } |
| @@ -199,7 +199,7 @@ int X509_REQ_add_extensions_nid(X509_REQ *req, STACK_OF(X509_EXTENSION) *exts, | |||
| 199 | if(!(attr->value.set = sk_ASN1_TYPE_new_null())) goto err; | 199 | if(!(attr->value.set = sk_ASN1_TYPE_new_null())) goto err; |
| 200 | if(!sk_ASN1_TYPE_push(attr->value.set, at)) goto err; | 200 | if(!sk_ASN1_TYPE_push(attr->value.set, at)) goto err; |
| 201 | at = NULL; | 201 | at = NULL; |
| 202 | attr->set = 1; | 202 | attr->single = 0; |
| 203 | attr->object = OBJ_nid2obj(nid); | 203 | attr->object = OBJ_nid2obj(nid); |
| 204 | if(!sk_X509_ATTRIBUTE_push(req->req_info->attributes, attr)) goto err; | 204 | if(!sk_X509_ATTRIBUTE_push(req->req_info->attributes, attr)) goto err; |
| 205 | return 1; | 205 | return 1; |
| @@ -251,8 +251,8 @@ int X509_REQ_add1_attr(X509_REQ *req, X509_ATTRIBUTE *attr) | |||
| 251 | } | 251 | } |
| 252 | 252 | ||
| 253 | int X509_REQ_add1_attr_by_OBJ(X509_REQ *req, | 253 | int X509_REQ_add1_attr_by_OBJ(X509_REQ *req, |
| 254 | ASN1_OBJECT *obj, int type, | 254 | const ASN1_OBJECT *obj, int type, |
| 255 | unsigned char *bytes, int len) | 255 | const unsigned char *bytes, int len) |
| 256 | { | 256 | { |
| 257 | if(X509at_add1_attr_by_OBJ(&req->req_info->attributes, obj, | 257 | if(X509at_add1_attr_by_OBJ(&req->req_info->attributes, obj, |
| 258 | type, bytes, len)) return 1; | 258 | type, bytes, len)) return 1; |
| @@ -261,7 +261,7 @@ int X509_REQ_add1_attr_by_OBJ(X509_REQ *req, | |||
| 261 | 261 | ||
| 262 | int X509_REQ_add1_attr_by_NID(X509_REQ *req, | 262 | int X509_REQ_add1_attr_by_NID(X509_REQ *req, |
| 263 | int nid, int type, | 263 | int nid, int type, |
| 264 | unsigned char *bytes, int len) | 264 | const unsigned char *bytes, int len) |
| 265 | { | 265 | { |
| 266 | if(X509at_add1_attr_by_NID(&req->req_info->attributes, nid, | 266 | if(X509at_add1_attr_by_NID(&req->req_info->attributes, nid, |
| 267 | type, bytes, len)) return 1; | 267 | type, bytes, len)) return 1; |
| @@ -269,8 +269,8 @@ int X509_REQ_add1_attr_by_NID(X509_REQ *req, | |||
| 269 | } | 269 | } |
| 270 | 270 | ||
| 271 | int X509_REQ_add1_attr_by_txt(X509_REQ *req, | 271 | int X509_REQ_add1_attr_by_txt(X509_REQ *req, |
| 272 | char *attrname, int type, | 272 | const char *attrname, int type, |
| 273 | unsigned char *bytes, int len) | 273 | const unsigned char *bytes, int len) |
| 274 | { | 274 | { |
| 275 | if(X509at_add1_attr_by_txt(&req->req_info->attributes, attrname, | 275 | if(X509at_add1_attr_by_txt(&req->req_info->attributes, attrname, |
| 276 | type, bytes, len)) return 1; | 276 | type, bytes, len)) return 1; |
diff --git a/src/lib/libcrypto/x509/x509_trs.c b/src/lib/libcrypto/x509/x509_trs.c index 86b3b79dcc..17d69ac005 100644 --- a/src/lib/libcrypto/x509/x509_trs.c +++ b/src/lib/libcrypto/x509/x509_trs.c | |||
| @@ -66,6 +66,7 @@ static int tr_cmp(const X509_TRUST * const *a, | |||
| 66 | static void trtable_free(X509_TRUST *p); | 66 | static void trtable_free(X509_TRUST *p); |
| 67 | 67 | ||
| 68 | static int trust_1oidany(X509_TRUST *trust, X509 *x, int flags); | 68 | static int trust_1oidany(X509_TRUST *trust, X509 *x, int flags); |
| 69 | static int trust_1oid(X509_TRUST *trust, X509 *x, int flags); | ||
| 69 | static int trust_compat(X509_TRUST *trust, X509 *x, int flags); | 70 | static int trust_compat(X509_TRUST *trust, X509 *x, int flags); |
| 70 | 71 | ||
| 71 | static int obj_trust(int id, X509 *x, int flags); | 72 | static int obj_trust(int id, X509 *x, int flags); |
| @@ -79,8 +80,10 @@ static int (*default_trust)(int id, X509 *x, int flags) = obj_trust; | |||
| 79 | static X509_TRUST trstandard[] = { | 80 | static X509_TRUST trstandard[] = { |
| 80 | {X509_TRUST_COMPAT, 0, trust_compat, "compatible", 0, NULL}, | 81 | {X509_TRUST_COMPAT, 0, trust_compat, "compatible", 0, NULL}, |
| 81 | {X509_TRUST_SSL_CLIENT, 0, trust_1oidany, "SSL Client", NID_client_auth, NULL}, | 82 | {X509_TRUST_SSL_CLIENT, 0, trust_1oidany, "SSL Client", NID_client_auth, NULL}, |
| 82 | {X509_TRUST_SSL_SERVER, 0, trust_1oidany, "SSL Client", NID_server_auth, NULL}, | 83 | {X509_TRUST_SSL_SERVER, 0, trust_1oidany, "SSL Server", NID_server_auth, NULL}, |
| 83 | {X509_TRUST_EMAIL, 0, trust_1oidany, "S/MIME email", NID_email_protect, NULL}, | 84 | {X509_TRUST_EMAIL, 0, trust_1oidany, "S/MIME email", NID_email_protect, NULL}, |
| 85 | {X509_TRUST_OCSP_SIGN, 0, trust_1oid, "OCSP responder", NID_OCSP_sign, NULL}, | ||
| 86 | {X509_TRUST_OCSP_REQUEST, 0, trust_1oid, "OCSP request", NID_ad_OCSP, NULL} | ||
| 84 | }; | 87 | }; |
| 85 | 88 | ||
| 86 | #define X509_TRUST_COUNT (sizeof(trstandard)/sizeof(X509_TRUST)) | 89 | #define X509_TRUST_COUNT (sizeof(trstandard)/sizeof(X509_TRUST)) |
| @@ -97,10 +100,10 @@ static int tr_cmp(const X509_TRUST * const *a, | |||
| 97 | 100 | ||
| 98 | int (*X509_TRUST_set_default(int (*trust)(int , X509 *, int)))(int, X509 *, int) | 101 | int (*X509_TRUST_set_default(int (*trust)(int , X509 *, int)))(int, X509 *, int) |
| 99 | { | 102 | { |
| 100 | int (*oldtrust)(int , X509 *, int); | 103 | int (*oldtrust)(int , X509 *, int); |
| 101 | oldtrust = default_trust; | 104 | oldtrust = default_trust; |
| 102 | default_trust = trust; | 105 | default_trust = trust; |
| 103 | return oldtrust; | 106 | return oldtrust; |
| 104 | } | 107 | } |
| 105 | 108 | ||
| 106 | 109 | ||
| @@ -141,6 +144,16 @@ int X509_TRUST_get_by_id(int id) | |||
| 141 | return idx + X509_TRUST_COUNT; | 144 | return idx + X509_TRUST_COUNT; |
| 142 | } | 145 | } |
| 143 | 146 | ||
| 147 | int X509_TRUST_set(int *t, int trust) | ||
| 148 | { | ||
| 149 | if(X509_TRUST_get_by_id(trust) == -1) { | ||
| 150 | X509err(X509_F_X509_TRUST_SET, X509_R_INVALID_TRUST); | ||
| 151 | return 0; | ||
| 152 | } | ||
| 153 | *t = trust; | ||
| 154 | return 1; | ||
| 155 | } | ||
| 156 | |||
| 144 | int X509_TRUST_add(int id, int flags, int (*ck)(X509_TRUST *, X509 *, int), | 157 | int X509_TRUST_add(int id, int flags, int (*ck)(X509_TRUST *, X509 *, int), |
| 145 | char *name, int arg1, void *arg2) | 158 | char *name, int arg1, void *arg2) |
| 146 | { | 159 | { |
| @@ -236,6 +249,12 @@ static int trust_1oidany(X509_TRUST *trust, X509 *x, int flags) | |||
| 236 | return trust_compat(trust, x, flags); | 249 | return trust_compat(trust, x, flags); |
| 237 | } | 250 | } |
| 238 | 251 | ||
| 252 | static int trust_1oid(X509_TRUST *trust, X509 *x, int flags) | ||
| 253 | { | ||
| 254 | if(x->aux) return obj_trust(trust->arg1, x, flags); | ||
| 255 | return X509_TRUST_UNTRUSTED; | ||
| 256 | } | ||
| 257 | |||
| 239 | static int trust_compat(X509_TRUST *trust, X509 *x, int flags) | 258 | static int trust_compat(X509_TRUST *trust, X509 *x, int flags) |
| 240 | { | 259 | { |
| 241 | X509_check_purpose(x, -1, 0); | 260 | X509_check_purpose(x, -1, 0); |
diff --git a/src/lib/libcrypto/x509/x509_txt.c b/src/lib/libcrypto/x509/x509_txt.c index cfb478d4bc..4f83db8ba2 100644 --- a/src/lib/libcrypto/x509/x509_txt.c +++ b/src/lib/libcrypto/x509/x509_txt.c | |||
| @@ -83,7 +83,7 @@ const char *X509_verify_cert_error_string(long n) | |||
| 83 | case X509_V_ERR_UNABLE_TO_DECRYPT_CERT_SIGNATURE: | 83 | case X509_V_ERR_UNABLE_TO_DECRYPT_CERT_SIGNATURE: |
| 84 | return("unable to decrypt certificate's signature"); | 84 | return("unable to decrypt certificate's signature"); |
| 85 | case X509_V_ERR_UNABLE_TO_DECRYPT_CRL_SIGNATURE: | 85 | case X509_V_ERR_UNABLE_TO_DECRYPT_CRL_SIGNATURE: |
| 86 | return("unable to decrypt CRL's's signature"); | 86 | return("unable to decrypt CRL's signature"); |
| 87 | case X509_V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY: | 87 | case X509_V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY: |
| 88 | return("unable to decode issuer public key"); | 88 | return("unable to decode issuer public key"); |
| 89 | case X509_V_ERR_CERT_SIGNATURE_FAILURE: | 89 | case X509_V_ERR_CERT_SIGNATURE_FAILURE: |
| @@ -95,7 +95,7 @@ const char *X509_verify_cert_error_string(long n) | |||
| 95 | case X509_V_ERR_CRL_NOT_YET_VALID: | 95 | case X509_V_ERR_CRL_NOT_YET_VALID: |
| 96 | return("CRL is not yet valid"); | 96 | return("CRL is not yet valid"); |
| 97 | case X509_V_ERR_CERT_HAS_EXPIRED: | 97 | case X509_V_ERR_CERT_HAS_EXPIRED: |
| 98 | return("Certificate has expired"); | 98 | return("certificate has expired"); |
| 99 | case X509_V_ERR_CRL_HAS_EXPIRED: | 99 | case X509_V_ERR_CRL_HAS_EXPIRED: |
| 100 | return("CRL has expired"); | 100 | return("CRL has expired"); |
| 101 | case X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD: | 101 | case X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD: |
| @@ -141,6 +141,12 @@ const char *X509_verify_cert_error_string(long n) | |||
| 141 | case X509_V_ERR_KEYUSAGE_NO_CERTSIGN: | 141 | case X509_V_ERR_KEYUSAGE_NO_CERTSIGN: |
| 142 | return("key usage does not include certificate signing"); | 142 | return("key usage does not include certificate signing"); |
| 143 | 143 | ||
| 144 | case X509_V_ERR_UNABLE_TO_GET_CRL_ISSUER: | ||
| 145 | return("unable to get CRL issuer certificate"); | ||
| 146 | |||
| 147 | case X509_V_ERR_UNHANDLED_CRITICAL_EXTENSION: | ||
| 148 | return("unhandled critical extension"); | ||
| 149 | |||
| 144 | default: | 150 | default: |
| 145 | sprintf(buf,"error number %ld",n); | 151 | sprintf(buf,"error number %ld",n); |
| 146 | return(buf); | 152 | return(buf); |
diff --git a/src/lib/libcrypto/x509/x509_v3.c b/src/lib/libcrypto/x509/x509_v3.c index 52887986fe..b5f7daa2e5 100644 --- a/src/lib/libcrypto/x509/x509_v3.c +++ b/src/lib/libcrypto/x509/x509_v3.c | |||
| @@ -115,8 +115,8 @@ int X509v3_get_ext_by_critical(const STACK_OF(X509_EXTENSION) *sk, int crit, | |||
| 115 | for ( ; lastpos < n; lastpos++) | 115 | for ( ; lastpos < n; lastpos++) |
| 116 | { | 116 | { |
| 117 | ex=sk_X509_EXTENSION_value(sk,lastpos); | 117 | ex=sk_X509_EXTENSION_value(sk,lastpos); |
| 118 | if ( (ex->critical && crit) || | 118 | if ( ((ex->critical > 0) && crit) || |
| 119 | (!ex->critical && !crit)) | 119 | (!(ex->critical <= 0) && !crit)) |
| 120 | return(lastpos); | 120 | return(lastpos); |
| 121 | } | 121 | } |
| 122 | return(-1); | 122 | return(-1); |
| @@ -234,7 +234,7 @@ int X509_EXTENSION_set_object(X509_EXTENSION *ex, ASN1_OBJECT *obj) | |||
| 234 | int X509_EXTENSION_set_critical(X509_EXTENSION *ex, int crit) | 234 | int X509_EXTENSION_set_critical(X509_EXTENSION *ex, int crit) |
| 235 | { | 235 | { |
| 236 | if (ex == NULL) return(0); | 236 | if (ex == NULL) return(0); |
| 237 | ex->critical=(crit)?0xFF:0; | 237 | ex->critical=(crit)?0xFF:-1; |
| 238 | return(1); | 238 | return(1); |
| 239 | } | 239 | } |
| 240 | 240 | ||
| @@ -263,5 +263,6 @@ ASN1_OCTET_STRING *X509_EXTENSION_get_data(X509_EXTENSION *ex) | |||
| 263 | int X509_EXTENSION_get_critical(X509_EXTENSION *ex) | 263 | int X509_EXTENSION_get_critical(X509_EXTENSION *ex) |
| 264 | { | 264 | { |
| 265 | if (ex == NULL) return(0); | 265 | if (ex == NULL) return(0); |
| 266 | return(ex->critical); | 266 | if(ex->critical > 0) return 1; |
| 267 | return 0; | ||
| 267 | } | 268 | } |
diff --git a/src/lib/libcrypto/x509/x509_vfy.c b/src/lib/libcrypto/x509/x509_vfy.c index 0f4110cc64..db12f7bd35 100644 --- a/src/lib/libcrypto/x509/x509_vfy.c +++ b/src/lib/libcrypto/x509/x509_vfy.c | |||
| @@ -75,15 +75,11 @@ static int check_issued(X509_STORE_CTX *ctx, X509 *x, X509 *issuer); | |||
| 75 | static X509 *find_issuer(X509_STORE_CTX *ctx, STACK_OF(X509) *sk, X509 *x); | 75 | static X509 *find_issuer(X509_STORE_CTX *ctx, STACK_OF(X509) *sk, X509 *x); |
| 76 | static int check_chain_purpose(X509_STORE_CTX *ctx); | 76 | static int check_chain_purpose(X509_STORE_CTX *ctx); |
| 77 | static int check_trust(X509_STORE_CTX *ctx); | 77 | static int check_trust(X509_STORE_CTX *ctx); |
| 78 | static int check_revocation(X509_STORE_CTX *ctx); | ||
| 79 | static int check_cert(X509_STORE_CTX *ctx); | ||
| 78 | static int internal_verify(X509_STORE_CTX *ctx); | 80 | static int internal_verify(X509_STORE_CTX *ctx); |
| 79 | const char *X509_version="X.509" OPENSSL_VERSION_PTEXT; | 81 | const char *X509_version="X.509" OPENSSL_VERSION_PTEXT; |
| 80 | 82 | ||
| 81 | static STACK_OF(CRYPTO_EX_DATA_FUNCS) *x509_store_ctx_method=NULL; | ||
| 82 | static int x509_store_ctx_num=0; | ||
| 83 | #if 0 | ||
| 84 | static int x509_store_num=1; | ||
| 85 | static STACK *x509_store_method=NULL; | ||
| 86 | #endif | ||
| 87 | 83 | ||
| 88 | static int null_callback(int ok, X509_STORE_CTX *e) | 84 | static int null_callback(int ok, X509_STORE_CTX *e) |
| 89 | { | 85 | { |
| @@ -113,7 +109,6 @@ int X509_verify_cert(X509_STORE_CTX *ctx) | |||
| 113 | } | 109 | } |
| 114 | 110 | ||
| 115 | cb=ctx->verify_cb; | 111 | cb=ctx->verify_cb; |
| 116 | if (cb == NULL) cb=null_callback; | ||
| 117 | 112 | ||
| 118 | /* first we make sure the chain we are going to build is | 113 | /* first we make sure the chain we are going to build is |
| 119 | * present and that the first entry is in place */ | 114 | * present and that the first entry is in place */ |
| @@ -299,6 +294,13 @@ int X509_verify_cert(X509_STORE_CTX *ctx) | |||
| 299 | /* We may as well copy down any DSA parameters that are required */ | 294 | /* We may as well copy down any DSA parameters that are required */ |
| 300 | X509_get_pubkey_parameters(NULL,ctx->chain); | 295 | X509_get_pubkey_parameters(NULL,ctx->chain); |
| 301 | 296 | ||
| 297 | /* Check revocation status: we do this after copying parameters | ||
| 298 | * because they may be needed for CRL signature verification. | ||
| 299 | */ | ||
| 300 | |||
| 301 | ok = ctx->check_revocation(ctx); | ||
| 302 | if(!ok) goto end; | ||
| 303 | |||
| 302 | /* At this point, we have a chain and just need to verify it */ | 304 | /* At this point, we have a chain and just need to verify it */ |
| 303 | if (ctx->verify != NULL) | 305 | if (ctx->verify != NULL) |
| 304 | ok=ctx->verify(ctx); | 306 | ok=ctx->verify(ctx); |
| @@ -346,8 +348,7 @@ static int check_issued(X509_STORE_CTX *ctx, X509 *x, X509 *issuer) | |||
| 346 | ctx->error = ret; | 348 | ctx->error = ret; |
| 347 | ctx->current_cert = x; | 349 | ctx->current_cert = x; |
| 348 | ctx->current_issuer = issuer; | 350 | ctx->current_issuer = issuer; |
| 349 | if (ctx->verify_cb) | 351 | return ctx->verify_cb(0, ctx); |
| 350 | return ctx->verify_cb(0, ctx); | ||
| 351 | return 0; | 352 | return 0; |
| 352 | } | 353 | } |
| 353 | 354 | ||
| @@ -372,18 +373,26 @@ static int get_issuer_sk(X509 **issuer, X509_STORE_CTX *ctx, X509 *x) | |||
| 372 | 373 | ||
| 373 | static int check_chain_purpose(X509_STORE_CTX *ctx) | 374 | static int check_chain_purpose(X509_STORE_CTX *ctx) |
| 374 | { | 375 | { |
| 375 | #ifdef NO_CHAIN_VERIFY | 376 | #ifdef OPENSSL_NO_CHAIN_VERIFY |
| 376 | return 1; | 377 | return 1; |
| 377 | #else | 378 | #else |
| 378 | int i, ok=0; | 379 | int i, ok=0; |
| 379 | X509 *x; | 380 | X509 *x; |
| 380 | int (*cb)(); | 381 | int (*cb)(); |
| 381 | cb=ctx->verify_cb; | 382 | cb=ctx->verify_cb; |
| 382 | if (cb == NULL) cb=null_callback; | ||
| 383 | /* Check all untrusted certificates */ | 383 | /* Check all untrusted certificates */ |
| 384 | for (i = 0; i < ctx->last_untrusted; i++) | 384 | for (i = 0; i < ctx->last_untrusted; i++) |
| 385 | { | 385 | { |
| 386 | x = sk_X509_value(ctx->chain, i); | 386 | x = sk_X509_value(ctx->chain, i); |
| 387 | if (!(ctx->flags & X509_V_FLAG_IGNORE_CRITICAL) | ||
| 388 | && (x->ex_flags & EXFLAG_CRITICAL)) | ||
| 389 | { | ||
| 390 | ctx->error = X509_V_ERR_UNHANDLED_CRITICAL_EXTENSION; | ||
| 391 | ctx->error_depth = i; | ||
| 392 | ctx->current_cert = x; | ||
| 393 | ok=cb(0,ctx); | ||
| 394 | if (!ok) goto end; | ||
| 395 | } | ||
| 387 | if (!X509_check_purpose(x, ctx->purpose, i)) | 396 | if (!X509_check_purpose(x, ctx->purpose, i)) |
| 388 | { | 397 | { |
| 389 | if (i) | 398 | if (i) |
| @@ -414,21 +423,20 @@ static int check_chain_purpose(X509_STORE_CTX *ctx) | |||
| 414 | 423 | ||
| 415 | static int check_trust(X509_STORE_CTX *ctx) | 424 | static int check_trust(X509_STORE_CTX *ctx) |
| 416 | { | 425 | { |
| 417 | #ifdef NO_CHAIN_VERIFY | 426 | #ifdef OPENSSL_NO_CHAIN_VERIFY |
| 418 | return 1; | 427 | return 1; |
| 419 | #else | 428 | #else |
| 420 | int i, ok; | 429 | int i, ok; |
| 421 | X509 *x; | 430 | X509 *x; |
| 422 | int (*cb)(); | 431 | int (*cb)(); |
| 423 | cb=ctx->verify_cb; | 432 | cb=ctx->verify_cb; |
| 424 | if (cb == NULL) cb=null_callback; | ||
| 425 | /* For now just check the last certificate in the chain */ | 433 | /* For now just check the last certificate in the chain */ |
| 426 | i = sk_X509_num(ctx->chain) - 1; | 434 | i = sk_X509_num(ctx->chain) - 1; |
| 427 | x = sk_X509_value(ctx->chain, i); | 435 | x = sk_X509_value(ctx->chain, i); |
| 428 | ok = X509_check_trust(x, ctx->trust, 0); | 436 | ok = X509_check_trust(x, ctx->trust, 0); |
| 429 | if (ok == X509_TRUST_TRUSTED) | 437 | if (ok == X509_TRUST_TRUSTED) |
| 430 | return 1; | 438 | return 1; |
| 431 | ctx->error_depth = sk_X509_num(ctx->chain) - 1; | 439 | ctx->error_depth = i; |
| 432 | ctx->current_cert = x; | 440 | ctx->current_cert = x; |
| 433 | if (ok == X509_TRUST_REJECTED) | 441 | if (ok == X509_TRUST_REJECTED) |
| 434 | ctx->error = X509_V_ERR_CERT_REJECTED; | 442 | ctx->error = X509_V_ERR_CERT_REJECTED; |
| @@ -439,6 +447,183 @@ static int check_trust(X509_STORE_CTX *ctx) | |||
| 439 | #endif | 447 | #endif |
| 440 | } | 448 | } |
| 441 | 449 | ||
| 450 | static int check_revocation(X509_STORE_CTX *ctx) | ||
| 451 | { | ||
| 452 | int i, last, ok; | ||
| 453 | if (!(ctx->flags & X509_V_FLAG_CRL_CHECK)) | ||
| 454 | return 1; | ||
| 455 | if (ctx->flags & X509_V_FLAG_CRL_CHECK_ALL) | ||
| 456 | last = 0; | ||
| 457 | else | ||
| 458 | last = sk_X509_num(ctx->chain) - 1; | ||
| 459 | for(i = 0; i <= last; i++) | ||
| 460 | { | ||
| 461 | ctx->error_depth = i; | ||
| 462 | ok = check_cert(ctx); | ||
| 463 | if (!ok) return ok; | ||
| 464 | } | ||
| 465 | return 1; | ||
| 466 | } | ||
| 467 | |||
| 468 | static int check_cert(X509_STORE_CTX *ctx) | ||
| 469 | { | ||
| 470 | X509_CRL *crl = NULL; | ||
| 471 | X509 *x; | ||
| 472 | int ok, cnum; | ||
| 473 | cnum = ctx->error_depth; | ||
| 474 | x = sk_X509_value(ctx->chain, cnum); | ||
| 475 | ctx->current_cert = x; | ||
| 476 | /* Try to retrieve relevant CRL */ | ||
| 477 | ok = ctx->get_crl(ctx, &crl, x); | ||
| 478 | /* If error looking up CRL, nothing we can do except | ||
| 479 | * notify callback | ||
| 480 | */ | ||
| 481 | if(!ok) | ||
| 482 | { | ||
| 483 | ctx->error = X509_V_ERR_UNABLE_TO_GET_CRL; | ||
| 484 | ok = ctx->verify_cb(0, ctx); | ||
| 485 | goto err; | ||
| 486 | } | ||
| 487 | ctx->current_crl = crl; | ||
| 488 | ok = ctx->check_crl(ctx, crl); | ||
| 489 | if (!ok) goto err; | ||
| 490 | ok = ctx->cert_crl(ctx, crl, x); | ||
| 491 | err: | ||
| 492 | ctx->current_crl = NULL; | ||
| 493 | X509_CRL_free(crl); | ||
| 494 | return ok; | ||
| 495 | |||
| 496 | } | ||
| 497 | |||
| 498 | /* Retrieve CRL corresponding to certificate: currently just a | ||
| 499 | * subject lookup: maybe use AKID later... | ||
| 500 | * Also might look up any included CRLs too (e.g PKCS#7 signedData). | ||
| 501 | */ | ||
| 502 | static int get_crl(X509_STORE_CTX *ctx, X509_CRL **crl, X509 *x) | ||
| 503 | { | ||
| 504 | int ok; | ||
| 505 | X509_OBJECT xobj; | ||
| 506 | ok = X509_STORE_get_by_subject(ctx, X509_LU_CRL, X509_get_issuer_name(x), &xobj); | ||
| 507 | if (!ok) return 0; | ||
| 508 | *crl = xobj.data.crl; | ||
| 509 | return 1; | ||
| 510 | } | ||
| 511 | |||
| 512 | /* Check CRL validity */ | ||
| 513 | static int check_crl(X509_STORE_CTX *ctx, X509_CRL *crl) | ||
| 514 | { | ||
| 515 | X509 *issuer = NULL; | ||
| 516 | EVP_PKEY *ikey = NULL; | ||
| 517 | int ok = 0, chnum, cnum, i; | ||
| 518 | time_t *ptime; | ||
| 519 | cnum = ctx->error_depth; | ||
| 520 | chnum = sk_X509_num(ctx->chain) - 1; | ||
| 521 | /* Find CRL issuer: if not last certificate then issuer | ||
| 522 | * is next certificate in chain. | ||
| 523 | */ | ||
| 524 | if(cnum < chnum) | ||
| 525 | issuer = sk_X509_value(ctx->chain, cnum + 1); | ||
| 526 | else | ||
| 527 | { | ||
| 528 | issuer = sk_X509_value(ctx->chain, chnum); | ||
| 529 | /* If not self signed, can't check signature */ | ||
| 530 | if(!ctx->check_issued(ctx, issuer, issuer)) | ||
| 531 | { | ||
| 532 | ctx->error = X509_V_ERR_UNABLE_TO_GET_CRL_ISSUER; | ||
| 533 | ok = ctx->verify_cb(0, ctx); | ||
| 534 | if(!ok) goto err; | ||
| 535 | } | ||
| 536 | } | ||
| 537 | |||
| 538 | if(issuer) | ||
| 539 | { | ||
| 540 | |||
| 541 | /* Attempt to get issuer certificate public key */ | ||
| 542 | ikey = X509_get_pubkey(issuer); | ||
| 543 | |||
| 544 | if(!ikey) | ||
| 545 | { | ||
| 546 | ctx->error=X509_V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY; | ||
| 547 | ok = ctx->verify_cb(0, ctx); | ||
| 548 | if (!ok) goto err; | ||
| 549 | } | ||
| 550 | else | ||
| 551 | { | ||
| 552 | /* Verify CRL signature */ | ||
| 553 | if(X509_CRL_verify(crl, ikey) <= 0) | ||
| 554 | { | ||
| 555 | ctx->error=X509_V_ERR_CRL_SIGNATURE_FAILURE; | ||
| 556 | ok = ctx->verify_cb(0, ctx); | ||
| 557 | if (!ok) goto err; | ||
| 558 | } | ||
| 559 | } | ||
| 560 | } | ||
| 561 | |||
| 562 | /* OK, CRL signature valid check times */ | ||
| 563 | if (ctx->flags & X509_V_FLAG_USE_CHECK_TIME) | ||
| 564 | ptime = &ctx->check_time; | ||
| 565 | else | ||
| 566 | ptime = NULL; | ||
| 567 | |||
| 568 | i=X509_cmp_time(X509_CRL_get_lastUpdate(crl), ptime); | ||
| 569 | if (i == 0) | ||
| 570 | { | ||
| 571 | ctx->error=X509_V_ERR_ERROR_IN_CRL_LAST_UPDATE_FIELD; | ||
| 572 | ok = ctx->verify_cb(0, ctx); | ||
| 573 | if (!ok) goto err; | ||
| 574 | } | ||
| 575 | |||
| 576 | if (i > 0) | ||
| 577 | { | ||
| 578 | ctx->error=X509_V_ERR_CRL_NOT_YET_VALID; | ||
| 579 | ok = ctx->verify_cb(0, ctx); | ||
| 580 | if (!ok) goto err; | ||
| 581 | } | ||
| 582 | |||
| 583 | if(X509_CRL_get_nextUpdate(crl)) | ||
| 584 | { | ||
| 585 | i=X509_cmp_time(X509_CRL_get_nextUpdate(crl), ptime); | ||
| 586 | |||
| 587 | if (i == 0) | ||
| 588 | { | ||
| 589 | ctx->error=X509_V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD; | ||
| 590 | ok = ctx->verify_cb(0, ctx); | ||
| 591 | if (!ok) goto err; | ||
| 592 | } | ||
| 593 | |||
| 594 | if (i < 0) | ||
| 595 | { | ||
| 596 | ctx->error=X509_V_ERR_CRL_HAS_EXPIRED; | ||
| 597 | ok = ctx->verify_cb(0, ctx); | ||
| 598 | if (!ok) goto err; | ||
| 599 | } | ||
| 600 | } | ||
| 601 | |||
| 602 | ok = 1; | ||
| 603 | |||
| 604 | err: | ||
| 605 | EVP_PKEY_free(ikey); | ||
| 606 | return ok; | ||
| 607 | } | ||
| 608 | |||
| 609 | /* Check certificate against CRL */ | ||
| 610 | static int cert_crl(X509_STORE_CTX *ctx, X509_CRL *crl, X509 *x) | ||
| 611 | { | ||
| 612 | int idx, ok; | ||
| 613 | X509_REVOKED rtmp; | ||
| 614 | /* Look for serial number of certificate in CRL */ | ||
| 615 | rtmp.serialNumber = X509_get_serialNumber(x); | ||
| 616 | idx = sk_X509_REVOKED_find(crl->crl->revoked, &rtmp); | ||
| 617 | /* Not found: OK */ | ||
| 618 | if(idx == -1) return 1; | ||
| 619 | /* Otherwise revoked: want something cleverer than | ||
| 620 | * this to handle entry extensions in V2 CRLs. | ||
| 621 | */ | ||
| 622 | ctx->error = X509_V_ERR_CERT_REVOKED; | ||
| 623 | ok = ctx->verify_cb(0, ctx); | ||
| 624 | return ok; | ||
| 625 | } | ||
| 626 | |||
| 442 | static int internal_verify(X509_STORE_CTX *ctx) | 627 | static int internal_verify(X509_STORE_CTX *ctx) |
| 443 | { | 628 | { |
| 444 | int i,ok=0,n; | 629 | int i,ok=0,n; |
| @@ -448,7 +633,6 @@ static int internal_verify(X509_STORE_CTX *ctx) | |||
| 448 | int (*cb)(); | 633 | int (*cb)(); |
| 449 | 634 | ||
| 450 | cb=ctx->verify_cb; | 635 | cb=ctx->verify_cb; |
| 451 | if (cb == NULL) cb=null_callback; | ||
| 452 | 636 | ||
| 453 | n=sk_X509_num(ctx->chain); | 637 | n=sk_X509_num(ctx->chain); |
| 454 | ctx->error_depth=n-1; | 638 | ctx->error_depth=n-1; |
| @@ -491,6 +675,13 @@ static int internal_verify(X509_STORE_CTX *ctx) | |||
| 491 | if (!ok) goto end; | 675 | if (!ok) goto end; |
| 492 | } | 676 | } |
| 493 | if (X509_verify(xs,pkey) <= 0) | 677 | if (X509_verify(xs,pkey) <= 0) |
| 678 | /* XXX For the final trusted self-signed cert, | ||
| 679 | * this is a waste of time. That check should | ||
| 680 | * optional so that e.g. 'openssl x509' can be | ||
| 681 | * used to detect invalid self-signatures, but | ||
| 682 | * we don't verify again and again in SSL | ||
| 683 | * handshakes and the like once the cert has | ||
| 684 | * been declared trusted. */ | ||
| 494 | { | 685 | { |
| 495 | ctx->error=X509_V_ERR_CERT_SIGNATURE_FAILURE; | 686 | ctx->error=X509_V_ERR_CERT_SIGNATURE_FAILURE; |
| 496 | ctx->current_cert=xs; | 687 | ctx->current_cert=xs; |
| @@ -539,8 +730,6 @@ static int internal_verify(X509_STORE_CTX *ctx) | |||
| 539 | if (!ok) goto end; | 730 | if (!ok) goto end; |
| 540 | } | 731 | } |
| 541 | 732 | ||
| 542 | /* CRL CHECK */ | ||
| 543 | |||
| 544 | /* The last error (if any) is still in the error value */ | 733 | /* The last error (if any) is still in the error value */ |
| 545 | ctx->current_cert=xs; | 734 | ctx->current_cert=xs; |
| 546 | ok=(*cb)(1,ctx); | 735 | ok=(*cb)(1,ctx); |
| @@ -648,14 +837,16 @@ ASN1_TIME *X509_gmtime_adj(ASN1_TIME *s, long adj) | |||
| 648 | ASN1_TIME *X509_time_adj(ASN1_TIME *s, long adj, time_t *in_tm) | 837 | ASN1_TIME *X509_time_adj(ASN1_TIME *s, long adj, time_t *in_tm) |
| 649 | { | 838 | { |
| 650 | time_t t; | 839 | time_t t; |
| 840 | int type = -1; | ||
| 651 | 841 | ||
| 652 | if (in_tm) t = *in_tm; | 842 | if (in_tm) t = *in_tm; |
| 653 | else time(&t); | 843 | else time(&t); |
| 654 | 844 | ||
| 655 | t+=adj; | 845 | t+=adj; |
| 656 | if (!s) return ASN1_TIME_set(s, t); | 846 | if (s) type = s->type; |
| 657 | if (s->type == V_ASN1_UTCTIME) return ASN1_UTCTIME_set(s,t); | 847 | if (type == V_ASN1_UTCTIME) return ASN1_UTCTIME_set(s,t); |
| 658 | return ASN1_GENERALIZEDTIME_set(s, t); | 848 | if (type == V_ASN1_GENERALIZEDTIME) return ASN1_GENERALIZEDTIME_set(s, t); |
| 849 | return ASN1_TIME_set(s, t); | ||
| 659 | } | 850 | } |
| 660 | 851 | ||
| 661 | int X509_get_pubkey_parameters(EVP_PKEY *pkey, STACK_OF(X509) *chain) | 852 | int X509_get_pubkey_parameters(EVP_PKEY *pkey, STACK_OF(X509) *chain) |
| @@ -702,12 +893,12 @@ int X509_get_pubkey_parameters(EVP_PKEY *pkey, STACK_OF(X509) *chain) | |||
| 702 | 893 | ||
| 703 | int X509_STORE_CTX_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func, | 894 | int X509_STORE_CTX_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func, |
| 704 | CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func) | 895 | CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func) |
| 705 | { | 896 | { |
| 706 | x509_store_ctx_num++; | 897 | /* This function is (usually) called only once, by |
| 707 | return CRYPTO_get_ex_new_index(x509_store_ctx_num-1, | 898 | * SSL_get_ex_data_X509_STORE_CTX_idx (ssl/ssl_cert.c). */ |
| 708 | &x509_store_ctx_method, | 899 | return CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_X509_STORE_CTX, argl, argp, |
| 709 | argl,argp,new_func,dup_func,free_func); | 900 | new_func, dup_func, free_func); |
| 710 | } | 901 | } |
| 711 | 902 | ||
| 712 | int X509_STORE_CTX_set_ex_data(X509_STORE_CTX *ctx, int idx, void *data) | 903 | int X509_STORE_CTX_set_ex_data(X509_STORE_CTX *ctx, int idx, void *data) |
| 713 | { | 904 | { |
| @@ -831,8 +1022,8 @@ int X509_STORE_CTX_purpose_inherit(X509_STORE_CTX *ctx, int def_purpose, | |||
| 831 | } | 1022 | } |
| 832 | } | 1023 | } |
| 833 | 1024 | ||
| 834 | if (purpose) ctx->purpose = purpose; | 1025 | if (purpose && !ctx->purpose) ctx->purpose = purpose; |
| 835 | if (trust) ctx->trust = trust; | 1026 | if (trust && !ctx->trust) ctx->trust = trust; |
| 836 | return 1; | 1027 | return 1; |
| 837 | } | 1028 | } |
| 838 | 1029 | ||
| @@ -840,7 +1031,12 @@ X509_STORE_CTX *X509_STORE_CTX_new(void) | |||
| 840 | { | 1031 | { |
| 841 | X509_STORE_CTX *ctx; | 1032 | X509_STORE_CTX *ctx; |
| 842 | ctx = (X509_STORE_CTX *)OPENSSL_malloc(sizeof(X509_STORE_CTX)); | 1033 | ctx = (X509_STORE_CTX *)OPENSSL_malloc(sizeof(X509_STORE_CTX)); |
| 843 | if (ctx) memset(ctx, 0, sizeof(X509_STORE_CTX)); | 1034 | if (!ctx) |
| 1035 | { | ||
| 1036 | X509err(X509_F_X509_STORE_CTX_NEW,ERR_R_MALLOC_FAILURE); | ||
| 1037 | return NULL; | ||
| 1038 | } | ||
| 1039 | memset(ctx, 0, sizeof(X509_STORE_CTX)); | ||
| 844 | return ctx; | 1040 | return ctx; |
| 845 | } | 1041 | } |
| 846 | 1042 | ||
| @@ -850,7 +1046,7 @@ void X509_STORE_CTX_free(X509_STORE_CTX *ctx) | |||
| 850 | OPENSSL_free(ctx); | 1046 | OPENSSL_free(ctx); |
| 851 | } | 1047 | } |
| 852 | 1048 | ||
| 853 | void X509_STORE_CTX_init(X509_STORE_CTX *ctx, X509_STORE *store, X509 *x509, | 1049 | int X509_STORE_CTX_init(X509_STORE_CTX *ctx, X509_STORE *store, X509 *x509, |
| 854 | STACK_OF(X509) *chain) | 1050 | STACK_OF(X509) *chain) |
| 855 | { | 1051 | { |
| 856 | ctx->ctx=store; | 1052 | ctx->ctx=store; |
| @@ -858,10 +1054,7 @@ void X509_STORE_CTX_init(X509_STORE_CTX *ctx, X509_STORE *store, X509 *x509, | |||
| 858 | ctx->cert=x509; | 1054 | ctx->cert=x509; |
| 859 | ctx->untrusted=chain; | 1055 | ctx->untrusted=chain; |
| 860 | ctx->last_untrusted=0; | 1056 | ctx->last_untrusted=0; |
| 861 | ctx->purpose=0; | ||
| 862 | ctx->trust=0; | ||
| 863 | ctx->check_time=0; | 1057 | ctx->check_time=0; |
| 864 | ctx->flags=0; | ||
| 865 | ctx->other_ctx=NULL; | 1058 | ctx->other_ctx=NULL; |
| 866 | ctx->valid=0; | 1059 | ctx->valid=0; |
| 867 | ctx->chain=NULL; | 1060 | ctx->chain=NULL; |
| @@ -870,12 +1063,80 @@ void X509_STORE_CTX_init(X509_STORE_CTX *ctx, X509_STORE *store, X509 *x509, | |||
| 870 | ctx->error_depth=0; | 1063 | ctx->error_depth=0; |
| 871 | ctx->current_cert=NULL; | 1064 | ctx->current_cert=NULL; |
| 872 | ctx->current_issuer=NULL; | 1065 | ctx->current_issuer=NULL; |
| 873 | ctx->check_issued = check_issued; | 1066 | |
| 874 | ctx->get_issuer = X509_STORE_CTX_get1_issuer; | 1067 | /* Inherit callbacks and flags from X509_STORE if not set |
| 875 | ctx->verify_cb = store->verify_cb; | 1068 | * use defaults. |
| 876 | ctx->verify = store->verify; | 1069 | */ |
| 877 | ctx->cleanup = 0; | 1070 | |
| 878 | memset(&(ctx->ex_data),0,sizeof(CRYPTO_EX_DATA)); | 1071 | |
| 1072 | if (store) | ||
| 1073 | { | ||
| 1074 | ctx->purpose=store->purpose; | ||
| 1075 | ctx->trust=store->trust; | ||
| 1076 | ctx->flags = store->flags; | ||
| 1077 | ctx->cleanup = store->cleanup; | ||
| 1078 | } | ||
| 1079 | else | ||
| 1080 | { | ||
| 1081 | ctx->purpose = 0; | ||
| 1082 | ctx->trust = 0; | ||
| 1083 | ctx->flags = 0; | ||
| 1084 | ctx->cleanup = 0; | ||
| 1085 | } | ||
| 1086 | |||
| 1087 | if (store && store->check_issued) | ||
| 1088 | ctx->check_issued = store->check_issued; | ||
| 1089 | else | ||
| 1090 | ctx->check_issued = check_issued; | ||
| 1091 | |||
| 1092 | if (store && store->get_issuer) | ||
| 1093 | ctx->get_issuer = store->get_issuer; | ||
| 1094 | else | ||
| 1095 | ctx->get_issuer = X509_STORE_CTX_get1_issuer; | ||
| 1096 | |||
| 1097 | if (store && store->verify_cb) | ||
| 1098 | ctx->verify_cb = store->verify_cb; | ||
| 1099 | else | ||
| 1100 | ctx->verify_cb = null_callback; | ||
| 1101 | |||
| 1102 | if (store && store->verify) | ||
| 1103 | ctx->verify = store->verify; | ||
| 1104 | else | ||
| 1105 | ctx->verify = internal_verify; | ||
| 1106 | |||
| 1107 | if (store && store->check_revocation) | ||
| 1108 | ctx->check_revocation = store->check_revocation; | ||
| 1109 | else | ||
| 1110 | ctx->check_revocation = check_revocation; | ||
| 1111 | |||
| 1112 | if (store && store->get_crl) | ||
| 1113 | ctx->get_crl = store->get_crl; | ||
| 1114 | else | ||
| 1115 | ctx->get_crl = get_crl; | ||
| 1116 | |||
| 1117 | if (store && store->check_crl) | ||
| 1118 | ctx->check_crl = store->check_crl; | ||
| 1119 | else | ||
| 1120 | ctx->check_crl = check_crl; | ||
| 1121 | |||
| 1122 | if (store && store->cert_crl) | ||
| 1123 | ctx->cert_crl = store->cert_crl; | ||
| 1124 | else | ||
| 1125 | ctx->cert_crl = cert_crl; | ||
| 1126 | |||
| 1127 | |||
| 1128 | /* This memset() can't make any sense anyway, so it's removed. As | ||
| 1129 | * X509_STORE_CTX_cleanup does a proper "free" on the ex_data, we put a | ||
| 1130 | * corresponding "new" here and remove this bogus initialisation. */ | ||
| 1131 | /* memset(&(ctx->ex_data),0,sizeof(CRYPTO_EX_DATA)); */ | ||
| 1132 | if(!CRYPTO_new_ex_data(CRYPTO_EX_INDEX_X509_STORE_CTX, ctx, | ||
| 1133 | &(ctx->ex_data))) | ||
| 1134 | { | ||
| 1135 | OPENSSL_free(ctx); | ||
| 1136 | X509err(X509_F_X509_STORE_CTX_INIT,ERR_R_MALLOC_FAILURE); | ||
| 1137 | return 0; | ||
| 1138 | } | ||
| 1139 | return 1; | ||
| 879 | } | 1140 | } |
| 880 | 1141 | ||
| 881 | /* Set alternative lookup method: just a STACK of trusted certificates. | 1142 | /* Set alternative lookup method: just a STACK of trusted certificates. |
| @@ -896,7 +1157,7 @@ void X509_STORE_CTX_cleanup(X509_STORE_CTX *ctx) | |||
| 896 | sk_X509_pop_free(ctx->chain,X509_free); | 1157 | sk_X509_pop_free(ctx->chain,X509_free); |
| 897 | ctx->chain=NULL; | 1158 | ctx->chain=NULL; |
| 898 | } | 1159 | } |
| 899 | CRYPTO_free_ex_data(x509_store_ctx_method,ctx,&(ctx->ex_data)); | 1160 | CRYPTO_free_ex_data(CRYPTO_EX_INDEX_X509_STORE_CTX, ctx, &(ctx->ex_data)); |
| 900 | memset(&ctx->ex_data,0,sizeof(CRYPTO_EX_DATA)); | 1161 | memset(&ctx->ex_data,0,sizeof(CRYPTO_EX_DATA)); |
| 901 | } | 1162 | } |
| 902 | 1163 | ||
| @@ -911,6 +1172,12 @@ void X509_STORE_CTX_set_time(X509_STORE_CTX *ctx, long flags, time_t t) | |||
| 911 | ctx->flags |= X509_V_FLAG_USE_CHECK_TIME; | 1172 | ctx->flags |= X509_V_FLAG_USE_CHECK_TIME; |
| 912 | } | 1173 | } |
| 913 | 1174 | ||
| 1175 | void X509_STORE_CTX_set_verify_cb(X509_STORE_CTX *ctx, | ||
| 1176 | int (*verify_cb)(int, X509_STORE_CTX *)) | ||
| 1177 | { | ||
| 1178 | ctx->verify_cb=verify_cb; | ||
| 1179 | } | ||
| 1180 | |||
| 914 | IMPLEMENT_STACK_OF(X509) | 1181 | IMPLEMENT_STACK_OF(X509) |
| 915 | IMPLEMENT_ASN1_SET_OF(X509) | 1182 | IMPLEMENT_ASN1_SET_OF(X509) |
| 916 | 1183 | ||
diff --git a/src/lib/libcrypto/x509/x509_vfy.h b/src/lib/libcrypto/x509/x509_vfy.h index e289d5309a..f0be21f452 100644 --- a/src/lib/libcrypto/x509/x509_vfy.h +++ b/src/lib/libcrypto/x509/x509_vfy.h | |||
| @@ -65,11 +65,12 @@ | |||
| 65 | #ifndef HEADER_X509_VFY_H | 65 | #ifndef HEADER_X509_VFY_H |
| 66 | #define HEADER_X509_VFY_H | 66 | #define HEADER_X509_VFY_H |
| 67 | 67 | ||
| 68 | #ifndef NO_LHASH | 68 | #ifndef OPENSSL_NO_LHASH |
| 69 | #include <openssl/lhash.h> | 69 | #include <openssl/lhash.h> |
| 70 | #endif | 70 | #endif |
| 71 | #include <openssl/bio.h> | 71 | #include <openssl/bio.h> |
| 72 | #include <openssl/crypto.h> | 72 | #include <openssl/crypto.h> |
| 73 | #include <openssl/symhacks.h> | ||
| 73 | 74 | ||
| 74 | #ifdef __cplusplus | 75 | #ifdef __cplusplus |
| 75 | extern "C" { | 76 | extern "C" { |
| @@ -154,12 +155,10 @@ typedef struct x509_lookup_method_st | |||
| 154 | X509_OBJECT *ret); | 155 | X509_OBJECT *ret); |
| 155 | } X509_LOOKUP_METHOD; | 156 | } X509_LOOKUP_METHOD; |
| 156 | 157 | ||
| 157 | typedef struct x509_store_ctx_st X509_STORE_CTX; | ||
| 158 | |||
| 159 | /* This is used to hold everything. It is used for all certificate | 158 | /* This is used to hold everything. It is used for all certificate |
| 160 | * validation. Once we have a certificate chain, the 'verify' | 159 | * validation. Once we have a certificate chain, the 'verify' |
| 161 | * function is then called to actually check the cert chain. */ | 160 | * function is then called to actually check the cert chain. */ |
| 162 | typedef struct x509_store_st | 161 | struct x509_store_st |
| 163 | { | 162 | { |
| 164 | /* The following is a cache of trusted certs */ | 163 | /* The following is a cache of trusted certs */ |
| 165 | int cache; /* if true, stash any hits */ | 164 | int cache; /* if true, stash any hits */ |
| @@ -167,13 +166,29 @@ typedef struct x509_store_st | |||
| 167 | 166 | ||
| 168 | /* These are external lookup methods */ | 167 | /* These are external lookup methods */ |
| 169 | STACK_OF(X509_LOOKUP) *get_cert_methods; | 168 | STACK_OF(X509_LOOKUP) *get_cert_methods; |
| 169 | |||
| 170 | /* The following fields are not used by X509_STORE but are | ||
| 171 | * inherited by X509_STORE_CTX when it is initialised. | ||
| 172 | */ | ||
| 173 | |||
| 174 | unsigned long flags; /* Various verify flags */ | ||
| 175 | int purpose; | ||
| 176 | int trust; | ||
| 177 | /* Callbacks for various operations */ | ||
| 170 | int (*verify)(X509_STORE_CTX *ctx); /* called to verify a certificate */ | 178 | int (*verify)(X509_STORE_CTX *ctx); /* called to verify a certificate */ |
| 171 | int (*verify_cb)(int ok,X509_STORE_CTX *ctx); /* error callback */ | 179 | int (*verify_cb)(int ok,X509_STORE_CTX *ctx); /* error callback */ |
| 180 | int (*get_issuer)(X509 **issuer, X509_STORE_CTX *ctx, X509 *x); /* get issuers cert from ctx */ | ||
| 181 | int (*check_issued)(X509_STORE_CTX *ctx, X509 *x, X509 *issuer); /* check issued */ | ||
| 182 | int (*check_revocation)(X509_STORE_CTX *ctx); /* Check revocation status of chain */ | ||
| 183 | int (*get_crl)(X509_STORE_CTX *ctx, X509_CRL **crl, X509 *x); /* retrieve CRL */ | ||
| 184 | int (*check_crl)(X509_STORE_CTX *ctx, X509_CRL *crl); /* Check CRL validity */ | ||
| 185 | int (*cert_crl)(X509_STORE_CTX *ctx, X509_CRL *crl, X509 *x); /* Check certificate against CRL */ | ||
| 186 | int (*cleanup)(X509_STORE_CTX *ctx); | ||
| 172 | 187 | ||
| 173 | CRYPTO_EX_DATA ex_data; | 188 | CRYPTO_EX_DATA ex_data; |
| 174 | int references; | 189 | int references; |
| 175 | int depth; /* how deep to look (still unused -- X509_STORE_CTX's depth is used) */ | 190 | int depth; /* how deep to look (still unused -- X509_STORE_CTX's depth is used) */ |
| 176 | } X509_STORE; | 191 | } /* X509_STORE */; |
| 177 | 192 | ||
| 178 | #define X509_STORE_set_depth(ctx,d) ((ctx)->depth=(d)) | 193 | #define X509_STORE_set_depth(ctx,d) ((ctx)->depth=(d)) |
| 179 | 194 | ||
| @@ -189,7 +204,7 @@ struct x509_lookup_st | |||
| 189 | char *method_data; /* method data */ | 204 | char *method_data; /* method data */ |
| 190 | 205 | ||
| 191 | X509_STORE *store_ctx; /* who owns us */ | 206 | X509_STORE *store_ctx; /* who owns us */ |
| 192 | }; | 207 | } /* X509_LOOKUP */; |
| 193 | 208 | ||
| 194 | /* This is a used when verifying cert chains. Since the | 209 | /* This is a used when verifying cert chains. Since the |
| 195 | * gathering of the cert chain can take some time (and have to be | 210 | * gathering of the cert chain can take some time (and have to be |
| @@ -213,6 +228,10 @@ struct x509_store_ctx_st /* X509_STORE_CTX */ | |||
| 213 | int (*verify_cb)(int ok,X509_STORE_CTX *ctx); /* error callback */ | 228 | int (*verify_cb)(int ok,X509_STORE_CTX *ctx); /* error callback */ |
| 214 | int (*get_issuer)(X509 **issuer, X509_STORE_CTX *ctx, X509 *x); /* get issuers cert from ctx */ | 229 | int (*get_issuer)(X509 **issuer, X509_STORE_CTX *ctx, X509 *x); /* get issuers cert from ctx */ |
| 215 | int (*check_issued)(X509_STORE_CTX *ctx, X509 *x, X509 *issuer); /* check issued */ | 230 | int (*check_issued)(X509_STORE_CTX *ctx, X509 *x, X509 *issuer); /* check issued */ |
| 231 | int (*check_revocation)(X509_STORE_CTX *ctx); /* Check revocation status of chain */ | ||
| 232 | int (*get_crl)(X509_STORE_CTX *ctx, X509_CRL **crl, X509 *x); /* retrieve CRL */ | ||
| 233 | int (*check_crl)(X509_STORE_CTX *ctx, X509_CRL *crl); /* Check CRL validity */ | ||
| 234 | int (*cert_crl)(X509_STORE_CTX *ctx, X509_CRL *crl, X509 *x); /* Check certificate against CRL */ | ||
| 216 | int (*cleanup)(X509_STORE_CTX *ctx); | 235 | int (*cleanup)(X509_STORE_CTX *ctx); |
| 217 | 236 | ||
| 218 | /* The following is built up */ | 237 | /* The following is built up */ |
| @@ -226,9 +245,10 @@ struct x509_store_ctx_st /* X509_STORE_CTX */ | |||
| 226 | int error; | 245 | int error; |
| 227 | X509 *current_cert; | 246 | X509 *current_cert; |
| 228 | X509 *current_issuer; /* cert currently being tested as valid issuer */ | 247 | X509 *current_issuer; /* cert currently being tested as valid issuer */ |
| 248 | X509_CRL *current_crl; /* current CRL */ | ||
| 229 | 249 | ||
| 230 | CRYPTO_EX_DATA ex_data; | 250 | CRYPTO_EX_DATA ex_data; |
| 231 | }; | 251 | } /* X509_STORE_CTX */; |
| 232 | 252 | ||
| 233 | #define X509_STORE_CTX_set_depth(ctx,d) ((ctx)->depth=(d)) | 253 | #define X509_STORE_CTX_set_depth(ctx,d) ((ctx)->depth=(d)) |
| 234 | 254 | ||
| @@ -282,6 +302,9 @@ struct x509_store_ctx_st /* X509_STORE_CTX */ | |||
| 282 | #define X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH 31 | 302 | #define X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH 31 |
| 283 | #define X509_V_ERR_KEYUSAGE_NO_CERTSIGN 32 | 303 | #define X509_V_ERR_KEYUSAGE_NO_CERTSIGN 32 |
| 284 | 304 | ||
| 305 | #define X509_V_ERR_UNABLE_TO_GET_CRL_ISSUER 33 | ||
| 306 | #define X509_V_ERR_UNHANDLED_CRITICAL_EXTENSION 34 | ||
| 307 | |||
| 285 | /* The application is not happy */ | 308 | /* The application is not happy */ |
| 286 | #define X509_V_ERR_APPLICATION_VERIFICATION 50 | 309 | #define X509_V_ERR_APPLICATION_VERIFICATION 50 |
| 287 | 310 | ||
| @@ -289,21 +312,9 @@ struct x509_store_ctx_st /* X509_STORE_CTX */ | |||
| 289 | 312 | ||
| 290 | #define X509_V_FLAG_CB_ISSUER_CHECK 0x1 /* Send issuer+subject checks to verify_cb */ | 313 | #define X509_V_FLAG_CB_ISSUER_CHECK 0x1 /* Send issuer+subject checks to verify_cb */ |
| 291 | #define X509_V_FLAG_USE_CHECK_TIME 0x2 /* Use check time instead of current time */ | 314 | #define X509_V_FLAG_USE_CHECK_TIME 0x2 /* Use check time instead of current time */ |
| 292 | 315 | #define X509_V_FLAG_CRL_CHECK 0x4 /* Lookup CRLs */ | |
| 293 | /* These functions are being redefined in another directory, | 316 | #define X509_V_FLAG_CRL_CHECK_ALL 0x8 /* Lookup CRLs for whole chain */ |
| 294 | and clash when the linker is case-insensitive, so let's | 317 | #define X509_V_FLAG_IGNORE_CRITICAL 0x10 /* Ignore unhandled critical extensions */ |
| 295 | hide them a little, by giving them an extra 'o' at the | ||
| 296 | beginning of the name... */ | ||
| 297 | #ifdef VMS | ||
| 298 | #undef X509v3_cleanup_extensions | ||
| 299 | #define X509v3_cleanup_extensions oX509v3_cleanup_extensions | ||
| 300 | #undef X509v3_add_extension | ||
| 301 | #define X509v3_add_extension oX509v3_add_extension | ||
| 302 | #undef X509v3_add_netscape_extensions | ||
| 303 | #define X509v3_add_netscape_extensions oX509v3_add_netscape_extensions | ||
| 304 | #undef X509v3_add_standard_extensions | ||
| 305 | #define X509v3_add_standard_extensions oX509v3_add_standard_extensions | ||
| 306 | #endif | ||
| 307 | 318 | ||
| 308 | int X509_OBJECT_idx_by_subject(STACK_OF(X509_OBJECT) *h, int type, | 319 | int X509_OBJECT_idx_by_subject(STACK_OF(X509_OBJECT) *h, int type, |
| 309 | X509_NAME *name); | 320 | X509_NAME *name); |
| @@ -314,12 +325,16 @@ void X509_OBJECT_free_contents(X509_OBJECT *a); | |||
| 314 | X509_STORE *X509_STORE_new(void ); | 325 | X509_STORE *X509_STORE_new(void ); |
| 315 | void X509_STORE_free(X509_STORE *v); | 326 | void X509_STORE_free(X509_STORE *v); |
| 316 | 327 | ||
| 328 | void X509_STORE_set_flags(X509_STORE *ctx, long flags); | ||
| 329 | int X509_STORE_set_purpose(X509_STORE *ctx, int purpose); | ||
| 330 | int X509_STORE_set_trust(X509_STORE *ctx, int trust); | ||
| 331 | |||
| 317 | X509_STORE_CTX *X509_STORE_CTX_new(void); | 332 | X509_STORE_CTX *X509_STORE_CTX_new(void); |
| 318 | 333 | ||
| 319 | int X509_STORE_CTX_get1_issuer(X509 **issuer, X509_STORE_CTX *ctx, X509 *x); | 334 | int X509_STORE_CTX_get1_issuer(X509 **issuer, X509_STORE_CTX *ctx, X509 *x); |
| 320 | 335 | ||
| 321 | void X509_STORE_CTX_free(X509_STORE_CTX *ctx); | 336 | void X509_STORE_CTX_free(X509_STORE_CTX *ctx); |
| 322 | void X509_STORE_CTX_init(X509_STORE_CTX *ctx, X509_STORE *store, | 337 | int X509_STORE_CTX_init(X509_STORE_CTX *ctx, X509_STORE *store, |
| 323 | X509 *x509, STACK_OF(X509) *chain); | 338 | X509 *x509, STACK_OF(X509) *chain); |
| 324 | void X509_STORE_CTX_trusted_stack(X509_STORE_CTX *ctx, STACK_OF(X509) *sk); | 339 | void X509_STORE_CTX_trusted_stack(X509_STORE_CTX *ctx, STACK_OF(X509) *sk); |
| 325 | void X509_STORE_CTX_cleanup(X509_STORE_CTX *ctx); | 340 | void X509_STORE_CTX_cleanup(X509_STORE_CTX *ctx); |
| @@ -338,7 +353,7 @@ int X509_STORE_get_by_subject(X509_STORE_CTX *vs,int type,X509_NAME *name, | |||
| 338 | int X509_LOOKUP_ctrl(X509_LOOKUP *ctx, int cmd, const char *argc, | 353 | int X509_LOOKUP_ctrl(X509_LOOKUP *ctx, int cmd, const char *argc, |
| 339 | long argl, char **ret); | 354 | long argl, char **ret); |
| 340 | 355 | ||
| 341 | #ifndef NO_STDIO | 356 | #ifndef OPENSSL_NO_STDIO |
| 342 | int X509_load_cert_file(X509_LOOKUP *ctx, const char *file, int type); | 357 | int X509_load_cert_file(X509_LOOKUP *ctx, const char *file, int type); |
| 343 | int X509_load_crl_file(X509_LOOKUP *ctx, const char *file, int type); | 358 | int X509_load_crl_file(X509_LOOKUP *ctx, const char *file, int type); |
| 344 | int X509_load_cert_crl_file(X509_LOOKUP *ctx, const char *file, int type); | 359 | int X509_load_cert_crl_file(X509_LOOKUP *ctx, const char *file, int type); |
| @@ -358,7 +373,7 @@ int X509_LOOKUP_by_alias(X509_LOOKUP *ctx, int type, char *str, | |||
| 358 | int len, X509_OBJECT *ret); | 373 | int len, X509_OBJECT *ret); |
| 359 | int X509_LOOKUP_shutdown(X509_LOOKUP *ctx); | 374 | int X509_LOOKUP_shutdown(X509_LOOKUP *ctx); |
| 360 | 375 | ||
| 361 | #ifndef NO_STDIO | 376 | #ifndef OPENSSL_NO_STDIO |
| 362 | int X509_STORE_load_locations (X509_STORE *ctx, | 377 | int X509_STORE_load_locations (X509_STORE *ctx, |
| 363 | const char *file, const char *dir); | 378 | const char *file, const char *dir); |
| 364 | int X509_STORE_set_default_paths(X509_STORE *ctx); | 379 | int X509_STORE_set_default_paths(X509_STORE *ctx); |
| @@ -382,6 +397,8 @@ int X509_STORE_CTX_purpose_inherit(X509_STORE_CTX *ctx, int def_purpose, | |||
| 382 | int purpose, int trust); | 397 | int purpose, int trust); |
| 383 | void X509_STORE_CTX_set_flags(X509_STORE_CTX *ctx, long flags); | 398 | void X509_STORE_CTX_set_flags(X509_STORE_CTX *ctx, long flags); |
| 384 | void X509_STORE_CTX_set_time(X509_STORE_CTX *ctx, long flags, time_t t); | 399 | void X509_STORE_CTX_set_time(X509_STORE_CTX *ctx, long flags, time_t t); |
| 400 | void X509_STORE_CTX_set_verify_cb(X509_STORE_CTX *ctx, | ||
| 401 | int (*verify_cb)(int, X509_STORE_CTX *)); | ||
| 385 | 402 | ||
| 386 | #ifdef __cplusplus | 403 | #ifdef __cplusplus |
| 387 | } | 404 | } |
diff --git a/src/lib/libcrypto/x509/x509cset.c b/src/lib/libcrypto/x509/x509cset.c new file mode 100644 index 0000000000..6cac440ea9 --- /dev/null +++ b/src/lib/libcrypto/x509/x509cset.c | |||
| @@ -0,0 +1,169 @@ | |||
| 1 | /* crypto/x509/x509cset.c */ | ||
| 2 | /* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL | ||
| 3 | * project 2001. | ||
| 4 | */ | ||
| 5 | /* ==================================================================== | ||
| 6 | * Copyright (c) 2001 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/asn1.h> | ||
| 62 | #include <openssl/objects.h> | ||
| 63 | #include <openssl/evp.h> | ||
| 64 | #include <openssl/x509.h> | ||
| 65 | |||
| 66 | int X509_CRL_set_version(X509_CRL *x, long version) | ||
| 67 | { | ||
| 68 | if (x == NULL) return(0); | ||
| 69 | if (x->crl->version == NULL) | ||
| 70 | { | ||
| 71 | if ((x->crl->version=M_ASN1_INTEGER_new()) == NULL) | ||
| 72 | return(0); | ||
| 73 | } | ||
| 74 | return(ASN1_INTEGER_set(x->crl->version,version)); | ||
| 75 | } | ||
| 76 | |||
| 77 | int X509_CRL_set_issuer_name(X509_CRL *x, X509_NAME *name) | ||
| 78 | { | ||
| 79 | if ((x == NULL) || (x->crl == NULL)) return(0); | ||
| 80 | return(X509_NAME_set(&x->crl->issuer,name)); | ||
| 81 | } | ||
| 82 | |||
| 83 | |||
| 84 | int X509_CRL_set_lastUpdate(X509_CRL *x, ASN1_TIME *tm) | ||
| 85 | { | ||
| 86 | ASN1_TIME *in; | ||
| 87 | |||
| 88 | if (x == NULL) return(0); | ||
| 89 | in=x->crl->lastUpdate; | ||
| 90 | if (in != tm) | ||
| 91 | { | ||
| 92 | in=M_ASN1_TIME_dup(tm); | ||
| 93 | if (in != NULL) | ||
| 94 | { | ||
| 95 | M_ASN1_TIME_free(x->crl->lastUpdate); | ||
| 96 | x->crl->lastUpdate=in; | ||
| 97 | } | ||
| 98 | } | ||
| 99 | return(in != NULL); | ||
| 100 | } | ||
| 101 | |||
| 102 | int X509_CRL_set_nextUpdate(X509_CRL *x, ASN1_TIME *tm) | ||
| 103 | { | ||
| 104 | ASN1_TIME *in; | ||
| 105 | |||
| 106 | if (x == NULL) return(0); | ||
| 107 | in=x->crl->nextUpdate; | ||
| 108 | if (in != tm) | ||
| 109 | { | ||
| 110 | in=M_ASN1_TIME_dup(tm); | ||
| 111 | if (in != NULL) | ||
| 112 | { | ||
| 113 | M_ASN1_TIME_free(x->crl->nextUpdate); | ||
| 114 | x->crl->nextUpdate=in; | ||
| 115 | } | ||
| 116 | } | ||
| 117 | return(in != NULL); | ||
| 118 | } | ||
| 119 | |||
| 120 | int X509_CRL_sort(X509_CRL *c) | ||
| 121 | { | ||
| 122 | int i; | ||
| 123 | X509_REVOKED *r; | ||
| 124 | /* sort the data so it will be written in serial | ||
| 125 | * number order */ | ||
| 126 | sk_X509_REVOKED_sort(c->crl->revoked); | ||
| 127 | for (i=0; i<sk_X509_REVOKED_num(c->crl->revoked); i++) | ||
| 128 | { | ||
| 129 | r=sk_X509_REVOKED_value(c->crl->revoked,i); | ||
| 130 | r->sequence=i; | ||
| 131 | } | ||
| 132 | return 1; | ||
| 133 | } | ||
| 134 | |||
| 135 | int X509_REVOKED_set_revocationDate(X509_REVOKED *x, ASN1_TIME *tm) | ||
| 136 | { | ||
| 137 | ASN1_TIME *in; | ||
| 138 | |||
| 139 | if (x == NULL) return(0); | ||
| 140 | in=x->revocationDate; | ||
| 141 | if (in != tm) | ||
| 142 | { | ||
| 143 | in=M_ASN1_TIME_dup(tm); | ||
| 144 | if (in != NULL) | ||
| 145 | { | ||
| 146 | M_ASN1_TIME_free(x->revocationDate); | ||
| 147 | x->revocationDate=in; | ||
| 148 | } | ||
| 149 | } | ||
| 150 | return(in != NULL); | ||
| 151 | } | ||
| 152 | |||
| 153 | int X509_REVOKED_set_serialNumber(X509_REVOKED *x, ASN1_INTEGER *serial) | ||
| 154 | { | ||
| 155 | ASN1_INTEGER *in; | ||
| 156 | |||
| 157 | if (x == NULL) return(0); | ||
| 158 | in=x->serialNumber; | ||
| 159 | if (in != serial) | ||
| 160 | { | ||
| 161 | in=M_ASN1_INTEGER_dup(serial); | ||
| 162 | if (in != NULL) | ||
| 163 | { | ||
| 164 | M_ASN1_INTEGER_free(x->serialNumber); | ||
| 165 | x->serialNumber=in; | ||
| 166 | } | ||
| 167 | } | ||
| 168 | return(in != NULL); | ||
| 169 | } | ||
diff --git a/src/lib/libcrypto/x509/x509spki.c b/src/lib/libcrypto/x509/x509spki.c index fd0a534d88..4c3af946ec 100644 --- a/src/lib/libcrypto/x509/x509spki.c +++ b/src/lib/libcrypto/x509/x509spki.c | |||
| @@ -59,7 +59,6 @@ | |||
| 59 | #include <stdio.h> | 59 | #include <stdio.h> |
| 60 | #include "cryptlib.h" | 60 | #include "cryptlib.h" |
| 61 | #include <openssl/x509.h> | 61 | #include <openssl/x509.h> |
| 62 | #include <openssl/asn1_mac.h> | ||
| 63 | 62 | ||
| 64 | int NETSCAPE_SPKI_set_pubkey(NETSCAPE_SPKI *x, EVP_PKEY *pkey) | 63 | int NETSCAPE_SPKI_set_pubkey(NETSCAPE_SPKI *x, EVP_PKEY *pkey) |
| 65 | { | 64 | { |
diff --git a/src/lib/libcrypto/x509/x_all.c b/src/lib/libcrypto/x509/x_all.c index 9bd6e2a39b..fb5015cd4d 100644 --- a/src/lib/libcrypto/x509/x_all.c +++ b/src/lib/libcrypto/x509/x_all.c | |||
| @@ -67,224 +67,159 @@ | |||
| 67 | 67 | ||
| 68 | int X509_verify(X509 *a, EVP_PKEY *r) | 68 | int X509_verify(X509 *a, EVP_PKEY *r) |
| 69 | { | 69 | { |
| 70 | return(ASN1_verify((int (*)())i2d_X509_CINF,a->sig_alg, | 70 | return(ASN1_item_verify(ASN1_ITEM_rptr(X509_CINF),a->sig_alg, |
| 71 | a->signature,(char *)a->cert_info,r)); | 71 | a->signature,a->cert_info,r)); |
| 72 | } | 72 | } |
| 73 | 73 | ||
| 74 | int X509_REQ_verify(X509_REQ *a, EVP_PKEY *r) | 74 | int X509_REQ_verify(X509_REQ *a, EVP_PKEY *r) |
| 75 | { | 75 | { |
| 76 | return( ASN1_verify((int (*)())i2d_X509_REQ_INFO, | 76 | return( ASN1_item_verify(ASN1_ITEM_rptr(X509_REQ_INFO), |
| 77 | a->sig_alg,a->signature,(char *)a->req_info,r)); | 77 | a->sig_alg,a->signature,a->req_info,r)); |
| 78 | } | 78 | } |
| 79 | 79 | ||
| 80 | int X509_CRL_verify(X509_CRL *a, EVP_PKEY *r) | 80 | int X509_CRL_verify(X509_CRL *a, EVP_PKEY *r) |
| 81 | { | 81 | { |
| 82 | return(ASN1_verify((int (*)())i2d_X509_CRL_INFO, | 82 | return(ASN1_item_verify(ASN1_ITEM_rptr(X509_CRL_INFO), |
| 83 | a->sig_alg, a->signature,(char *)a->crl,r)); | 83 | a->sig_alg, a->signature,a->crl,r)); |
| 84 | } | 84 | } |
| 85 | 85 | ||
| 86 | int NETSCAPE_SPKI_verify(NETSCAPE_SPKI *a, EVP_PKEY *r) | 86 | int NETSCAPE_SPKI_verify(NETSCAPE_SPKI *a, EVP_PKEY *r) |
| 87 | { | 87 | { |
| 88 | return(ASN1_verify((int (*)())i2d_NETSCAPE_SPKAC, | 88 | return(ASN1_item_verify(ASN1_ITEM_rptr(NETSCAPE_SPKAC), |
| 89 | a->sig_algor,a->signature, (char *)a->spkac,r)); | 89 | a->sig_algor,a->signature,a->spkac,r)); |
| 90 | } | 90 | } |
| 91 | 91 | ||
| 92 | int X509_sign(X509 *x, EVP_PKEY *pkey, const EVP_MD *md) | 92 | int X509_sign(X509 *x, EVP_PKEY *pkey, const EVP_MD *md) |
| 93 | { | 93 | { |
| 94 | return(ASN1_sign((int (*)())i2d_X509_CINF, x->cert_info->signature, | 94 | return(ASN1_item_sign(ASN1_ITEM_rptr(X509_CINF), x->cert_info->signature, |
| 95 | x->sig_alg, x->signature, (char *)x->cert_info,pkey,md)); | 95 | x->sig_alg, x->signature, x->cert_info,pkey,md)); |
| 96 | } | 96 | } |
| 97 | 97 | ||
| 98 | 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) |
| 99 | { | 99 | { |
| 100 | return(ASN1_sign((int (*)())i2d_X509_REQ_INFO,x->sig_alg, NULL, | 100 | return(ASN1_item_sign(ASN1_ITEM_rptr(X509_REQ_INFO),x->sig_alg, NULL, |
| 101 | x->signature, (char *)x->req_info,pkey,md)); | 101 | x->signature, x->req_info,pkey,md)); |
| 102 | } | 102 | } |
| 103 | 103 | ||
| 104 | 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) |
| 105 | { | 105 | { |
| 106 | return(ASN1_sign((int (*)())i2d_X509_CRL_INFO,x->crl->sig_alg, | 106 | return(ASN1_item_sign(ASN1_ITEM_rptr(X509_CRL_INFO),x->crl->sig_alg, |
| 107 | x->sig_alg, x->signature, (char *)x->crl,pkey,md)); | 107 | x->sig_alg, x->signature, x->crl,pkey,md)); |
| 108 | } | 108 | } |
| 109 | 109 | ||
| 110 | int NETSCAPE_SPKI_sign(NETSCAPE_SPKI *x, EVP_PKEY *pkey, const EVP_MD *md) | 110 | int NETSCAPE_SPKI_sign(NETSCAPE_SPKI *x, EVP_PKEY *pkey, const EVP_MD *md) |
| 111 | { | 111 | { |
| 112 | return(ASN1_sign((int (*)())i2d_NETSCAPE_SPKAC, x->sig_algor,NULL, | 112 | return(ASN1_item_sign(ASN1_ITEM_rptr(NETSCAPE_SPKAC), x->sig_algor,NULL, |
| 113 | x->signature, (char *)x->spkac,pkey,md)); | 113 | x->signature, x->spkac,pkey,md)); |
| 114 | } | 114 | } |
| 115 | 115 | ||
| 116 | X509_ATTRIBUTE *X509_ATTRIBUTE_dup(X509_ATTRIBUTE *xa) | 116 | #ifndef OPENSSL_NO_FP_API |
| 117 | { | ||
| 118 | return((X509_ATTRIBUTE *)ASN1_dup((int (*)())i2d_X509_ATTRIBUTE, | ||
| 119 | (char *(*)())d2i_X509_ATTRIBUTE,(char *)xa)); | ||
| 120 | } | ||
| 121 | |||
| 122 | X509 *X509_dup(X509 *x509) | ||
| 123 | { | ||
| 124 | return((X509 *)ASN1_dup((int (*)())i2d_X509, | ||
| 125 | (char *(*)())d2i_X509,(char *)x509)); | ||
| 126 | } | ||
| 127 | |||
| 128 | X509_EXTENSION *X509_EXTENSION_dup(X509_EXTENSION *ex) | ||
| 129 | { | ||
| 130 | return((X509_EXTENSION *)ASN1_dup( | ||
| 131 | (int (*)())i2d_X509_EXTENSION, | ||
| 132 | (char *(*)())d2i_X509_EXTENSION,(char *)ex)); | ||
| 133 | } | ||
| 134 | |||
| 135 | #ifndef NO_FP_API | ||
| 136 | X509 *d2i_X509_fp(FILE *fp, X509 **x509) | 117 | X509 *d2i_X509_fp(FILE *fp, X509 **x509) |
| 137 | { | 118 | { |
| 138 | return((X509 *)ASN1_d2i_fp((char *(*)())X509_new, | 119 | return ASN1_item_d2i_fp(ASN1_ITEM_rptr(X509), fp, x509); |
| 139 | (char *(*)())d2i_X509, (fp),(unsigned char **)(x509))); | ||
| 140 | } | 120 | } |
| 141 | 121 | ||
| 142 | int i2d_X509_fp(FILE *fp, X509 *x509) | 122 | int i2d_X509_fp(FILE *fp, X509 *x509) |
| 143 | { | 123 | { |
| 144 | return(ASN1_i2d_fp(i2d_X509,fp,(unsigned char *)x509)); | 124 | return ASN1_item_i2d_fp(ASN1_ITEM_rptr(X509), fp, x509); |
| 145 | } | 125 | } |
| 146 | #endif | 126 | #endif |
| 147 | 127 | ||
| 148 | X509 *d2i_X509_bio(BIO *bp, X509 **x509) | 128 | X509 *d2i_X509_bio(BIO *bp, X509 **x509) |
| 149 | { | 129 | { |
| 150 | return((X509 *)ASN1_d2i_bio((char *(*)())X509_new, | 130 | return ASN1_item_d2i_bio(ASN1_ITEM_rptr(X509), bp, x509); |
| 151 | (char *(*)())d2i_X509, (bp),(unsigned char **)(x509))); | ||
| 152 | } | 131 | } |
| 153 | 132 | ||
| 154 | int i2d_X509_bio(BIO *bp, X509 *x509) | 133 | int i2d_X509_bio(BIO *bp, X509 *x509) |
| 155 | { | 134 | { |
| 156 | return(ASN1_i2d_bio(i2d_X509,bp,(unsigned char *)x509)); | 135 | return ASN1_item_i2d_bio(ASN1_ITEM_rptr(X509), bp, x509); |
| 157 | } | ||
| 158 | |||
| 159 | X509_CRL *X509_CRL_dup(X509_CRL *crl) | ||
| 160 | { | ||
| 161 | return((X509_CRL *)ASN1_dup((int (*)())i2d_X509_CRL, | ||
| 162 | (char *(*)())d2i_X509_CRL,(char *)crl)); | ||
| 163 | } | 136 | } |
| 164 | 137 | ||
| 165 | #ifndef NO_FP_API | 138 | #ifndef OPENSSL_NO_FP_API |
| 166 | X509_CRL *d2i_X509_CRL_fp(FILE *fp, X509_CRL **crl) | 139 | X509_CRL *d2i_X509_CRL_fp(FILE *fp, X509_CRL **crl) |
| 167 | { | 140 | { |
| 168 | return((X509_CRL *)ASN1_d2i_fp((char *(*)()) | 141 | return ASN1_item_d2i_fp(ASN1_ITEM_rptr(X509_CRL), fp, crl); |
| 169 | X509_CRL_new,(char *(*)())d2i_X509_CRL, (fp), | ||
| 170 | (unsigned char **)(crl))); | ||
| 171 | } | 142 | } |
| 172 | 143 | ||
| 173 | int i2d_X509_CRL_fp(FILE *fp, X509_CRL *crl) | 144 | int i2d_X509_CRL_fp(FILE *fp, X509_CRL *crl) |
| 174 | { | 145 | { |
| 175 | return(ASN1_i2d_fp(i2d_X509_CRL,fp,(unsigned char *)crl)); | 146 | return ASN1_item_i2d_fp(ASN1_ITEM_rptr(X509_CRL), fp, crl); |
| 176 | } | 147 | } |
| 177 | #endif | 148 | #endif |
| 178 | 149 | ||
| 179 | X509_CRL *d2i_X509_CRL_bio(BIO *bp, X509_CRL **crl) | 150 | X509_CRL *d2i_X509_CRL_bio(BIO *bp, X509_CRL **crl) |
| 180 | { | 151 | { |
| 181 | return((X509_CRL *)ASN1_d2i_bio((char *(*)()) | 152 | return ASN1_item_d2i_bio(ASN1_ITEM_rptr(X509_CRL), bp, crl); |
| 182 | X509_CRL_new,(char *(*)())d2i_X509_CRL, (bp), | ||
| 183 | (unsigned char **)(crl))); | ||
| 184 | } | 153 | } |
| 185 | 154 | ||
| 186 | int i2d_X509_CRL_bio(BIO *bp, X509_CRL *crl) | 155 | int i2d_X509_CRL_bio(BIO *bp, X509_CRL *crl) |
| 187 | { | 156 | { |
| 188 | return(ASN1_i2d_bio(i2d_X509_CRL,bp,(unsigned char *)crl)); | 157 | return ASN1_item_i2d_bio(ASN1_ITEM_rptr(X509_CRL), bp, crl); |
| 189 | } | ||
| 190 | |||
| 191 | PKCS7 *PKCS7_dup(PKCS7 *p7) | ||
| 192 | { | ||
| 193 | return((PKCS7 *)ASN1_dup((int (*)())i2d_PKCS7, | ||
| 194 | (char *(*)())d2i_PKCS7,(char *)p7)); | ||
| 195 | } | 158 | } |
| 196 | 159 | ||
| 197 | #ifndef NO_FP_API | 160 | #ifndef OPENSSL_NO_FP_API |
| 198 | PKCS7 *d2i_PKCS7_fp(FILE *fp, PKCS7 **p7) | 161 | PKCS7 *d2i_PKCS7_fp(FILE *fp, PKCS7 **p7) |
| 199 | { | 162 | { |
| 200 | return((PKCS7 *)ASN1_d2i_fp((char *(*)()) | 163 | return ASN1_item_d2i_fp(ASN1_ITEM_rptr(PKCS7), fp, p7); |
| 201 | PKCS7_new,(char *(*)())d2i_PKCS7, (fp), | ||
| 202 | (unsigned char **)(p7))); | ||
| 203 | } | 164 | } |
| 204 | 165 | ||
| 205 | int i2d_PKCS7_fp(FILE *fp, PKCS7 *p7) | 166 | int i2d_PKCS7_fp(FILE *fp, PKCS7 *p7) |
| 206 | { | 167 | { |
| 207 | return(ASN1_i2d_fp(i2d_PKCS7,fp,(unsigned char *)p7)); | 168 | return ASN1_item_i2d_fp(ASN1_ITEM_rptr(PKCS7), fp, p7); |
| 208 | } | 169 | } |
| 209 | #endif | 170 | #endif |
| 210 | 171 | ||
| 211 | PKCS7 *d2i_PKCS7_bio(BIO *bp, PKCS7 **p7) | 172 | PKCS7 *d2i_PKCS7_bio(BIO *bp, PKCS7 **p7) |
| 212 | { | 173 | { |
| 213 | return((PKCS7 *)ASN1_d2i_bio((char *(*)()) | 174 | return ASN1_item_d2i_bio(ASN1_ITEM_rptr(PKCS7), bp, p7); |
| 214 | PKCS7_new,(char *(*)())d2i_PKCS7, (bp), | ||
| 215 | (unsigned char **)(p7))); | ||
| 216 | } | 175 | } |
| 217 | 176 | ||
| 218 | int i2d_PKCS7_bio(BIO *bp, PKCS7 *p7) | 177 | int i2d_PKCS7_bio(BIO *bp, PKCS7 *p7) |
| 219 | { | 178 | { |
| 220 | return(ASN1_i2d_bio(i2d_PKCS7,bp,(unsigned char *)p7)); | 179 | return ASN1_item_i2d_bio(ASN1_ITEM_rptr(PKCS7), bp, p7); |
| 221 | } | 180 | } |
| 222 | 181 | ||
| 223 | X509_REQ *X509_REQ_dup(X509_REQ *req) | 182 | #ifndef OPENSSL_NO_FP_API |
| 224 | { | ||
| 225 | return((X509_REQ *)ASN1_dup((int (*)())i2d_X509_REQ, | ||
| 226 | (char *(*)())d2i_X509_REQ,(char *)req)); | ||
| 227 | } | ||
| 228 | |||
| 229 | #ifndef NO_FP_API | ||
| 230 | X509_REQ *d2i_X509_REQ_fp(FILE *fp, X509_REQ **req) | 183 | X509_REQ *d2i_X509_REQ_fp(FILE *fp, X509_REQ **req) |
| 231 | { | 184 | { |
| 232 | return((X509_REQ *)ASN1_d2i_fp((char *(*)()) | 185 | return ASN1_item_d2i_fp(ASN1_ITEM_rptr(X509_REQ), fp, req); |
| 233 | X509_REQ_new, (char *(*)())d2i_X509_REQ, (fp), | ||
| 234 | (unsigned char **)(req))); | ||
| 235 | } | 186 | } |
| 236 | 187 | ||
| 237 | int i2d_X509_REQ_fp(FILE *fp, X509_REQ *req) | 188 | int i2d_X509_REQ_fp(FILE *fp, X509_REQ *req) |
| 238 | { | 189 | { |
| 239 | return(ASN1_i2d_fp(i2d_X509_REQ,fp,(unsigned char *)req)); | 190 | return ASN1_item_i2d_fp(ASN1_ITEM_rptr(X509_REQ), fp, req); |
| 240 | } | 191 | } |
| 241 | #endif | 192 | #endif |
| 242 | 193 | ||
| 243 | X509_REQ *d2i_X509_REQ_bio(BIO *bp, X509_REQ **req) | 194 | X509_REQ *d2i_X509_REQ_bio(BIO *bp, X509_REQ **req) |
| 244 | { | 195 | { |
| 245 | return((X509_REQ *)ASN1_d2i_bio((char *(*)()) | 196 | return ASN1_item_d2i_bio(ASN1_ITEM_rptr(X509_REQ), bp, req); |
| 246 | X509_REQ_new, (char *(*)())d2i_X509_REQ, (bp), | ||
| 247 | (unsigned char **)(req))); | ||
| 248 | } | 197 | } |
| 249 | 198 | ||
| 250 | int i2d_X509_REQ_bio(BIO *bp, X509_REQ *req) | 199 | int i2d_X509_REQ_bio(BIO *bp, X509_REQ *req) |
| 251 | { | 200 | { |
| 252 | return(ASN1_i2d_bio(i2d_X509_REQ,bp,(unsigned char *)req)); | 201 | return ASN1_item_i2d_bio(ASN1_ITEM_rptr(X509_REQ), bp, req); |
| 253 | } | ||
| 254 | |||
| 255 | #ifndef NO_RSA | ||
| 256 | RSA *RSAPublicKey_dup(RSA *rsa) | ||
| 257 | { | ||
| 258 | return((RSA *)ASN1_dup((int (*)())i2d_RSAPublicKey, | ||
| 259 | (char *(*)())d2i_RSAPublicKey,(char *)rsa)); | ||
| 260 | } | 202 | } |
| 261 | 203 | ||
| 262 | RSA *RSAPrivateKey_dup(RSA *rsa) | 204 | #ifndef OPENSSL_NO_RSA |
| 263 | { | ||
| 264 | return((RSA *)ASN1_dup((int (*)())i2d_RSAPrivateKey, | ||
| 265 | (char *(*)())d2i_RSAPrivateKey,(char *)rsa)); | ||
| 266 | } | ||
| 267 | 205 | ||
| 268 | #ifndef NO_FP_API | 206 | #ifndef OPENSSL_NO_FP_API |
| 269 | RSA *d2i_RSAPrivateKey_fp(FILE *fp, RSA **rsa) | 207 | RSA *d2i_RSAPrivateKey_fp(FILE *fp, RSA **rsa) |
| 270 | { | 208 | { |
| 271 | return((RSA *)ASN1_d2i_fp((char *(*)()) | 209 | return ASN1_item_d2i_fp(ASN1_ITEM_rptr(RSAPrivateKey), fp, rsa); |
| 272 | RSA_new,(char *(*)())d2i_RSAPrivateKey, (fp), | ||
| 273 | (unsigned char **)(rsa))); | ||
| 274 | } | 210 | } |
| 275 | 211 | ||
| 276 | int i2d_RSAPrivateKey_fp(FILE *fp, RSA *rsa) | 212 | int i2d_RSAPrivateKey_fp(FILE *fp, RSA *rsa) |
| 277 | { | 213 | { |
| 278 | return(ASN1_i2d_fp(i2d_RSAPrivateKey,fp,(unsigned char *)rsa)); | 214 | return ASN1_item_i2d_fp(ASN1_ITEM_rptr(RSAPrivateKey), fp, rsa); |
| 279 | } | 215 | } |
| 280 | 216 | ||
| 281 | RSA *d2i_RSAPublicKey_fp(FILE *fp, RSA **rsa) | 217 | RSA *d2i_RSAPublicKey_fp(FILE *fp, RSA **rsa) |
| 282 | { | 218 | { |
| 283 | return((RSA *)ASN1_d2i_fp((char *(*)()) | 219 | return ASN1_item_d2i_fp(ASN1_ITEM_rptr(RSAPublicKey), fp, rsa); |
| 284 | RSA_new,(char *(*)())d2i_RSAPublicKey, (fp), | ||
| 285 | (unsigned char **)(rsa))); | ||
| 286 | } | 220 | } |
| 287 | 221 | ||
| 222 | |||
| 288 | RSA *d2i_RSA_PUBKEY_fp(FILE *fp, RSA **rsa) | 223 | RSA *d2i_RSA_PUBKEY_fp(FILE *fp, RSA **rsa) |
| 289 | { | 224 | { |
| 290 | return((RSA *)ASN1_d2i_fp((char *(*)()) | 225 | return((RSA *)ASN1_d2i_fp((char *(*)()) |
| @@ -294,7 +229,7 @@ RSA *d2i_RSA_PUBKEY_fp(FILE *fp, RSA **rsa) | |||
| 294 | 229 | ||
| 295 | int i2d_RSAPublicKey_fp(FILE *fp, RSA *rsa) | 230 | int i2d_RSAPublicKey_fp(FILE *fp, RSA *rsa) |
| 296 | { | 231 | { |
| 297 | return(ASN1_i2d_fp(i2d_RSAPublicKey,fp,(unsigned char *)rsa)); | 232 | return ASN1_item_i2d_fp(ASN1_ITEM_rptr(RSAPublicKey), fp, rsa); |
| 298 | } | 233 | } |
| 299 | 234 | ||
| 300 | int i2d_RSA_PUBKEY_fp(FILE *fp, RSA *rsa) | 235 | int i2d_RSA_PUBKEY_fp(FILE *fp, RSA *rsa) |
| @@ -305,23 +240,20 @@ int i2d_RSA_PUBKEY_fp(FILE *fp, RSA *rsa) | |||
| 305 | 240 | ||
| 306 | RSA *d2i_RSAPrivateKey_bio(BIO *bp, RSA **rsa) | 241 | RSA *d2i_RSAPrivateKey_bio(BIO *bp, RSA **rsa) |
| 307 | { | 242 | { |
| 308 | return((RSA *)ASN1_d2i_bio((char *(*)()) | 243 | return ASN1_item_d2i_bio(ASN1_ITEM_rptr(RSAPrivateKey), bp, rsa); |
| 309 | RSA_new,(char *(*)())d2i_RSAPrivateKey, (bp), | ||
| 310 | (unsigned char **)(rsa))); | ||
| 311 | } | 244 | } |
| 312 | 245 | ||
| 313 | int i2d_RSAPrivateKey_bio(BIO *bp, RSA *rsa) | 246 | int i2d_RSAPrivateKey_bio(BIO *bp, RSA *rsa) |
| 314 | { | 247 | { |
| 315 | return(ASN1_i2d_bio(i2d_RSAPrivateKey,bp,(unsigned char *)rsa)); | 248 | return ASN1_item_i2d_bio(ASN1_ITEM_rptr(RSAPrivateKey), bp, rsa); |
| 316 | } | 249 | } |
| 317 | 250 | ||
| 318 | RSA *d2i_RSAPublicKey_bio(BIO *bp, RSA **rsa) | 251 | RSA *d2i_RSAPublicKey_bio(BIO *bp, RSA **rsa) |
| 319 | { | 252 | { |
| 320 | return((RSA *)ASN1_d2i_bio((char *(*)()) | 253 | return ASN1_item_d2i_bio(ASN1_ITEM_rptr(RSAPublicKey), bp, rsa); |
| 321 | RSA_new,(char *(*)())d2i_RSAPublicKey, (bp), | ||
| 322 | (unsigned char **)(rsa))); | ||
| 323 | } | 254 | } |
| 324 | 255 | ||
| 256 | |||
| 325 | RSA *d2i_RSA_PUBKEY_bio(BIO *bp, RSA **rsa) | 257 | RSA *d2i_RSA_PUBKEY_bio(BIO *bp, RSA **rsa) |
| 326 | { | 258 | { |
| 327 | return((RSA *)ASN1_d2i_bio((char *(*)()) | 259 | return((RSA *)ASN1_d2i_bio((char *(*)()) |
| @@ -331,7 +263,7 @@ RSA *d2i_RSA_PUBKEY_bio(BIO *bp, RSA **rsa) | |||
| 331 | 263 | ||
| 332 | int i2d_RSAPublicKey_bio(BIO *bp, RSA *rsa) | 264 | int i2d_RSAPublicKey_bio(BIO *bp, RSA *rsa) |
| 333 | { | 265 | { |
| 334 | return(ASN1_i2d_bio(i2d_RSAPublicKey,bp,(unsigned char *)rsa)); | 266 | return ASN1_item_i2d_bio(ASN1_ITEM_rptr(RSAPublicKey), bp, rsa); |
| 335 | } | 267 | } |
| 336 | 268 | ||
| 337 | int i2d_RSA_PUBKEY_bio(BIO *bp, RSA *rsa) | 269 | int i2d_RSA_PUBKEY_bio(BIO *bp, RSA *rsa) |
| @@ -340,8 +272,8 @@ int i2d_RSA_PUBKEY_bio(BIO *bp, RSA *rsa) | |||
| 340 | } | 272 | } |
| 341 | #endif | 273 | #endif |
| 342 | 274 | ||
| 343 | #ifndef NO_DSA | 275 | #ifndef OPENSSL_NO_DSA |
| 344 | #ifndef NO_FP_API | 276 | #ifndef OPENSSL_NO_FP_API |
| 345 | DSA *d2i_DSAPrivateKey_fp(FILE *fp, DSA **dsa) | 277 | DSA *d2i_DSAPrivateKey_fp(FILE *fp, DSA **dsa) |
| 346 | { | 278 | { |
| 347 | return((DSA *)ASN1_d2i_fp((char *(*)()) | 279 | return((DSA *)ASN1_d2i_fp((char *(*)()) |
| @@ -393,57 +325,48 @@ int i2d_DSA_PUBKEY_bio(BIO *bp, DSA *dsa) | |||
| 393 | 325 | ||
| 394 | #endif | 326 | #endif |
| 395 | 327 | ||
| 396 | X509_ALGOR *X509_ALGOR_dup(X509_ALGOR *xn) | 328 | int X509_pubkey_digest(const X509 *data, const EVP_MD *type, unsigned char *md, |
| 397 | { | 329 | unsigned int *len) |
| 398 | return((X509_ALGOR *)ASN1_dup((int (*)())i2d_X509_ALGOR, | ||
| 399 | (char *(*)())d2i_X509_ALGOR,(char *)xn)); | ||
| 400 | } | ||
| 401 | |||
| 402 | X509_NAME *X509_NAME_dup(X509_NAME *xn) | ||
| 403 | { | ||
| 404 | return((X509_NAME *)ASN1_dup((int (*)())i2d_X509_NAME, | ||
| 405 | (char *(*)())d2i_X509_NAME,(char *)xn)); | ||
| 406 | } | ||
| 407 | |||
| 408 | X509_NAME_ENTRY *X509_NAME_ENTRY_dup(X509_NAME_ENTRY *ne) | ||
| 409 | { | 330 | { |
| 410 | return((X509_NAME_ENTRY *)ASN1_dup((int (*)())i2d_X509_NAME_ENTRY, | 331 | ASN1_BIT_STRING *key; |
| 411 | (char *(*)())d2i_X509_NAME_ENTRY,(char *)ne)); | 332 | key = X509_get0_pubkey_bitstr(data); |
| 333 | if(!key) return 0; | ||
| 334 | return EVP_Digest(key->data, key->length, md, len, type, NULL); | ||
| 412 | } | 335 | } |
| 413 | 336 | ||
| 414 | int X509_digest(const X509 *data, const EVP_MD *type, unsigned char *md, | 337 | int X509_digest(const X509 *data, const EVP_MD *type, unsigned char *md, |
| 415 | unsigned int *len) | 338 | unsigned int *len) |
| 416 | { | 339 | { |
| 417 | return(ASN1_digest((int (*)())i2d_X509,type,(char *)data,md,len)); | 340 | return(ASN1_item_digest(ASN1_ITEM_rptr(X509),type,(char *)data,md,len)); |
| 418 | } | 341 | } |
| 419 | 342 | ||
| 420 | int X509_CRL_digest(const X509_CRL *data, const EVP_MD *type, unsigned char *md, | 343 | int X509_CRL_digest(const X509_CRL *data, const EVP_MD *type, unsigned char *md, |
| 421 | unsigned int *len) | 344 | unsigned int *len) |
| 422 | { | 345 | { |
| 423 | return(ASN1_digest((int (*)())i2d_X509_CRL,type,(char *)data,md,len)); | 346 | return(ASN1_item_digest(ASN1_ITEM_rptr(X509_CRL),type,(char *)data,md,len)); |
| 424 | } | 347 | } |
| 425 | 348 | ||
| 426 | int X509_REQ_digest(const X509_REQ *data, const EVP_MD *type, unsigned char *md, | 349 | int X509_REQ_digest(const X509_REQ *data, const EVP_MD *type, unsigned char *md, |
| 427 | unsigned int *len) | 350 | unsigned int *len) |
| 428 | { | 351 | { |
| 429 | return(ASN1_digest((int (*)())i2d_X509_REQ,type,(char *)data,md,len)); | 352 | return(ASN1_item_digest(ASN1_ITEM_rptr(X509_REQ),type,(char *)data,md,len)); |
| 430 | } | 353 | } |
| 431 | 354 | ||
| 432 | int X509_NAME_digest(const X509_NAME *data, const EVP_MD *type, unsigned char *md, | 355 | int X509_NAME_digest(const X509_NAME *data, const EVP_MD *type, unsigned char *md, |
| 433 | unsigned int *len) | 356 | unsigned int *len) |
| 434 | { | 357 | { |
| 435 | return(ASN1_digest((int (*)())i2d_X509_NAME,type,(char *)data,md,len)); | 358 | return(ASN1_item_digest(ASN1_ITEM_rptr(X509_NAME),type,(char *)data,md,len)); |
| 436 | } | 359 | } |
| 437 | 360 | ||
| 438 | int PKCS7_ISSUER_AND_SERIAL_digest(PKCS7_ISSUER_AND_SERIAL *data, const EVP_MD *type, | 361 | int PKCS7_ISSUER_AND_SERIAL_digest(PKCS7_ISSUER_AND_SERIAL *data, const EVP_MD *type, |
| 439 | unsigned char *md, unsigned int *len) | 362 | unsigned char *md, unsigned int *len) |
| 440 | { | 363 | { |
| 441 | return(ASN1_digest((int (*)())i2d_PKCS7_ISSUER_AND_SERIAL,type, | 364 | return(ASN1_item_digest(ASN1_ITEM_rptr(PKCS7_ISSUER_AND_SERIAL),type, |
| 442 | (char *)data,md,len)); | 365 | (char *)data,md,len)); |
| 443 | } | 366 | } |
| 444 | 367 | ||
| 445 | 368 | ||
| 446 | #ifndef NO_FP_API | 369 | #ifndef OPENSSL_NO_FP_API |
| 447 | X509_SIG *d2i_PKCS8_fp(FILE *fp, X509_SIG **p8) | 370 | X509_SIG *d2i_PKCS8_fp(FILE *fp, X509_SIG **p8) |
| 448 | { | 371 | { |
| 449 | return((X509_SIG *)ASN1_d2i_fp((char *(*)())X509_SIG_new, | 372 | return((X509_SIG *)ASN1_d2i_fp((char *(*)())X509_SIG_new, |
| @@ -467,7 +390,7 @@ int i2d_PKCS8_bio(BIO *bp, X509_SIG *p8) | |||
| 467 | return(ASN1_i2d_bio(i2d_X509_SIG,bp,(unsigned char *)p8)); | 390 | return(ASN1_i2d_bio(i2d_X509_SIG,bp,(unsigned char *)p8)); |
| 468 | } | 391 | } |
| 469 | 392 | ||
| 470 | #ifndef NO_FP_API | 393 | #ifndef OPENSSL_NO_FP_API |
| 471 | PKCS8_PRIV_KEY_INFO *d2i_PKCS8_PRIV_KEY_INFO_fp(FILE *fp, | 394 | PKCS8_PRIV_KEY_INFO *d2i_PKCS8_PRIV_KEY_INFO_fp(FILE *fp, |
| 472 | PKCS8_PRIV_KEY_INFO **p8inf) | 395 | PKCS8_PRIV_KEY_INFO **p8inf) |
| 473 | { | 396 | { |
