diff options
Diffstat (limited to 'src/lib/libssl/src/apps/apps.h')
-rw-r--r-- | src/lib/libssl/src/apps/apps.h | 78 |
1 files changed, 59 insertions, 19 deletions
diff --git a/src/lib/libssl/src/apps/apps.h b/src/lib/libssl/src/apps/apps.h index 32a79605ee..c36b9d2566 100644 --- a/src/lib/libssl/src/apps/apps.h +++ b/src/lib/libssl/src/apps/apps.h | |||
@@ -121,7 +121,9 @@ | |||
121 | #include <openssl/lhash.h> | 121 | #include <openssl/lhash.h> |
122 | #include <openssl/conf.h> | 122 | #include <openssl/conf.h> |
123 | #include <openssl/txt_db.h> | 123 | #include <openssl/txt_db.h> |
124 | #ifndef OPENSSL_NO_ENGINE | ||
124 | #include <openssl/engine.h> | 125 | #include <openssl/engine.h> |
126 | #endif | ||
125 | #include <openssl/ossl_typ.h> | 127 | #include <openssl/ossl_typ.h> |
126 | 128 | ||
127 | int app_RAND_load_file(const char *file, BIO *bio_e, int dont_warn); | 129 | int app_RAND_load_file(const char *file, BIO *bio_e, int dont_warn); |
@@ -139,13 +141,21 @@ long app_RAND_load_files(char *file); /* `file' is a list of files to read, | |||
139 | int WIN32_rename(char *oldname,char *newname); | 141 | int WIN32_rename(char *oldname,char *newname); |
140 | #endif | 142 | #endif |
141 | 143 | ||
144 | /* VMS below version 7.0 doesn't have strcasecmp() */ | ||
145 | #ifdef OPENSSL_SYS_VMS | ||
146 | #define strcasecmp(str1,str2) VMS_strcasecmp((str1),(str2)) | ||
147 | int VMS_strcasecmp(const char *str1, const char *str2); | ||
148 | #endif | ||
149 | |||
142 | #ifndef MONOLITH | 150 | #ifndef MONOLITH |
143 | 151 | ||
144 | #define MAIN(a,v) main(a,v) | 152 | #define MAIN(a,v) main(a,v) |
145 | 153 | ||
146 | #ifndef NON_MAIN | 154 | #ifndef NON_MAIN |
155 | CONF *config=NULL; | ||
147 | BIO *bio_err=NULL; | 156 | BIO *bio_err=NULL; |
148 | #else | 157 | #else |
158 | extern CONF *config; | ||
149 | extern BIO *bio_err; | 159 | extern BIO *bio_err; |
150 | #endif | 160 | #endif |
151 | 161 | ||
@@ -171,30 +181,57 @@ extern BIO *bio_err; | |||
171 | do_pipe_sig() | 181 | do_pipe_sig() |
172 | # define apps_shutdown() | 182 | # define apps_shutdown() |
173 | #else | 183 | #else |
174 | # if defined(OPENSSL_SYS_MSDOS) || defined(OPENSSL_SYS_WIN16) || \ | 184 | # ifndef OPENSSL_NO_ENGINE |
175 | defined(OPENSSL_SYS_WIN32) | 185 | # if defined(OPENSSL_SYS_MSDOS) || defined(OPENSSL_SYS_WIN16) || \ |
176 | # ifdef _O_BINARY | 186 | defined(OPENSSL_SYS_WIN32) |
177 | # define apps_startup() \ | 187 | # ifdef _O_BINARY |
178 | do { _fmode=_O_BINARY; do_pipe_sig(); CRYPTO_malloc_init(); \ | 188 | # define apps_startup() \ |
179 | ERR_load_crypto_strings(); OpenSSL_add_all_algorithms(); \ | 189 | do { _fmode=_O_BINARY; do_pipe_sig(); CRYPTO_malloc_init(); \ |
180 | ENGINE_load_builtin_engines(); setup_ui_method(); } while(0) | 190 | ERR_load_crypto_strings(); OpenSSL_add_all_algorithms(); \ |
191 | ENGINE_load_builtin_engines(); setup_ui_method(); } while(0) | ||
192 | # else | ||
193 | # define apps_startup() \ | ||
194 | do { _fmode=O_BINARY; do_pipe_sig(); CRYPTO_malloc_init(); \ | ||
195 | ERR_load_crypto_strings(); OpenSSL_add_all_algorithms(); \ | ||
196 | ENGINE_load_builtin_engines(); setup_ui_method(); } while(0) | ||
197 | # endif | ||
181 | # else | 198 | # else |
182 | # define apps_startup() \ | 199 | # define apps_startup() \ |
183 | do { _fmode=O_BINARY; do_pipe_sig(); CRYPTO_malloc_init(); \ | 200 | do { do_pipe_sig(); OpenSSL_add_all_algorithms(); \ |
184 | ERR_load_crypto_strings(); OpenSSL_add_all_algorithms(); \ | 201 | ERR_load_crypto_strings(); ENGINE_load_builtin_engines(); \ |
185 | ENGINE_load_builtin_engines(); setup_ui_method(); } while(0) | 202 | setup_ui_method(); } while(0) |
186 | # endif | 203 | # endif |
204 | # define apps_shutdown() \ | ||
205 | do { CONF_modules_unload(1); destroy_ui_method(); \ | ||
206 | EVP_cleanup(); ENGINE_cleanup(); \ | ||
207 | CRYPTO_cleanup_all_ex_data(); ERR_remove_state(0); \ | ||
208 | ERR_free_strings(); } while(0) | ||
187 | # else | 209 | # else |
188 | # define apps_startup() \ | 210 | # if defined(OPENSSL_SYS_MSDOS) || defined(OPENSSL_SYS_WIN16) || \ |
189 | do { do_pipe_sig(); OpenSSL_add_all_algorithms(); \ | 211 | defined(OPENSSL_SYS_WIN32) |
190 | ERR_load_crypto_strings(); ENGINE_load_builtin_engines(); \ | 212 | # ifdef _O_BINARY |
191 | setup_ui_method(); } while(0) | 213 | # define apps_startup() \ |
214 | do { _fmode=_O_BINARY; do_pipe_sig(); CRYPTO_malloc_init(); \ | ||
215 | ERR_load_crypto_strings(); OpenSSL_add_all_algorithms(); \ | ||
216 | setup_ui_method(); } while(0) | ||
217 | # else | ||
218 | # define apps_startup() \ | ||
219 | do { _fmode=O_BINARY; do_pipe_sig(); CRYPTO_malloc_init(); \ | ||
220 | ERR_load_crypto_strings(); OpenSSL_add_all_algorithms(); \ | ||
221 | setup_ui_method(); } while(0) | ||
222 | # endif | ||
223 | # else | ||
224 | # define apps_startup() \ | ||
225 | do { do_pipe_sig(); OpenSSL_add_all_algorithms(); \ | ||
226 | ERR_load_crypto_strings(); \ | ||
227 | setup_ui_method(); } while(0) | ||
228 | # endif | ||
229 | # define apps_shutdown() \ | ||
230 | do { CONF_modules_unload(1); destroy_ui_method(); \ | ||
231 | EVP_cleanup(); \ | ||
232 | CRYPTO_cleanup_all_ex_data(); ERR_remove_state(0); \ | ||
233 | ERR_free_strings(); } while(0) | ||
192 | # endif | 234 | # endif |
193 | # define apps_shutdown() \ | ||
194 | do { CONF_modules_unload(1); destroy_ui_method(); \ | ||
195 | EVP_cleanup(); ENGINE_cleanup(); \ | ||
196 | CRYPTO_cleanup_all_ex_data(); ERR_remove_state(0); \ | ||
197 | ERR_free_strings(); } while(0) | ||
198 | #endif | 235 | #endif |
199 | 236 | ||
200 | typedef struct args_st | 237 | typedef struct args_st |
@@ -240,9 +277,12 @@ EVP_PKEY *load_pubkey(BIO *err, const char *file, int format, int maybe_stdin, | |||
240 | STACK_OF(X509) *load_certs(BIO *err, const char *file, int format, | 277 | STACK_OF(X509) *load_certs(BIO *err, const char *file, int format, |
241 | const char *pass, ENGINE *e, const char *cert_descrip); | 278 | const char *pass, ENGINE *e, const char *cert_descrip); |
242 | X509_STORE *setup_verify(BIO *bp, char *CAfile, char *CApath); | 279 | X509_STORE *setup_verify(BIO *bp, char *CAfile, char *CApath); |
280 | #ifndef OPENSSL_NO_ENGINE | ||
243 | ENGINE *setup_engine(BIO *err, const char *engine, int debug); | 281 | ENGINE *setup_engine(BIO *err, const char *engine, int debug); |
282 | #endif | ||
244 | 283 | ||
245 | int load_config(BIO *err, CONF *cnf); | 284 | int load_config(BIO *err, CONF *cnf); |
285 | char *make_config_name(void); | ||
246 | 286 | ||
247 | /* Functions defined in ca.c and also used in ocsp.c */ | 287 | /* Functions defined in ca.c and also used in ocsp.c */ |
248 | int unpack_revinfo(ASN1_TIME **prevtm, int *preason, ASN1_OBJECT **phold, | 288 | int unpack_revinfo(ASN1_TIME **prevtm, int *preason, ASN1_OBJECT **phold, |