dovecot-2.2: lib-ssl-iostream: Don't crash if protocols setting ...

dovecot at dovecot.org dovecot at dovecot.org
Sun Aug 12 08:36:13 EEST 2012


details:   http://hg.dovecot.org/dovecot-2.2/rev/ed07971b21ea
changeset: 14879:ed07971b21ea
user:      Timo Sirainen <tss at iki.fi>
date:      Sun Aug 12 08:36:06 2012 +0300
description:
lib-ssl-iostream: Don't crash if protocols setting is NULL.

diffstat:

 src/lib-ssl-iostream/iostream-openssl-context.c |  4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diffs (15 lines):

diff -r c6fa56ce8860 -r ed07971b21ea src/lib-ssl-iostream/iostream-openssl-context.c
--- a/src/lib-ssl-iostream/iostream-openssl-context.c	Sun Aug 12 08:35:29 2012 +0300
+++ b/src/lib-ssl-iostream/iostream-openssl-context.c	Sun Aug 12 08:36:06 2012 +0300
@@ -352,8 +352,10 @@
 			ssl_iostream_error());
 		return -1;
 	}
-	SSL_CTX_set_options(ctx->ssl_ctx,
+	if (ctx->set->protocols != NULL) {
+		SSL_CTX_set_options(ctx->ssl_ctx,
 			    openssl_get_protocol_options(ctx->set->protocols));
+	}
 
 	if (set->cert != NULL &&
 	    ssl_ctx_use_certificate_chain(ctx->ssl_ctx, set->cert) < 0) {


More information about the dovecot-cvs mailing list