summaryrefslogtreecommitdiffstats
path: root/net/third_party/nss/patches/ignorechangecipherspec.patch
blob: b8e176d4521f14aa600994aae42246dc35829d2d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Index: ssl/ssl3con.c
===================================================================
--- ssl/ssl3con.c	(revision 274314)
+++ ssl/ssl3con.c	(working copy)
@@ -3621,6 +3621,14 @@
 		SSL_GETPID(), ss->fd));
 
     if (ws != wait_change_cipher) {
+	if (IS_DTLS(ss)) {
+	    /* Ignore this because it's out of order. */
+	    SSL_TRC(3, ("%d: SSL3[%d]: discard out of order "
+			"DTLS change_cipher_spec",
+			SSL_GETPID(), ss->fd));
+	    buf->len = 0;
+	    return SECSuccess;
+	}
 	(void)SSL3_SendAlert(ss, alert_fatal, unexpected_message);
 	PORT_SetError(SSL_ERROR_RX_UNEXPECTED_CHANGE_CIPHER);
 	return SECFailure;