Skip to content

Commit

Permalink
Add client early traffic secret storage
Browse files Browse the repository at this point in the history
  • Loading branch information
tmshort committed Aug 30, 2019
1 parent 1b787ae commit f550eca
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions ssl/ssl_locl.h
Original file line number Diff line number Diff line change
Expand Up @@ -1360,6 +1360,7 @@ struct ssl_st {
unsigned char server_app_traffic_secret[EVP_MAX_MD_SIZE];
unsigned char client_hand_traffic_secret[EVP_MAX_MD_SIZE];
unsigned char server_hand_traffic_secret[EVP_MAX_MD_SIZE];
unsigned char client_early_traffic_secret[EVP_MAX_MD_SIZE];
unsigned char exporter_master_secret[EVP_MAX_MD_SIZE];
unsigned char early_exporter_master_secret[EVP_MAX_MD_SIZE];
EVP_CIPHER_CTX *enc_read_ctx; /* cryptographic state */
Expand Down
2 changes: 1 addition & 1 deletion ssl/ssl_quic.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ int quic_set_encryption_secrets(SSL *ssl, OSSL_ENCRYPTION_LEVEL level)
/* secrets from the POV of the client */
switch (level) {
case ssl_encryption_early_data:
c2s_secret = ssl->early_secret;
c2s_secret = ssl->client_early_traffic_secret;
break;
case ssl_encryption_handshake:
c2s_secret = ssl->client_hand_traffic_secret;
Expand Down
2 changes: 2 additions & 0 deletions ssl/tls13_enc.c
Original file line number Diff line number Diff line change
Expand Up @@ -744,6 +744,8 @@ int tls13_change_cipher_state(SSL *s, int which)
memcpy(s->client_hand_traffic_secret, secret, hashlen);
else if (label == server_handshake_traffic)
memcpy(s->server_hand_traffic_secret, secret, hashlen);
else if (label == client_early_traffic)
memcpy(s->client_early_traffic_secret, secret, hashlen);
#endif

if (!ssl_log_secret(s, log_label, secret, hashlen)) {
Expand Down

0 comments on commit f550eca

Please sign in to comment.