mirror of
https://github.com/openssl/openssl.git
synced 2024-11-27 03:54:14 +08:00
QUIC SRT GEN: Minor updates
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/22599)
This commit is contained in:
parent
2db3fdb457
commit
e64ad80c72
@ -65,7 +65,7 @@ int ossl_quic_srt_gen_calculate_token(QUIC_SRT_GEN *srt_gen,
|
||||
QUIC_STATELESS_RESET_TOKEN *token)
|
||||
{
|
||||
size_t outl = 0;
|
||||
unsigned char mac[32];
|
||||
unsigned char mac[SHA256_DIGEST_LENGTH];
|
||||
|
||||
if (!EVP_MAC_init(srt_gen->mac_ctx, NULL, 0, NULL))
|
||||
return 0;
|
||||
@ -78,6 +78,7 @@ int ossl_quic_srt_gen_calculate_token(QUIC_SRT_GEN *srt_gen,
|
||||
|| outl != sizeof(mac))
|
||||
return 0;
|
||||
|
||||
memcpy(token, mac, sizeof(*token));
|
||||
assert(sizeof(mac) >= sizeof(token->token));
|
||||
memcpy(token->token, mac, sizeof(token->token));
|
||||
return 1;
|
||||
}
|
||||
|
@ -65,7 +65,7 @@ static int test_srt_gen(int idx)
|
||||
&token)))
|
||||
goto err;
|
||||
|
||||
if (!TEST_mem_eq(&token, sizeof(token),
|
||||
if (!TEST_mem_eq(token.token, sizeof(token.token),
|
||||
&t->expected, sizeof(t->expected)))
|
||||
goto err;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user