[dovecot-cvs] dovecot/src/master ssl-init.c,1.17,1.18

cras at dovecot.org cras at dovecot.org
Sun Jan 15 23:07:10 EET 2006


Update of /var/lib/cvs/dovecot/src/master
In directory talvi:/tmp/cvs-serv9367

Modified Files:
	ssl-init.c 
Log Message:
Add a note about DH parameters being generated for the first time.



Index: ssl-init.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/master/ssl-init.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- ssl-init.c	15 Jan 2006 15:24:43 -0000	1.17
+++ ssl-init.c	15 Jan 2006 21:07:07 -0000	1.18
@@ -84,10 +84,9 @@
 		}
 
 		st.st_mtime = 0;
-	}
-
-	if (st.st_size == 0) {
+	} else if (st.st_size == 0) {
 		/* broken, delete it (mostly for backwards compatibility) */
+		st.st_mtime = 0;
 		(void)unlink(set->ssl_parameters_file);
 	}
 
@@ -97,6 +96,10 @@
 		st.st_mtime + (time_t)(set->ssl_parameters_regenerate*3600);
 	if (regen_time < ioloop_time || st.st_size == 0 ||
 	    st.st_uid != master_uid || st.st_gid != getegid()) {
+		if (st.st_mtime == 0) {
+			i_info("Generating Diffie-Hellman parameters "
+			       "for the first time. This may take a while..");
+		}
 		start_generate_process(set);
 		return FALSE;
 	}



More information about the dovecot-cvs mailing list