[Spice-devel] [PATCH 6/7] reds: Check errors returned from SSL_CTX_set_cipher_list

Christophe Fergeau cfergeau at redhat.com
Wed Sep 12 07:18:00 PDT 2012


---
 server/reds.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/server/reds.c b/server/reds.c
index 2d312e9..3ed8c67 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -3301,7 +3301,9 @@ static int reds_init_ssl(void)
 
     SSL_CTX_set_session_id_context(reds->ctx, (const unsigned char *)"SPICE", 5);
     if (strlen(ssl_parameters.ciphersuite) > 0) {
-        SSL_CTX_set_cipher_list(reds->ctx, ssl_parameters.ciphersuite);
+        if (!SSL_CTX_set_cipher_list(reds->ctx, ssl_parameters.ciphersuite)) {
+            return -1;
+        }
     }
 
     openssl_thread_setup();
-- 
1.7.11.4



More information about the Spice-devel mailing list