Bug 869080: ssl3_HandleHandshakeMessage should also increment
authorWan-Teh Chang <wtc@google.com>
Tue, 07 May 2013 17:18:29 -0700
changeset 10771 3962579505f0392ae8c4dcc7561b40ec6393aed4
parent 10770 340f03d45de9fe7114499cc0720621b7aa376640
child 10772 b610af8addaae00ced09ea0f0a3bf7bc416fe8ff
push id80
push userwtc@google.com
push dateWed, 08 May 2013 00:18:33 +0000
bugs869080
Bug 869080: ssl3_HandleHandshakeMessage should also increment ssl3.hs.recvMessageSeq if ssl3_Handle<XXX> returns SECWouldBlock. r=bsmith.
lib/ssl/ssl3con.c
--- a/lib/ssl/ssl3con.c
+++ b/lib/ssl/ssl3con.c
@@ -9665,17 +9665,17 @@ ssl3_HandleHandshakeMessage(sslSocket *s
         rv = ssl3_HandleFinished(ss, b, length, &hashes);
 	break;
     default:
 	(void)SSL3_SendAlert(ss, alert_fatal, unexpected_message);
 	PORT_SetError(SSL_ERROR_RX_UNKNOWN_HANDSHAKE);
 	rv = SECFailure;
     }
 
-    if (IS_DTLS(ss) && (rv == SECSuccess)) {
+    if (IS_DTLS(ss) && (rv != SECFailure)) {
 	/* Increment the expected sequence number */
 	ss->ssl3.hs.recvMessageSeq++;
     }
 
     return rv;
 }
 
 /* Called only from ssl3_HandleRecord, for each (deciphered) ssl3 record.