File tree Expand file tree Collapse file tree 2 files changed +28
-0
lines changed
Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -8155,4 +8155,32 @@ fn tls13_packed_handshake() {
81558155 ) ;
81568156}
81578157
8158+ #[ test]
8159+ fn large_client_hello ( ) {
8160+ let ( _, mut server) = make_pair ( KeyType :: Rsa2048 ) ;
8161+ let hello = include_bytes ! ( "data/bug2227-clienthello.bin" ) ;
8162+ let mut cursor = io:: Cursor :: new ( hello) ;
8163+ loop {
8164+ if server. read_tls ( & mut cursor) . unwrap ( ) == 0 {
8165+ break ;
8166+ }
8167+ server. process_new_packets ( ) . unwrap ( ) ;
8168+ }
8169+ }
8170+
8171+ #[ test]
8172+ fn large_client_hello_acceptor ( ) {
8173+ let mut acceptor = rustls:: server:: Acceptor :: default ( ) ;
8174+ let hello = include_bytes ! ( "data/bug2227-clienthello.bin" ) ;
8175+ let mut cursor = io:: Cursor :: new ( hello) ;
8176+ loop {
8177+ acceptor. read_tls ( & mut cursor) . unwrap ( ) ;
8178+
8179+ if let Some ( accepted) = acceptor. accept ( ) . unwrap ( ) {
8180+ println ! ( "{accepted:?}" ) ;
8181+ break ;
8182+ }
8183+ }
8184+ }
8185+
81588186const CONFIDENTIALITY_LIMIT : u64 = 1024 ;
You can’t perform that action at this time.
0 commit comments