# HG changeset patch # User Sergey Kandaurov # Date 1686912851 -14400 # Node ID afbf4c06c0149c0069055eeaa48d3d0f84f5d183 # Parent 032ccd3118cbd5a4cc170a12667cc31ddd279c1f Tests: fixed croak sending QUIC Initial with CCM cipher negotiated. diff --git a/lib/Test/Nginx/HTTP3.pm b/lib/Test/Nginx/HTTP3.pm --- a/lib/Test/Nginx/HTTP3.pm +++ b/lib/Test/Nginx/HTTP3.pm @@ -1762,9 +1762,9 @@ sub encrypt_aead { my $nonce = substr(pack("x12") . pack("N", $pn), -12) ^ $self->{keys}[$level]{w}{iv}; my ($f, @args) = encrypt_aead_f($level, $self->{cipher}); + my @taglen = ($level != 0 && $self->{cipher} == 0x1304) ? 16 : (); my ($ciphertext, $tag) = $f->(@args, - $self->{keys}[$level]{w}{key}, $nonce, $ad, - $self->{cipher} == 0x1304 ? 16 : (), $payload); + $self->{keys}[$level]{w}{key}, $nonce, $ad, @taglen, $payload); my $sample = substr($ciphertext . $tag, 0, 16); $ad = $self->encrypt_ad($ad, $self->{keys}[$level]{w}{hp},