dovecot-2.0: login: Give a better error message if ssl_cert=path...
dovecot at dovecot.org
dovecot at dovecot.org
Mon Oct 4 16:52:30 EEST 2010
details: http://hg.dovecot.org/dovecot-2.0/rev/a508ff1db74c
changeset: 12234:a508ff1db74c
user: Timo Sirainen <tss at iki.fi>
date: Mon Oct 04 14:45:25 2010 +0100
description:
login: Give a better error message if ssl_cert=path is attempted without '<'
diffstat:
src/login-common/ssl-proxy-openssl.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diffs (16 lines):
diff -r b0e0dc5c3dd3 -r a508ff1db74c src/login-common/ssl-proxy-openssl.c
--- a/src/login-common/ssl-proxy-openssl.c Fri Oct 01 22:10:02 2010 +0100
+++ b/src/login-common/ssl-proxy-openssl.c Mon Oct 04 14:45:25 2010 +0100
@@ -964,8 +964,11 @@
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.";
}
}
More information about the dovecot-cvs
mailing list