Skip to content
Snippets Groups Projects
Commit 62057625 authored by Yawning Angel's avatar Yawning Angel
Browse files

Use the correct epoch hour when crafting the obfs4 server ntor response.

It's supposed to use the one derived from the client's handshake
(assuming the clock skew is within acceptable limits), but it was using
the one based off the current system time.
parent a7a2575c
No related branches found
No related tags found
No related merge requests found
......@@ -2,6 +2,8 @@ Changes in version 0.0.7 - UNRELEASED:
- Support configuring the obfs4 IAT parameter as the sole
ServerTransportOption on bridges, and correctly checkpoint the argument
to the state file.
- Correctly use the derived epoch hour when generating the server obfs4
ntor handshake response to be more tollerant of clock skew.
Changes in version 0.0.6 - 2016-01-25:
- Delay transport factory initialization till after logging has been
......
......@@ -356,8 +356,7 @@ func (hs *serverHandshake) generateHandshake() ([]byte, error) {
// Calculate and write the MAC.
hs.mac.Reset()
hs.mac.Write(buf.Bytes())
hs.epochHour = []byte(strconv.FormatInt(getEpochHour(), 10))
hs.mac.Write(hs.epochHour)
hs.mac.Write(hs.epochHour) // Set in hs.parseClientHandshake()
buf.Write(hs.mac.Sum(nil)[:macLength])
return buf.Bytes(), nil
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment