Skip to content

Commit

Permalink
Removes unused parameter 'sending' from derive_secret_key_and_iv()
Browse files Browse the repository at this point in the history
CLA: trivial
  • Loading branch information
fwh-dc committed Jul 27, 2023
1 parent 81d10e6 commit b144790
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions ssl/tls13_enc.c
Original file line number Diff line number Diff line change
Expand Up @@ -334,8 +334,7 @@ int tls13_setup_key_block(SSL_CONNECTION *s)
return 1;
}

static int derive_secret_key_and_iv(SSL_CONNECTION *s, int sending,
const EVP_MD *md,
static int derive_secret_key_and_iv(SSL_CONNECTION *s, const EVP_MD *md,
const EVP_CIPHER *ciph,
const unsigned char *insecret,
const unsigned char *hash,
Expand Down Expand Up @@ -624,7 +623,7 @@ int tls13_change_cipher_state(SSL_CONNECTION *s, int which)
if (!ossl_assert(cipher != NULL))
goto err;

if (!derive_secret_key_and_iv(s, which & SSL3_CC_WRITE, md, cipher,
if (!derive_secret_key_and_iv(s, md, cipher,
insecret, hash, label, labellen, secret, key,
&keylen, iv, &ivlen, &taglen)) {
/* SSLfatal() already called */
Expand Down Expand Up @@ -723,7 +722,7 @@ int tls13_update_key(SSL_CONNECTION *s, int sending)
else
insecret = s->client_app_traffic_secret;

if (!derive_secret_key_and_iv(s, sending, md,
if (!derive_secret_key_and_iv(s, md,
s->s3.tmp.new_sym_enc, insecret, NULL,
application_traffic,
sizeof(application_traffic) - 1, secret, key,
Expand Down

0 comments on commit b144790

Please sign in to comment.