Fix for TLS record tampering bug CVE-2013-4353
[openssl.git] / ssl / s3_both.c
index 1e5dcab7d30520c00cc60d55d6ebd6e2ae3e6e6c..53b9390fdd3af30d0576825d0b0e19bc5d290ac6 100644 (file)
@@ -210,7 +210,11 @@ static void ssl3_take_mac(SSL *s)
        {
        const char *sender;
        int slen;
-
+       /* If no new cipher setup return immediately: other functions will
+        * set the appropriate error.
+        */
+       if (s->s3->tmp.new_cipher == NULL)
+               return;
        if (s->state & SSL_ST_CONNECT)
                {
                sender=s->method->ssl3_enc->server_finished_label;