summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/conf/conf_sap.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/conf/conf_sap.c')
-rw-r--r--src/lib/libcrypto/conf/conf_sap.c29
1 files changed, 14 insertions, 15 deletions
diff --git a/src/lib/libcrypto/conf/conf_sap.c b/src/lib/libcrypto/conf/conf_sap.c
index 760dc2632d..bbd73df812 100644
--- a/src/lib/libcrypto/conf/conf_sap.c
+++ b/src/lib/libcrypto/conf/conf_sap.c
@@ -10,7 +10,7 @@
10 * are met: 10 * are met:
11 * 11 *
12 * 1. Redistributions of source code must retain the above copyright 12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer. 13 * notice, this list of conditions and the following disclaimer.
14 * 14 *
15 * 2. Redistributions in binary form must reproduce the above copyright 15 * 2. Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in 16 * notice, this list of conditions and the following disclaimer in
@@ -74,8 +74,9 @@
74 74
75static int openssl_configured = 0; 75static int openssl_configured = 0;
76 76
77void OPENSSL_config(const char *config_name) 77void
78 { 78OPENSSL_config(const char *config_name)
79{
79 if (openssl_configured) 80 if (openssl_configured)
80 return; 81 return;
81 82
@@ -86,26 +87,24 @@ void OPENSSL_config(const char *config_name)
86#endif 87#endif
87 /* Add others here? */ 88 /* Add others here? */
88 89
89
90 ERR_clear_error(); 90 ERR_clear_error();
91 if (CONF_modules_load_file(NULL, config_name, 91 if (CONF_modules_load_file(NULL, config_name,
92 CONF_MFLAGS_DEFAULT_SECTION|CONF_MFLAGS_IGNORE_MISSING_FILE) <= 0) 92 CONF_MFLAGS_DEFAULT_SECTION|CONF_MFLAGS_IGNORE_MISSING_FILE) <= 0) {
93 {
94 BIO *bio_err; 93 BIO *bio_err;
95 ERR_load_crypto_strings(); 94 ERR_load_crypto_strings();
96 if ((bio_err=BIO_new_fp(stderr, BIO_NOCLOSE)) != NULL) 95 if ((bio_err = BIO_new_fp(stderr, BIO_NOCLOSE)) != NULL) {
97 { 96 BIO_printf(bio_err, "Auto configuration failed\n");
98 BIO_printf(bio_err,"Auto configuration failed\n");
99 ERR_print_errors(bio_err); 97 ERR_print_errors(bio_err);
100 BIO_free(bio_err); 98 BIO_free(bio_err);
101 }
102 exit(1);
103 } 99 }
100 exit(1);
101 }
104 102
105 return; 103 return;
106 } 104}
107 105
108void OPENSSL_no_config() 106void
109 { 107OPENSSL_no_config()
108{
110 openssl_configured = 1; 109 openssl_configured = 1;
111 } 110}