@@ -512,10 +512,7 @@ static int quic_change_cipher_state(SSL *s, int which)
512
512
|| !tls13_hkdf_expand (s , md , s -> master_secret , server_application_traffic ,
513
513
sizeof (server_application_traffic )- 1 , hash , hashlen ,
514
514
s -> server_app_traffic_secret , hashlen , 1 )
515
- || !ssl_log_secret (s , SERVER_APPLICATION_LABEL , s -> server_app_traffic_secret , hashlen )
516
- || !tls13_hkdf_expand (s , md , s -> master_secret , resumption_master_secret ,
517
- sizeof (resumption_master_secret )- 1 , hash , hashlen ,
518
- s -> resumption_master_secret , hashlen , 1 )) {
515
+ || !ssl_log_secret (s , SERVER_APPLICATION_LABEL , s -> server_app_traffic_secret , hashlen )) {
519
516
/* SSLfatal() already called */
520
517
goto err ;
521
518
}
@@ -529,6 +526,8 @@ static int quic_change_cipher_state(SSL *s, int which)
529
526
else
530
527
s -> quic_read_level = level ;
531
528
} else {
529
+ /* is_client_write || is_server_read */
530
+
532
531
if (is_early ) {
533
532
level = ssl_encryption_early_data ;
534
533
@@ -544,6 +543,16 @@ static int quic_change_cipher_state(SSL *s, int which)
544
543
level = ssl_encryption_handshake ;
545
544
} else {
546
545
level = ssl_encryption_application ;
546
+ /*
547
+ * We also create the resumption master secret, but this time use the
548
+ * hash for the whole handshake including the Client Finished
549
+ */
550
+ if (!tls13_hkdf_expand (s , md , s -> master_secret , resumption_master_secret ,
551
+ sizeof (resumption_master_secret )- 1 , hash , hashlen ,
552
+ s -> resumption_master_secret , hashlen , 1 )) {
553
+ /* SSLfatal() already called */
554
+ goto err ;
555
+ }
547
556
}
548
557
549
558
if (s -> server )
0 commit comments