@@ -505,10 +505,7 @@ static int quic_change_cipher_state(SSL *s, int which)
505
505
|| !tls13_hkdf_expand (s , md , s -> master_secret , server_application_traffic ,
506
506
sizeof (server_application_traffic )- 1 , hash , hashlen ,
507
507
s -> server_app_traffic_secret , hashlen , 1 )
508
- || !ssl_log_secret (s , SERVER_APPLICATION_LABEL , s -> server_app_traffic_secret , hashlen )
509
- || !tls13_hkdf_expand (s , md , s -> master_secret , resumption_master_secret ,
510
- sizeof (resumption_master_secret )- 1 , hash , hashlen ,
511
- s -> resumption_master_secret , hashlen , 1 )) {
508
+ || !ssl_log_secret (s , SERVER_APPLICATION_LABEL , s -> server_app_traffic_secret , hashlen )) {
512
509
/* SSLfatal() already called */
513
510
goto err ;
514
511
}
@@ -522,6 +519,8 @@ static int quic_change_cipher_state(SSL *s, int which)
522
519
else
523
520
s -> quic_read_level = level ;
524
521
} else {
522
+ /* is_client_write || is_server_read */
523
+
525
524
if (is_early ) {
526
525
level = ssl_encryption_early_data ;
527
526
@@ -537,6 +536,16 @@ static int quic_change_cipher_state(SSL *s, int which)
537
536
level = ssl_encryption_handshake ;
538
537
} else {
539
538
level = ssl_encryption_application ;
539
+ /*
540
+ * We also create the resumption master secret, but this time use the
541
+ * hash for the whole handshake including the Client Finished
542
+ */
543
+ if (!tls13_hkdf_expand (s , md , s -> master_secret , resumption_master_secret ,
544
+ sizeof (resumption_master_secret )- 1 , hash , hashlen ,
545
+ s -> resumption_master_secret , hashlen , 1 )) {
546
+ /* SSLfatal() already called */
547
+ goto err ;
548
+ }
540
549
}
541
550
542
551
if (s -> server )
0 commit comments