From: Nils Larsch Date: Fri, 2 Sep 2005 12:27:02 +0000 (+0000) Subject: don't try to load cert/key when the "-nocert" option is set X-Git-Tag: OpenSSL_0_9_8a~31 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=3b2ba5f7fb69f83c68c81c9ab4c0164e04adb583;p=oweals%2Fopenssl.git don't try to load cert/key when the "-nocert" option is set --- diff --git a/apps/s_server.c b/apps/s_server.c index f83dd82343..0d6727ca43 100644 --- a/apps/s_server.c +++ b/apps/s_server.c @@ -832,21 +832,24 @@ bad: if (s_key_file == NULL) s_key_file = s_cert_file; - s_key = load_key(bio_err, s_key_file, s_key_format, 0, pass, e, - "server certificate private key file"); - if (!s_key) + if (nocert == 0) { - ERR_print_errors(bio_err); - goto end; - } + s_key = load_key(bio_err, s_key_file, s_key_format, 0, pass, e, + "server certificate private key file"); + if (!s_key) + { + ERR_print_errors(bio_err); + goto end; + } - s_cert = load_cert(bio_err,s_cert_file,s_cert_format, + s_cert = load_cert(bio_err,s_cert_file,s_cert_format, NULL, e, "server certificate file"); - if (!s_cert) - { - ERR_print_errors(bio_err); - goto end; + if (!s_cert) + { + ERR_print_errors(bio_err); + goto end; + } } if (s_dcert_file)