set ciphers to NULL before calling cert_cb
authorDr. Stephen Henson <steve@openssl.org>
Wed, 26 Dec 2012 14:56:40 +0000 (14:56 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Wed, 26 Dec 2012 14:56:40 +0000 (14:56 +0000)
(backport from HEAD)

ssl/s3_srvr.c

index 5218edf083df4ae19a1077f086008f89883b11d2..dc20fab790020d12a60d69fbf56085bbe353f9f2 100644 (file)
@@ -1358,6 +1358,7 @@ int ssl3_get_client_hello(SSL *s)
                        SSLerr(SSL_F_SSL3_GET_CLIENT_HELLO,SSL_R_NO_CIPHERS_PASSED);
                        goto f_err;
                        }
+               ciphers=NULL;
                /* Let cert callback update server certificates if required */
                if (s->cert->cert_cb
                        && s->cert->cert_cb(s, s->cert->cert_cb_arg) <= 0)
@@ -1366,7 +1367,6 @@ int ssl3_get_client_hello(SSL *s)
                        SSLerr(SSL_F_SSL3_GET_CLIENT_HELLO,SSL_R_CERT_CB_ERROR);
                        goto f_err;
                        }
-               ciphers=NULL;
                c=ssl3_choose_cipher(s,s->session->ciphers,
                                     SSL_get_ciphers(s));