@@ -4,15 +4,15 @@ use shadow_tls::{RunningArgs, TlsAddrs, TlsExtConfig, TlsNames, V3Mode};
44mod utils;
55use utils:: * ;
66
7- // handshake: bing .com(tls1.2 only)
7+ // handshake: badssl .com(tls1.2 only)
88// data: captive.apple.com:80
99// protocol: v2
1010#[ test]
1111fn tls12_v2 ( ) {
1212 let client = RunningArgs :: Client {
1313 listen_addr : "127.0.0.1:30000" . to_string ( ) ,
1414 target_addr : "127.0.0.1:30001" . to_string ( ) ,
15- tls_names : TlsNames :: try_from ( "bing .com" ) . unwrap ( ) ,
15+ tls_names : TlsNames :: try_from ( "badssl .com" ) . unwrap ( ) ,
1616 tls_ext : TlsExtConfig :: new ( None ) ,
1717 password : "test" . to_string ( ) ,
1818 nodelay : true ,
@@ -22,7 +22,7 @@ fn tls12_v2() {
2222 let server = RunningArgs :: Server {
2323 listen_addr : "127.0.0.1:30001" . to_string ( ) ,
2424 target_addr : "captive.apple.com:80" . to_string ( ) ,
25- tls_addr : TlsAddrs :: try_from ( "bing .com" ) . unwrap ( ) ,
25+ tls_addr : TlsAddrs :: try_from ( "badssl .com" ) . unwrap ( ) ,
2626 password : "test" . to_string ( ) ,
2727 nodelay : true ,
2828 fastopen : true ,
@@ -31,15 +31,15 @@ fn tls12_v2() {
3131 test_ok ( client, server, CAPTIVE_HTTP_REQUEST , CAPTIVE_HTTP_RESP ) ;
3232}
3333
34- // handshake: bing .com(tls1.2 only)
34+ // handshake: badssl .com(tls1.2 only)
3535// data: captive.apple.com:80
3636// protocol: v3 lossy
3737#[ test]
3838fn tls12_v3_lossy ( ) {
3939 let client = RunningArgs :: Client {
4040 listen_addr : "127.0.0.1:30002" . to_string ( ) ,
4141 target_addr : "127.0.0.1:30003" . to_string ( ) ,
42- tls_names : TlsNames :: try_from ( "bing .com" ) . unwrap ( ) ,
42+ tls_names : TlsNames :: try_from ( "badssl .com" ) . unwrap ( ) ,
4343 tls_ext : TlsExtConfig :: new ( None ) ,
4444 password : "test" . to_string ( ) ,
4545 nodelay : true ,
@@ -49,7 +49,7 @@ fn tls12_v3_lossy() {
4949 let server = RunningArgs :: Server {
5050 listen_addr : "127.0.0.1:30003" . to_string ( ) ,
5151 target_addr : "captive.apple.com:80" . to_string ( ) ,
52- tls_addr : TlsAddrs :: try_from ( "bing .com" ) . unwrap ( ) ,
52+ tls_addr : TlsAddrs :: try_from ( "badssl .com" ) . unwrap ( ) ,
5353 password : "test" . to_string ( ) ,
5454 nodelay : true ,
5555 fastopen : true ,
@@ -58,7 +58,7 @@ fn tls12_v3_lossy() {
5858 utils:: test_ok ( client, server, CAPTIVE_HTTP_REQUEST , CAPTIVE_HTTP_RESP ) ;
5959}
6060
61- // handshake: bing .com(tls1.2 only)
61+ // handshake: badssl .com(tls1.2 only)
6262// data: captive.apple.com:80
6363// protocol: v3 strict
6464// v3 strict cannot work with tls1.2, so it must fail
@@ -68,7 +68,7 @@ fn tls12_v3_strict() {
6868 let client = RunningArgs :: Client {
6969 listen_addr : "127.0.0.1:30004" . to_string ( ) ,
7070 target_addr : "127.0.0.1:30005" . to_string ( ) ,
71- tls_names : TlsNames :: try_from ( "bing .com" ) . unwrap ( ) ,
71+ tls_names : TlsNames :: try_from ( "badssl .com" ) . unwrap ( ) ,
7272 tls_ext : TlsExtConfig :: new ( None ) ,
7373 password : "test" . to_string ( ) ,
7474 nodelay : true ,
@@ -78,7 +78,7 @@ fn tls12_v3_strict() {
7878 let server = RunningArgs :: Server {
7979 listen_addr : "127.0.0.1:30005" . to_string ( ) ,
8080 target_addr : "captive.apple.com:80" . to_string ( ) ,
81- tls_addr : TlsAddrs :: try_from ( "bing .com" ) . unwrap ( ) ,
81+ tls_addr : TlsAddrs :: try_from ( "badssl .com" ) . unwrap ( ) ,
8282 password : "test" . to_string ( ) ,
8383 nodelay : true ,
8484 fastopen : true ,
@@ -87,8 +87,8 @@ fn tls12_v3_strict() {
8787 utils:: test_ok ( client, server, CAPTIVE_HTTP_REQUEST , CAPTIVE_HTTP_RESP ) ;
8888}
8989
90- // handshake: bing .com(tls1.2 only)
91- // data: bing .com:443
90+ // handshake: badssl .com(tls1.2 only)
91+ // data: badssl .com:443
9292// protocol: v2
9393// Note: v2 can not defend against hijack attack.
9494// Here hijack means directly connect to the handshake server.
@@ -98,8 +98,8 @@ fn tls12_v3_strict() {
9898fn tls12_v2_hijack ( ) {
9999 let client = RunningArgs :: Client {
100100 listen_addr : "127.0.0.1:30006" . to_string ( ) ,
101- target_addr : "bing .com:443" . to_string ( ) ,
102- tls_names : TlsNames :: try_from ( "bing .com" ) . unwrap ( ) ,
101+ target_addr : "badssl .com:443" . to_string ( ) ,
102+ tls_names : TlsNames :: try_from ( "badssl .com" ) . unwrap ( ) ,
103103 tls_ext : TlsExtConfig :: new ( None ) ,
104104 password : "test" . to_string ( ) ,
105105 nodelay : true ,
@@ -109,7 +109,7 @@ fn tls12_v2_hijack() {
109109 test_hijack ( client) ;
110110}
111111
112- // handshake: bing .com(tls1.2 only)
112+ // handshake: badssl .com(tls1.2 only)
113113// data: captive.apple.com:80
114114// protocol: v3 lossy
115115// (v3 strict can not work with tls1.2)
@@ -121,8 +121,8 @@ fn tls12_v2_hijack() {
121121fn tls12_v3_lossy_hijack ( ) {
122122 let client = RunningArgs :: Client {
123123 listen_addr : "127.0.0.1:30007" . to_string ( ) ,
124- target_addr : "bing .com:443" . to_string ( ) ,
125- tls_names : TlsNames :: try_from ( "bing .com" ) . unwrap ( ) ,
124+ target_addr : "badssl .com:443" . to_string ( ) ,
125+ tls_names : TlsNames :: try_from ( "badssl .com" ) . unwrap ( ) ,
126126 tls_ext : TlsExtConfig :: new ( None ) ,
127127 password : "test" . to_string ( ) ,
128128 nodelay : true ,
0 commit comments