提交 33ac8b31 编写于 作者: N Nils Larsch

don't try to load cert/key when the "-nocert" option is set

上级 24484759
...@@ -832,21 +832,24 @@ bad: ...@@ -832,21 +832,24 @@ bad:
if (s_key_file == NULL) if (s_key_file == NULL)
s_key_file = s_cert_file; s_key_file = s_cert_file;
s_key = load_key(bio_err, s_key_file, s_key_format, 0, pass, e, if (nocert == 0)
"server certificate private key file");
if (!s_key)
{ {
ERR_print_errors(bio_err); s_key = load_key(bio_err, s_key_file, s_key_format, 0, pass, e,
goto end; "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"); NULL, e, "server certificate file");
if (!s_cert) if (!s_cert)
{ {
ERR_print_errors(bio_err); ERR_print_errors(bio_err);
goto end; goto end;
}
} }
if (s_dcert_file) if (s_dcert_file)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册