File tree Expand file tree Collapse file tree 1 file changed +14
-15
lines changed Expand file tree Collapse file tree 1 file changed +14
-15
lines changed Original file line number Diff line number Diff line change @@ -391,31 +391,30 @@ private void ProcessHandshakeQueue(ByteQueue queue)
391
391
if ( queue . Available < totalLength )
392
392
break ;
393
393
394
- CheckReceivedChangeCipherSpec ( mConnectionState == CS_END || type == HandshakeType . finished ) ;
395
-
396
394
/*
397
395
* RFC 2246 7.4.9. The value handshake_messages includes all handshake messages
398
396
* starting at client hello up to, but not including, this finished message.
399
397
* [..] Note: [Also,] Hello Request messages are omitted from handshake hashes.
400
398
*/
401
- switch ( type )
402
- {
403
- case HandshakeType . hello_request :
404
- break ;
405
- case HandshakeType . finished :
406
- default :
399
+ if ( HandshakeType . hello_request != type )
407
400
{
408
- TlsContext ctx = Context ;
409
- if ( type == HandshakeType . finished
410
- && this . mExpectedVerifyData == null
411
- && ctx . SecurityParameters . MasterSecret != null )
401
+ if ( HandshakeType . finished == type )
412
402
{
413
- this . mExpectedVerifyData = CreateVerifyData ( ! ctx . IsServer ) ;
403
+ CheckReceivedChangeCipherSpec ( true ) ;
404
+
405
+ TlsContext ctx = Context ;
406
+ if ( this . mExpectedVerifyData == null
407
+ && ctx . SecurityParameters . MasterSecret != null )
408
+ {
409
+ this . mExpectedVerifyData = CreateVerifyData ( ! ctx . IsServer ) ;
410
+ }
411
+ }
412
+ else
413
+ {
414
+ CheckReceivedChangeCipherSpec ( mConnectionState == CS_END ) ;
414
415
}
415
416
416
417
queue . CopyTo ( mRecordStream . HandshakeHashUpdater , totalLength ) ;
417
- break ;
418
- }
419
418
}
420
419
421
420
queue . RemoveData ( 4 ) ;
You can’t perform that action at this time.
0 commit comments