summaryrefslogtreecommitdiffhomepage
path: root/src/cookie_test.go
diff options
context:
space:
mode:
authorMathias Hall-Andersen <mathias@hall-andersen.dk>2017-11-19 13:19:07 +0100
committerMathias Hall-Andersen <mathias@hall-andersen.dk>2017-11-19 13:19:07 +0100
commitb5ae42349c4fd88022a63006060d72b03aa83b16 (patch)
tree18fecbdba6437003f574c15eddeb75bbed9980b3 /src/cookie_test.go
parent5705a5e2efdcbbaffa5da00555b1afb3b4f9d2af (diff)
parent9ebab57c417d4fd19db6cf69f920a3adb1a1e092 (diff)
Merge branch 'source-caching'
Diffstat (limited to 'src/cookie_test.go')
-rw-r--r--src/cookie_test.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/cookie_test.go b/src/cookie_test.go
index 193a76e..d745fe7 100644
--- a/src/cookie_test.go
+++ b/src/cookie_test.go
@@ -1,7 +1,6 @@
package main
import (
- "net"
"testing"
)
@@ -25,7 +24,7 @@ func TestCookieMAC1(t *testing.T) {
// check mac1
- src, _ := net.ResolveUDPAddr("udp", "192.168.13.37:4000")
+ src := []byte{192, 168, 13, 37, 10, 10, 10}
checkMAC1 := func(msg []byte) {
generator.AddMacs(msg)
@@ -128,12 +127,12 @@ func TestCookieMAC1(t *testing.T) {
msg[5] ^= 0x20
- srcBad1, _ := net.ResolveUDPAddr("udp", "192.168.13.37:4001")
+ srcBad1 := []byte{192, 168, 13, 37, 40, 01}
if checker.CheckMAC2(msg, srcBad1) {
t.Fatal("MAC2 generation/verification failed")
}
- srcBad2, _ := net.ResolveUDPAddr("udp", "192.168.13.38:4000")
+ srcBad2 := []byte{192, 168, 13, 38, 40, 01}
if checker.CheckMAC2(msg, srcBad2) {
t.Fatal("MAC2 generation/verification failed")
}