1 @product @check_tor_leaks
4 I want Tor to work properly
5 And for that I need a reasonably accurate system clock
7 Scenario: Clock with host's time
8 Given I have started Tails from DVD without network and logged in
9 When the network is plugged
10 And I successfully configure Tor
11 Then the system clock is less than 5 minutes incorrect
13 Scenario: Clock with host's time while using bridges
14 Given I have started Tails from DVD without network and logged in
15 When the network is plugged
16 And the Tor Connection Assistant autostarts
17 And I configure some normal bridges in the Tor Connection Assistant
18 And I wait until Tor is ready
19 Then the system clock is less than 5 minutes incorrect
21 Scenario: Clock is one day in the future while using obfs4 bridges
22 Given I have started Tails from DVD without network and logged in
23 When I bump the system time with "+1 day"
24 And I capture all network traffic
25 And the network is plugged
26 And the Tor Connection Assistant autostarts
27 And I configure some obfs4 bridges in the Tor Connection Assistant in easy mode
28 And I wait until Tor is ready
29 Then the system clock is less than 5 minutes incorrect
30 And all Internet traffic has only flowed through the configured bridges or connectivity check service
33 Scenario: The system time is not synced to the hardware clock
34 Given I have started Tails from DVD without network and logged in
35 When I bump the system time with "-15 days"
36 And I warm reboot the computer
37 And the computer reboots Tails
38 Then Tails' hardware clock is close to the host system's time
41 Scenario: Anti-test: Changes to the hardware clock are kept when rebooting
42 Given I have started Tails from DVD without network and logged in
43 When I bump the hardware clock's time with "-15 days"
44 And I warm reboot the computer
45 And the computer reboots Tails
46 Then the hardware clock is still off by "-15 days"
48 Scenario: The clock is set to the source date when the hardware clock is way in the past
50 And the hardware clock is set to "01 Jan 2000 12:34:56"
51 And I start the computer
52 And the computer boots Tails
53 Then the system clock is just past Tails' source date
55 Scenario: On a clock with host's time, Tor Connection works even if time sync fails
56 Given I have started Tails from DVD without network and logged in
57 And I make sure time sync before Tor connects times out
58 When the network is plugged
59 And I successfully configure Tor
60 Then the system clock is less than 5 minutes incorrect
62 Scenario: I can manually recover from time sync failure when connecting automatically to obfs4 bridges with a clock East of UTC
63 Given I have started Tails from DVD without network and logged in
64 When I bump the system time with "+8 hours +15 minutes"
65 And all notifications have disappeared
66 And I capture all network traffic
67 And I make sure time sync before Tor connects fails
68 And the network is plugged
69 And the Tor Connection Assistant autostarts
70 When I configure the default bridges in the Tor Connection Assistant in easy mode without connecting
71 And I click "Connect to Tor"
72 And the Tor Connection Assistant fails to connect to Tor
73 # The "Fix Clock" button allows users to recover from this bug
74 Then I set the time zone in Tor Connection to "Asia/Shanghai"
75 Then the system clock is less than 20 minutes incorrect
76 When I click "Connect to Tor"
77 Then I wait until Tor is ready
78 And all Internet traffic has only flowed through the default bridges or fake connectivity check service
79 # check that htpdate has done its job
80 And the system clock is less than 5 minutes incorrect
82 Scenario: I can connect to obfs4 bridges having a clock East of UTC while hiding that I am using Tor
83 Given I have started Tails from DVD without network and logged in
84 When I bump the system time with "+8 hours +15 minutes"
85 And all notifications have disappeared
86 And I capture all network traffic
87 And the network is plugged
88 And the Tor Connection Assistant autostarts
89 # Anti-test: Users east of UTC can't connect to obfs4 bridges
90 And I configure some obfs4 bridges in the Tor Connection Assistant in hide mode without connecting
91 And I click "Connect to Tor"
92 Then the Tor Connection Assistant reports that it failed to connect
93 # The "Fix Clock" button allows users to recover from this bug
94 When I set the time zone in Tor Connection to "Asia/Shanghai"
95 Then the system clock is less than 20 minutes incorrect
96 # "Asia/Shanghai" is UTC+08:00 all year long (no DST)
97 And the displayed clock is less than 20 minutes incorrect in "+08:00"
98 When I click "Connect to Tor"
99 Then I wait until Tor is ready
100 And all Internet traffic has only flowed through the configured bridges
101 # check that htpdate has done its job
102 And the system clock is less than 5 minutes incorrect
103 And the displayed clock is less than 5 minutes incorrect in "+08:00"
105 Scenario: Time sync before Tor connects sets the same headers as the NetworkManager connectivity check
106 Given I have started Tails from DVD without network and logged in
107 And I make sure time sync before Tor connects uses a fake connectivity check service
108 And the network is plugged
110 Then the fake connectivity check service has received a new HTTP request
111 When I make NetworkManager perform a connectivity check
112 Then the fake connectivity check service has received a new HTTP request
113 And the HTTP requests received by the fake connectivity check service are identical