diff options
author | Nils Larsch <nils@openssl.org> | 2005-09-02 12:44:59 +0000 |
---|---|---|
committer | Nils Larsch <nils@openssl.org> | 2005-09-02 12:44:59 +0000 |
commit | 33ac8b31392c33d78a5b8d6188fe8e26f94544df (patch) | |
tree | fd82227360c32c955161f7a19c742a34a931d304 /apps | |
parent | 244847591f359be542d8d0fe995c349103cc7ac6 (diff) |
don't try to load cert/key when the "-nocert" option is set
Diffstat (limited to 'apps')
-rw-r--r-- | apps/s_server.c | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/apps/s_server.c b/apps/s_server.c index 41b9736025..8c6fcc240a 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) |