From: Timo Sirainen Date: Mon, 4 Oct 2010 13:45:25 +0000 (+0100) Subject: login: Give a better error message if ssl_cert=path is attempted without '<' X-Git-Tag: 2.0.6~102 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2a5b41c5b00a809fe753e1ee6fcc762e1b1a1a82;p=thirdparty%2Fdovecot%2Fcore.git login: Give a better error message if ssl_cert=path is attempted without '<' --- diff --git a/src/login-common/ssl-proxy-openssl.c b/src/login-common/ssl-proxy-openssl.c index 7f71dcc52b..aeabe5b559 100644 --- a/src/login-common/ssl-proxy-openssl.c +++ b/src/login-common/ssl-proxy-openssl.c @@ -964,8 +964,11 @@ static const char *ssl_proxy_get_use_certificate_error(const char *cert) else if (is_pem_key(cert)) { return "The file contains a private key " "(you've mixed ssl_cert and ssl_key settings)"; + } else if (strchr(cert, '\n') == NULL) { + return t_strdup_printf("There is no valid PEM certificate. " + "(You probably forgot '<' from ssl_cert=<%s)", cert); } else { - return "There is no certificate."; + return "There is no valid PEM certificate."; } }