[dovecot-cvs] dovecot/src/login-common main.c, 1.20, 1.21 ssl-proxy-gnutls.c, 1.9, 1.10 ssl-proxy-openssl.c, 1.26, 1.27 ssl-proxy.c, 1.4, 1.5

cras at dovecot.org cras at dovecot.org
Fri Oct 1 17:41:19 EEST 2004


Update of /var/lib/cvs/dovecot/src/login-common
In directory talvi:/tmp/cvs-serv15603

Modified Files:
	main.c ssl-proxy-gnutls.c ssl-proxy-openssl.c ssl-proxy.c 
Log Message:
Show clear error messages if --ssl is tried to be used but it's not
builtin/enabled.



Index: main.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/login-common/main.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- main.c	27 Sep 2004 15:58:56 -0000	1.20
+++ main.c	1 Oct 2004 14:41:16 -0000	1.21
@@ -281,7 +281,7 @@
 			if (strcmp(argv[i], "--ssl") == 0) {
 				fd = ssl_proxy_new(fd, &ip, &proxy);
 				if (fd == -1)
-					i_fatal("SSL initialization failed");
+					return 1;
 			} else if (strncmp(argv[i], "--group=", 8) != 0)
 				i_fatal("Unknown parameter: %s", argv[i]);
 		}

Index: ssl-proxy-gnutls.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/login-common/ssl-proxy-gnutls.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- ssl-proxy-gnutls.c	3 May 2004 18:01:22 -0000	1.9
+++ ssl-proxy-gnutls.c	1 Oct 2004 14:41:16 -0000	1.10
@@ -312,8 +312,10 @@
 	gnutls_session session;
 	int sfd[2];
 
-	if (!ssl_initialized)
+	if (!ssl_initialized) {
+		i_error("SSL support not enabled in configuration");
 		return -1;
+	}
 
 	session = initialize_state();
 	gnutls_transport_set_ptr(session, fd);

Index: ssl-proxy-openssl.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/login-common/ssl-proxy-openssl.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- ssl-proxy-openssl.c	15 Sep 2004 13:20:17 -0000	1.26
+++ ssl-proxy-openssl.c	1 Oct 2004 14:41:16 -0000	1.27
@@ -319,8 +319,10 @@
 
 	*proxy_r = NULL;
 
-	if (!ssl_initialized)
+	if (!ssl_initialized) {
+		i_error("SSL support not enabled in configuration");
 		return -1;
+	}
 
 	ssl = SSL_new(ssl_ctx);
 	if (ssl == NULL) {

Index: ssl-proxy.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/login-common/ssl-proxy.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- ssl-proxy.c	29 Jun 2004 09:29:55 -0000	1.4
+++ ssl-proxy.c	1 Oct 2004 14:41:16 -0000	1.5
@@ -12,6 +12,7 @@
 int ssl_proxy_new(int fd __attr_unused__, struct ip_addr *ip __attr_unused__,
 		  struct ssl_proxy **proxy_r __attr_unused__)
 {
+	i_error("Dovecot wasn't built with SSL support");
 	return -1;
 }
 



More information about the dovecot-cvs mailing list