@@ -24,7 +24,7 @@ select STDERR; $| = 1;
24
24
select STDOUT ; $| = 1;
25
25
26
26
my $t = Test::Nginx-> new()-> has(qw/ http http_v3 cryptx/ )
27
- -> has_daemon(' openssl' )-> plan(5 )
27
+ -> has_daemon(' openssl' )-> plan(6 )
28
28
-> write_file_expand(' nginx.conf' , <<'EOF' );
29
29
30
30
%%TEST_GLOBALS%%
@@ -84,7 +84,8 @@ local $TODO = 'no TLSv1.3 sessions in LibreSSL' if $t->has_module('LibreSSL');
84
84
85
85
my $psk_list = $s -> {psk_list };
86
86
87
- $s = Test::Nginx::HTTP3-> new(8980, psk_list => $psk_list , early_data => {});
87
+ $s = Test::Nginx::HTTP3-> new(8980, psk_list => $psk_list , early_data => {},
88
+ start_chain => 1);
88
89
89
90
TODO: {
90
91
local $TODO = ' no 0-RTT in OpenSSL compat layer'
@@ -99,7 +100,19 @@ is($frame->{headers}->{'x-early'}, '1', 'reused session is early');
99
100
100
101
}
101
102
103
+ $s -> send_chain();
104
+
102
105
$frames = $s -> read (all => [{ sid => $s -> new_stream(), fin => 1 }]);
106
+
107
+ TODO: {
108
+ local $TODO = ' not yet'
109
+ if $t -> has_version(' 1.27.1' ) && !$t -> has_version(' 1.27.4' );
110
+
111
+ ($frame ) = grep { $_ -> {type } eq " HANDSHAKE_DONE" } @$frames ;
112
+ ok($frame , ' 1rtt after discarding 0rtt' );
113
+
114
+ }
115
+
103
116
($frame ) = grep { $_ -> {type } eq " HEADERS" } @$frames ;
104
117
is($frame -> {headers }-> {' x-session' }, ' r' , ' reused session 1rtt' );
105
118
is($frame -> {headers }-> {' x-early' }, undef , ' reused session not early' );
0 commit comments