diff options
author | Joel Sing <jsing@cvs.openbsd.org> | 2014-07-12 17:54:32 +0000 |
---|---|---|
committer | Joel Sing <jsing@cvs.openbsd.org> | 2014-07-12 17:54:32 +0000 |
commit | 95f73978f93a569e728a8b9200678c215ebee381 (patch) | |
tree | e1dc7dbfa3475a6678c3fc0a2c3f4182593cc6cc /lib | |
parent | 6f9a645bb102d32555b79620613f955764131459 (diff) |
openssl(1) is only built as a single monolithic binary, so just call
load_config() once when we start.
ok miod@
Diffstat (limited to 'lib')
39 files changed, 47 insertions, 154 deletions
diff --git a/lib/libssl/src/apps/apps.c b/lib/libssl/src/apps/apps.c index a9dd83c0947..84dd13339dd 100644 --- a/lib/libssl/src/apps/apps.c +++ b/lib/libssl/src/apps/apps.c @@ -1,4 +1,4 @@ -/* $OpenBSD: apps.c,v 1.64 2014/07/09 21:13:34 tedu Exp $ */ +/* $OpenBSD: apps.c,v 1.65 2014/07/12 17:54:31 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -1298,9 +1298,9 @@ load_config(BIO *err, CONF *cnf) if (load_config_called) return 1; load_config_called = 1; - if (!cnf) + if (cnf == NULL) cnf = config; - if (!cnf) + if (cnf == NULL) return 1; OPENSSL_load_builtin_modules(); diff --git a/lib/libssl/src/apps/asn1pars.c b/lib/libssl/src/apps/asn1pars.c index e805e3428dc..1cedb6ad00d 100644 --- a/lib/libssl/src/apps/asn1pars.c +++ b/lib/libssl/src/apps/asn1pars.c @@ -1,4 +1,4 @@ -/* $OpenBSD: asn1pars.c,v 1.25 2014/06/28 04:39:41 deraadt Exp $ */ +/* $OpenBSD: asn1pars.c,v 1.26 2014/07/12 17:54:31 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -103,9 +103,6 @@ asn1parse_main(int argc, char **argv) informat = FORMAT_PEM; - if (!load_config(bio_err, NULL)) - goto end; - prog = argv[0]; argc--; argv++; diff --git a/lib/libssl/src/apps/ca.c b/lib/libssl/src/apps/ca.c index a191c182114..8ebfd77f0aa 100644 --- a/lib/libssl/src/apps/ca.c +++ b/lib/libssl/src/apps/ca.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ca.c,v 1.61 2014/07/09 21:13:34 tedu Exp $ */ +/* $OpenBSD: ca.c,v 1.62 2014/07/12 17:54:31 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -544,9 +544,6 @@ bad: free(tofree); tofree = NULL; - if (!load_config(bio_err, conf)) - goto err; - #ifndef OPENSSL_NO_ENGINE e = setup_engine(bio_err, engine, 0); #endif diff --git a/lib/libssl/src/apps/ciphers.c b/lib/libssl/src/apps/ciphers.c index 64675a63fd8..0d791b25222 100644 --- a/lib/libssl/src/apps/ciphers.c +++ b/lib/libssl/src/apps/ciphers.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ciphers.c,v 1.23 2014/06/12 15:49:27 deraadt Exp $ */ +/* $OpenBSD: ciphers.c,v 1.24 2014/07/12 17:54:31 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -95,8 +95,6 @@ ciphers_main(int argc, char **argv) meth = SSLv3_server_method(); STDout = BIO_new_fp(stdout, BIO_NOCLOSE); - if (!load_config(bio_err, NULL)) - goto end; argc--; argv++; diff --git a/lib/libssl/src/apps/cms.c b/lib/libssl/src/apps/cms.c index 4a5f13ba202..bafbce1f5c0 100644 --- a/lib/libssl/src/apps/cms.c +++ b/lib/libssl/src/apps/cms.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cms.c,v 1.18 2014/06/12 15:49:27 deraadt Exp $ */ +/* $OpenBSD: cms.c,v 1.19 2014/07/12 17:54:31 jsing Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project. */ @@ -144,9 +144,6 @@ cms_main(int argc, char **argv) args = argv + 1; ret = 1; - if (!load_config(bio_err, NULL)) - goto end; - while (!badarg && *args && *args[0] == '-') { if (!strcmp(*args, "-encrypt")) operation = SMIME_ENCRYPT; diff --git a/lib/libssl/src/apps/crl.c b/lib/libssl/src/apps/crl.c index 5d7b12216c6..05fd0878a44 100644 --- a/lib/libssl/src/apps/crl.c +++ b/lib/libssl/src/apps/crl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: crl.c,v 1.23 2014/06/12 15:49:27 deraadt Exp $ */ +/* $OpenBSD: crl.c,v 1.24 2014/07/12 17:54:31 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -124,9 +124,6 @@ crl_main(int argc, char **argv) int do_ver = 0; const EVP_MD *md_alg, *digest = EVP_sha1(); - if (!load_config(bio_err, NULL)) - goto end; - if (bio_out == NULL) if ((bio_out = BIO_new(BIO_s_file())) != NULL) { BIO_set_fp(bio_out, stdout, BIO_NOCLOSE); diff --git a/lib/libssl/src/apps/dgst.c b/lib/libssl/src/apps/dgst.c index 0858f964545..f9693fce16c 100644 --- a/lib/libssl/src/apps/dgst.c +++ b/lib/libssl/src/apps/dgst.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dgst.c,v 1.37 2014/06/12 15:49:27 deraadt Exp $ */ +/* $OpenBSD: dgst.c,v 1.38 2014/07/12 17:54:31 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -134,9 +134,6 @@ dgst_main(int argc, char **argv) goto end; } - if (!load_config(bio_err, NULL)) - goto end; - /* first check the program name */ program_name(argv[0], pname, sizeof pname); diff --git a/lib/libssl/src/apps/dh.c b/lib/libssl/src/apps/dh.c index a5a95634707..5687c3cf2a7 100644 --- a/lib/libssl/src/apps/dh.c +++ b/lib/libssl/src/apps/dh.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dh.c,v 1.23 2014/06/12 15:49:27 deraadt Exp $ */ +/* $OpenBSD: dh.c,v 1.24 2014/07/12 17:54:31 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -98,9 +98,6 @@ dh_main(int argc, char **argv) char *engine; #endif - if (!load_config(bio_err, NULL)) - goto end; - #ifndef OPENSSL_NO_ENGINE engine = NULL; #endif diff --git a/lib/libssl/src/apps/dhparam.c b/lib/libssl/src/apps/dhparam.c index 4bd888541bd..b6b38f9b8f2 100644 --- a/lib/libssl/src/apps/dhparam.c +++ b/lib/libssl/src/apps/dhparam.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dhparam.c,v 1.31 2014/07/09 21:02:35 tedu Exp $ */ +/* $OpenBSD: dhparam.c,v 1.32 2014/07/12 17:54:31 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -160,9 +160,6 @@ dhparam_main(int argc, char **argv) #endif int num = 0, g = 0; - if (!load_config(bio_err, NULL)) - goto end; - infile = NULL; outfile = NULL; informat = FORMAT_PEM; diff --git a/lib/libssl/src/apps/dsa.c b/lib/libssl/src/apps/dsa.c index d667d6efb71..ab98c145a9d 100644 --- a/lib/libssl/src/apps/dsa.c +++ b/lib/libssl/src/apps/dsa.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dsa.c,v 1.26 2014/07/09 21:02:35 tedu Exp $ */ +/* $OpenBSD: dsa.c,v 1.27 2014/07/12 17:54:31 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -115,9 +115,6 @@ dsa_main(int argc, char **argv) int pvk_encr = 2; - if (!load_config(bio_err, NULL)) - goto end; - #ifndef OPENSSL_NO_ENGINE engine = NULL; #endif diff --git a/lib/libssl/src/apps/dsaparam.c b/lib/libssl/src/apps/dsaparam.c index 217679f3660..2322040a1ed 100644 --- a/lib/libssl/src/apps/dsaparam.c +++ b/lib/libssl/src/apps/dsaparam.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dsaparam.c,v 1.32 2014/07/09 21:02:35 tedu Exp $ */ +/* $OpenBSD: dsaparam.c,v 1.33 2014/07/12 17:54:31 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -126,9 +126,6 @@ dsaparam_main(int argc, char **argv) int timebomb = 0; #endif - if (!load_config(bio_err, NULL)) - goto end; - infile = NULL; outfile = NULL; informat = FORMAT_PEM; diff --git a/lib/libssl/src/apps/ec.c b/lib/libssl/src/apps/ec.c index f160e691506..89e6f293504 100644 --- a/lib/libssl/src/apps/ec.c +++ b/lib/libssl/src/apps/ec.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ec.c,v 1.14 2014/06/12 15:49:27 deraadt Exp $ */ +/* $OpenBSD: ec.c,v 1.15 2014/07/12 17:54:31 jsing Exp $ */ /* * Written by Nils Larsch for the OpenSSL project. */ @@ -103,9 +103,6 @@ ec_main(int argc, char **argv) int asn1_flag = OPENSSL_EC_NAMED_CURVE; int new_asn1_flag = 0; - if (!load_config(bio_err, NULL)) - goto end; - engine = NULL; infile = NULL; outfile = NULL; diff --git a/lib/libssl/src/apps/ecparam.c b/lib/libssl/src/apps/ecparam.c index e00cb20539e..c7d4647852a 100644 --- a/lib/libssl/src/apps/ecparam.c +++ b/lib/libssl/src/apps/ecparam.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ecparam.c,v 1.21 2014/06/24 05:39:29 logan Exp $ */ +/* $OpenBSD: ecparam.c,v 1.22 2014/07/12 17:54:31 jsing Exp $ */ /* * Written by Nils Larsch for the OpenSSL project. */ @@ -135,9 +135,6 @@ ecparam_main(int argc, char **argv) *ec_order = NULL, *ec_cofactor = NULL; unsigned char *buffer = NULL; - if (!load_config(bio_err, NULL)) - goto end; - informat = FORMAT_PEM; outformat = FORMAT_PEM; diff --git a/lib/libssl/src/apps/enc.c b/lib/libssl/src/apps/enc.c index 4aa2c6a0ed8..6b3aea554f2 100644 --- a/lib/libssl/src/apps/enc.c +++ b/lib/libssl/src/apps/enc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: enc.c,v 1.36 2014/06/29 18:22:10 logan Exp $ */ +/* $OpenBSD: enc.c,v 1.37 2014/07/12 17:54:31 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -130,9 +130,6 @@ enc_main(int argc, char **argv) #endif const EVP_MD *dgst = NULL; - if (!load_config(bio_err, NULL)) - goto end; - /* first check the program name */ program_name(argv[0], pname, sizeof pname); if (strcmp(pname, "base64") == 0) diff --git a/lib/libssl/src/apps/engine.c b/lib/libssl/src/apps/engine.c index 8a9ce83e5bc..f6a30784f9a 100644 --- a/lib/libssl/src/apps/engine.c +++ b/lib/libssl/src/apps/engine.c @@ -1,4 +1,4 @@ -/* $OpenBSD: engine.c,v 1.24 2014/06/12 15:49:27 deraadt Exp $ */ +/* $OpenBSD: engine.c,v 1.25 2014/07/12 17:54:31 jsing Exp $ */ /* Written by Richard Levitte <richard@levitte.org> for the OpenSSL * project 2000. */ @@ -335,9 +335,6 @@ engine_main(int argc, char **argv) SSL_load_error_strings(); - if (!load_config(bio_err, NULL)) - goto end; - bio_out = BIO_new_fp(stdout, BIO_NOCLOSE); argc--; diff --git a/lib/libssl/src/apps/gendh.c b/lib/libssl/src/apps/gendh.c index e5811718e36..5e7e44d7982 100644 --- a/lib/libssl/src/apps/gendh.c +++ b/lib/libssl/src/apps/gendh.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gendh.c,v 1.26 2014/06/12 15:49:27 deraadt Exp $ */ +/* $OpenBSD: gendh.c,v 1.27 2014/07/12 17:54:31 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -103,9 +103,6 @@ gendh_main(int argc, char **argv) BN_GENCB_set(&cb, dh_cb, bio_err); - if (!load_config(bio_err, NULL)) - goto end; - argv++; argc--; for (;;) { diff --git a/lib/libssl/src/apps/gendsa.c b/lib/libssl/src/apps/gendsa.c index cb86c4ac3ef..485462c2928 100644 --- a/lib/libssl/src/apps/gendsa.c +++ b/lib/libssl/src/apps/gendsa.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gendsa.c,v 1.28 2014/07/09 21:02:35 tedu Exp $ */ +/* $OpenBSD: gendsa.c,v 1.29 2014/07/12 17:54:31 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -92,9 +92,6 @@ gendsa_main(int argc, char **argv) char *engine = NULL; #endif - if (!load_config(bio_err, NULL)) - goto end; - argv++; argc--; for (;;) { diff --git a/lib/libssl/src/apps/genpkey.c b/lib/libssl/src/apps/genpkey.c index 1ee1947143e..d386a87cb2c 100644 --- a/lib/libssl/src/apps/genpkey.c +++ b/lib/libssl/src/apps/genpkey.c @@ -1,4 +1,4 @@ -/* $OpenBSD: genpkey.c,v 1.11 2014/06/12 15:49:27 deraadt Exp $ */ +/* $OpenBSD: genpkey.c,v 1.12 2014/07/12 17:54:31 jsing Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 2006 */ @@ -95,9 +95,6 @@ genpkey_main(int argc, char **argv) int do_param = 0; - if (!load_config(bio_err, NULL)) - goto end; - outformat = FORMAT_PEM; ERR_load_crypto_strings(); diff --git a/lib/libssl/src/apps/genrsa.c b/lib/libssl/src/apps/genrsa.c index 7b670ece6b9..dba1d8ccad4 100644 --- a/lib/libssl/src/apps/genrsa.c +++ b/lib/libssl/src/apps/genrsa.c @@ -1,4 +1,4 @@ -/* $OpenBSD: genrsa.c,v 1.35 2014/07/09 21:02:35 tedu Exp $ */ +/* $OpenBSD: genrsa.c,v 1.36 2014/07/12 17:54:31 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -114,9 +114,6 @@ genrsa_main(int argc, char **argv) BN_GENCB_set(&cb, genrsa_cb, bio_err); - if (!load_config(bio_err, NULL)) - goto err; - if ((out = BIO_new(BIO_s_file())) == NULL) { BIO_printf(bio_err, "unable to create BIO for output\n"); goto err; diff --git a/lib/libssl/src/apps/ocsp.c b/lib/libssl/src/apps/ocsp.c index c77b05f27d0..6a6f5e225fa 100644 --- a/lib/libssl/src/apps/ocsp.c +++ b/lib/libssl/src/apps/ocsp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ocsp.c,v 1.27 2014/06/28 04:39:41 deraadt Exp $ */ +/* $OpenBSD: ocsp.c,v 1.28 2014/07/12 17:54:31 jsing Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 2000. */ @@ -147,9 +147,6 @@ ocsp_main(int argc, char **argv) const EVP_MD *cert_id_md = NULL; const char *errstr = NULL; - if (!load_config(bio_err, NULL)) - goto end; - SSL_load_error_strings(); OpenSSL_add_ssl_algorithms(); diff --git a/lib/libssl/src/apps/openssl.c b/lib/libssl/src/apps/openssl.c index 9ebeaebbda1..d35c8d8e19a 100644 --- a/lib/libssl/src/apps/openssl.c +++ b/lib/libssl/src/apps/openssl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: openssl.c,v 1.39 2014/07/10 09:15:51 tedu Exp $ */ +/* $OpenBSD: openssl.c,v 1.40 2014/07/12 17:54:31 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -292,6 +292,12 @@ main(int argc, char **argv) exit(1); } } + + if (!load_config(bio_err, NULL)) { + BIO_printf(bio_err, "failed to load configuration\n"); + goto end; + } + prog = prog_init(); /* first check the program name */ @@ -451,9 +457,6 @@ do_cmd(LHASH_OF(FUNCTION) * prog, int argc, char *argv[]) list_type = FUNC_TYPE_CIPHER; bio_stdout = BIO_new_fp(stdout, BIO_NOCLOSE); - if (!load_config(bio_err, NULL)) - goto end; - if (list_type == FUNC_TYPE_PKEY) list_pkey(bio_stdout); if (list_type == FUNC_TYPE_MD_ALG) diff --git a/lib/libssl/src/apps/passwd.c b/lib/libssl/src/apps/passwd.c index 5ac01859c4e..bc77b495403 100644 --- a/lib/libssl/src/apps/passwd.c +++ b/lib/libssl/src/apps/passwd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: passwd.c,v 1.21 2014/06/12 15:49:27 deraadt Exp $ */ +/* $OpenBSD: passwd.c,v 1.22 2014/07/12 17:54:31 jsing Exp $ */ #if defined OPENSSL_NO_MD5 #define NO_MD5CRYPT_1 @@ -72,9 +72,6 @@ passwd_main(int argc, char **argv) int usecrypt = 0, use1 = 0, useapr1 = 0; size_t pw_maxlen = 0; - if (!load_config(bio_err, NULL)) - goto err; - out = BIO_new(BIO_s_file()); if (out == NULL) goto err; diff --git a/lib/libssl/src/apps/pkcs12.c b/lib/libssl/src/apps/pkcs12.c index 0e4bfbd8956..35a5dd5bcc2 100644 --- a/lib/libssl/src/apps/pkcs12.c +++ b/lib/libssl/src/apps/pkcs12.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pkcs12.c,v 1.36 2014/07/09 21:10:06 tedu Exp $ */ +/* $OpenBSD: pkcs12.c,v 1.37 2014/07/12 17:54:31 jsing Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project. */ @@ -134,9 +134,6 @@ pkcs12_main(int argc, char **argv) enc = EVP_des_ede3_cbc(); - if (!load_config(bio_err, NULL)) - goto end; - args = argv + 1; while (*args) { diff --git a/lib/libssl/src/apps/pkcs7.c b/lib/libssl/src/apps/pkcs7.c index 83f1da8d3d2..2e3377537b0 100644 --- a/lib/libssl/src/apps/pkcs7.c +++ b/lib/libssl/src/apps/pkcs7.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pkcs7.c,v 1.19 2014/06/12 15:49:27 deraadt Exp $ */ +/* $OpenBSD: pkcs7.c,v 1.20 2014/07/12 17:54:31 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -93,9 +93,6 @@ pkcs7_main(int argc, char **argv) char *engine = NULL; #endif - if (!load_config(bio_err, NULL)) - goto end; - infile = NULL; outfile = NULL; informat = FORMAT_PEM; diff --git a/lib/libssl/src/apps/pkcs8.c b/lib/libssl/src/apps/pkcs8.c index 6a4cf99fffa..f33cd89ab10 100644 --- a/lib/libssl/src/apps/pkcs8.c +++ b/lib/libssl/src/apps/pkcs8.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pkcs8.c,v 1.19 2014/06/12 15:49:27 deraadt Exp $ */ +/* $OpenBSD: pkcs8.c,v 1.20 2014/07/12 17:54:31 jsing Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 1999-2004. */ @@ -92,9 +92,6 @@ pkcs8_main(int argc, char **argv) char *engine = NULL; #endif - if (!load_config(bio_err, NULL)) - goto end; - informat = FORMAT_PEM; outformat = FORMAT_PEM; diff --git a/lib/libssl/src/apps/pkey.c b/lib/libssl/src/apps/pkey.c index 2d4915c6e03..1769f62b0b2 100644 --- a/lib/libssl/src/apps/pkey.c +++ b/lib/libssl/src/apps/pkey.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pkey.c,v 1.9 2014/06/12 15:49:27 deraadt Exp $ */ +/* $OpenBSD: pkey.c,v 1.10 2014/07/12 17:54:31 jsing Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 2006 */ @@ -85,9 +85,6 @@ pkey_main(int argc, char **argv) #endif int ret = 1; - if (!load_config(bio_err, NULL)) - goto end; - informat = FORMAT_PEM; outformat = FORMAT_PEM; diff --git a/lib/libssl/src/apps/pkeyparam.c b/lib/libssl/src/apps/pkeyparam.c index 4e48594a3d6..6b1ce3d482d 100644 --- a/lib/libssl/src/apps/pkeyparam.c +++ b/lib/libssl/src/apps/pkeyparam.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pkeyparam.c,v 1.7 2014/06/12 15:49:27 deraadt Exp $ */ +/* $OpenBSD: pkeyparam.c,v 1.8 2014/07/12 17:54:31 jsing Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 2006 */ @@ -80,9 +80,6 @@ pkeyparam_main(int argc, char **argv) #endif int ret = 1; - if (!load_config(bio_err, NULL)) - goto end; - ERR_load_crypto_strings(); OpenSSL_add_all_algorithms(); args = argv + 1; diff --git a/lib/libssl/src/apps/pkeyutl.c b/lib/libssl/src/apps/pkeyutl.c index b8c6effac49..fa1a6639282 100644 --- a/lib/libssl/src/apps/pkeyutl.c +++ b/lib/libssl/src/apps/pkeyutl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pkeyutl.c,v 1.12 2014/06/12 15:49:27 deraadt Exp $ */ +/* $OpenBSD: pkeyutl.c,v 1.13 2014/07/12 17:54:31 jsing Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 2006. */ @@ -106,9 +106,6 @@ pkeyutl_main(int argc, char **argv) argc--; argv++; - if (!load_config(bio_err, NULL)) - goto end; - ERR_load_crypto_strings(); OpenSSL_add_all_algorithms(); diff --git a/lib/libssl/src/apps/rand.c b/lib/libssl/src/apps/rand.c index 0a886a734a6..f4a7c020fdd 100644 --- a/lib/libssl/src/apps/rand.c +++ b/lib/libssl/src/apps/rand.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rand.c,v 1.20 2014/06/12 15:49:27 deraadt Exp $ */ +/* $OpenBSD: rand.c,v 1.21 2014/07/12 17:54:31 jsing Exp $ */ /* ==================================================================== * Copyright (c) 1998-2001 The OpenSSL Project. All rights reserved. * @@ -85,9 +85,6 @@ rand_main(int argc, char **argv) char *engine = NULL; #endif - if (!load_config(bio_err, NULL)) - goto err; - badopt = 0; i = 0; while (!badopt && argv[++i] != NULL) { diff --git a/lib/libssl/src/apps/rsa.c b/lib/libssl/src/apps/rsa.c index 2a9995ed5ec..798283755fd 100644 --- a/lib/libssl/src/apps/rsa.c +++ b/lib/libssl/src/apps/rsa.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rsa.c,v 1.25 2014/07/09 21:02:35 tedu Exp $ */ +/* $OpenBSD: rsa.c,v 1.26 2014/07/12 17:54:31 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -118,9 +118,6 @@ rsa_main(int argc, char **argv) int pvk_encr = 2; - if (!load_config(bio_err, NULL)) - goto end; - infile = NULL; outfile = NULL; informat = FORMAT_PEM; diff --git a/lib/libssl/src/apps/rsautl.c b/lib/libssl/src/apps/rsautl.c index 85003780d08..966b7fe75ff 100644 --- a/lib/libssl/src/apps/rsautl.c +++ b/lib/libssl/src/apps/rsautl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rsautl.c,v 1.22 2014/07/09 21:02:35 tedu Exp $ */ +/* $OpenBSD: rsautl.c,v 1.23 2014/07/12 17:54:31 jsing Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 2000. */ @@ -107,9 +107,6 @@ rsautl_main(int argc, char **argv) argc--; argv++; - if (!load_config(bio_err, NULL)) - goto end; - ERR_load_crypto_strings(); OpenSSL_add_all_algorithms(); pad = RSA_PKCS1_PADDING; diff --git a/lib/libssl/src/apps/s_client.c b/lib/libssl/src/apps/s_client.c index ec23b927542..b3fcbf17a02 100644 --- a/lib/libssl/src/apps/s_client.c +++ b/lib/libssl/src/apps/s_client.c @@ -1,4 +1,4 @@ -/* $OpenBSD: s_client.c,v 1.66 2014/07/11 09:24:44 beck Exp $ */ +/* $OpenBSD: s_client.c,v 1.67 2014/07/12 17:54:31 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -402,9 +402,6 @@ s_client_main(int argc, char **argv) c_msg = 0; c_showcerts = 0; - if (!load_config(bio_err, NULL)) - goto end; - if (((cbuf = malloc(BUFSIZZ)) == NULL) || ((sbuf = malloc(BUFSIZZ)) == NULL) || ((mbuf = malloc(BUFSIZZ + 1)) == NULL)) { /* NUL byte */ diff --git a/lib/libssl/src/apps/s_server.c b/lib/libssl/src/apps/s_server.c index 802150a29aa..136025ce63d 100644 --- a/lib/libssl/src/apps/s_server.c +++ b/lib/libssl/src/apps/s_server.c @@ -1,4 +1,4 @@ -/* $OpenBSD: s_server.c,v 1.58 2014/07/11 09:24:44 beck Exp $ */ +/* $OpenBSD: s_server.c,v 1.59 2014/07/12 17:54:31 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -640,9 +640,6 @@ s_server_main(int argc, char *argv[]) s_server_init(); - if (!load_config(bio_err, NULL)) - goto end; - verify_depth = 0; s_nbio = 0; s_nbio_test = 0; diff --git a/lib/libssl/src/apps/smime.c b/lib/libssl/src/apps/smime.c index 927d82714e3..92e379d3e3d 100644 --- a/lib/libssl/src/apps/smime.c +++ b/lib/libssl/src/apps/smime.c @@ -1,4 +1,4 @@ -/* $OpenBSD: smime.c,v 1.26 2014/06/12 15:49:27 deraadt Exp $ */ +/* $OpenBSD: smime.c,v 1.27 2014/07/12 17:54:31 jsing Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project. */ @@ -121,9 +121,6 @@ smime_main(int argc, char **argv) args = argv + 1; ret = 1; - if (!load_config(bio_err, NULL)) - goto end; - while (!badarg && *args && *args[0] == '-') { if (!strcmp(*args, "-encrypt")) operation = SMIME_ENCRYPT; diff --git a/lib/libssl/src/apps/speed.c b/lib/libssl/src/apps/speed.c index 8ff12b27c3a..1258cc25810 100644 --- a/lib/libssl/src/apps/speed.c +++ b/lib/libssl/src/apps/speed.c @@ -1,4 +1,4 @@ -/* $OpenBSD: speed.c,v 1.50 2014/07/09 21:02:35 tedu Exp $ */ +/* $OpenBSD: speed.c,v 1.51 2014/07/12 17:54:31 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -494,9 +494,6 @@ speed_main(int argc, char **argv) ecdh_b[i] = NULL; } - if (!load_config(bio_err, NULL)) - goto end; - memset(rsa_key, 0, sizeof(rsa_key)); for (i = 0; i < RSA_NUM; i++) rsa_key[i] = NULL; diff --git a/lib/libssl/src/apps/spkac.c b/lib/libssl/src/apps/spkac.c index 96f6cd4a77e..20492bb818e 100644 --- a/lib/libssl/src/apps/spkac.c +++ b/lib/libssl/src/apps/spkac.c @@ -1,4 +1,4 @@ -/* $OpenBSD: spkac.c,v 1.19 2014/06/12 15:49:27 deraadt Exp $ */ +/* $OpenBSD: spkac.c,v 1.20 2014/07/12 17:54:31 jsing Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 1999. Based on an original idea by Massimiliano Pala * (madwolf@openca.org). @@ -97,9 +97,6 @@ spkac_main(int argc, char **argv) char *engine = NULL; #endif - if (!load_config(bio_err, NULL)) - goto end; - prog = argv[0]; argc--; argv++; diff --git a/lib/libssl/src/apps/ts.c b/lib/libssl/src/apps/ts.c index 0d42878fd77..91422428606 100644 --- a/lib/libssl/src/apps/ts.c +++ b/lib/libssl/src/apps/ts.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ts.c,v 1.17 2014/06/12 15:49:27 deraadt Exp $ */ +/* $OpenBSD: ts.c,v 1.18 2014/07/12 17:54:31 jsing Exp $ */ /* Written by Zoltan Glozik (zglozik@stones.com) for the OpenSSL * project 2002. */ @@ -156,9 +156,6 @@ ts_main(int argc, char **argv) ERR_load_crypto_strings(); - if (!load_config(bio_err, NULL)) - goto cleanup; - for (argc--, argv++; argc > 0; argc--, argv++) { if (strcmp(*argv, "-config") == 0) { if (argc-- < 1) diff --git a/lib/libssl/src/apps/verify.c b/lib/libssl/src/apps/verify.c index 4802392cb15..1fae9dd933d 100644 --- a/lib/libssl/src/apps/verify.c +++ b/lib/libssl/src/apps/verify.c @@ -1,4 +1,4 @@ -/* $OpenBSD: verify.c,v 1.24 2014/06/12 15:49:27 deraadt Exp $ */ +/* $OpenBSD: verify.c,v 1.25 2014/07/12 17:54:31 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -98,9 +98,6 @@ verify_main(int argc, char **argv) ERR_load_crypto_strings(); - if (!load_config(bio_err, NULL)) - goto end; - argc--; argv++; for (;;) { diff --git a/lib/libssl/src/apps/x509.c b/lib/libssl/src/apps/x509.c index e6b33c7a192..647aa9c0f84 100644 --- a/lib/libssl/src/apps/x509.c +++ b/lib/libssl/src/apps/x509.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x509.c,v 1.47 2014/07/09 21:02:35 tedu Exp $ */ +/* $OpenBSD: x509.c,v 1.48 2014/07/12 17:54:31 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -209,9 +209,6 @@ x509_main(int argc, char **argv) reqfile = 0; - if (!load_config(bio_err, NULL)) - goto end; - STDout = BIO_new_fp(stdout, BIO_NOCLOSE); informat = FORMAT_PEM; |