]> git.kaiwu.me - nginx.git/commitdiff
Mail: fixed error message about missing ssl_certificate_key.
authorMaxim Dounin <mdounin@mdounin.ru>
Tue, 24 Apr 2018 12:28:58 +0000 (15:28 +0300)
committerMaxim Dounin <mdounin@mdounin.ru>
Tue, 24 Apr 2018 12:28:58 +0000 (15:28 +0300)
In 51e1f047d15d, the "ssl" directive name was incorrectly hardcoded
in the error message shown when there are some SSL keys defined, but
not for all certificates.  Right approach is to use the "mode" variable,
which can be either "ssl" or "starttls".

src/mail/ngx_mail_ssl_module.c

index aebd179d0cca2bbcc9366a2d8576907be10ad39a..7cfd3b9fb52a8312b6d7384823b23bf83ee641f3 100644 (file)
@@ -350,10 +350,10 @@ ngx_mail_ssl_merge_conf(ngx_conf_t *cf, void *parent, void *child)
             ngx_log_error(NGX_LOG_EMERG, cf->log, 0,
                           "no \"ssl_certificate_key\" is defined "
                           "for certificate \"%V\" and "
-                          "the \"ssl\" directive in %s:%ui",
+                          "the \"%s\" directive in %s:%ui",
                           ((ngx_str_t *) conf->certificates->elts)
                           + conf->certificates->nelts - 1,
-                          conf->file, conf->line);
+                          mode, conf->file, conf->line);
             return NGX_CONF_ERROR;
         }