From 581c2332d1627cc38069c99e080a91950815c642 Mon Sep 17 00:00:00 2001 From: Qian Wang Date: Wed, 7 Aug 2019 00:15:12 +0100 Subject: [PATCH] Fix obfs_test as it wasn't really testing encryptionMethod other than aes-gcm --- internal/multiplex/obfs_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/multiplex/obfs_test.go b/internal/multiplex/obfs_test.go index ff489ca..36f1c45 100644 --- a/internal/multiplex/obfs_test.go +++ b/internal/multiplex/obfs_test.go @@ -11,7 +11,7 @@ import ( "testing/quick" ) -func TestOobfs(t *testing.T) { +func TestGenerateObfs(t *testing.T) { sessionKey := make([]byte, 32) rand.Read(sessionKey) @@ -36,7 +36,7 @@ func TestOobfs(t *testing.T) { } t.Run("plain", func(t *testing.T) { - obfuscator, err := GenerateObfs(0x01, sessionKey) + obfuscator, err := GenerateObfs(0x00, sessionKey) if err != nil { t.Errorf("failed to generate obfuscator %v", err) } @@ -50,7 +50,7 @@ func TestOobfs(t *testing.T) { run(obfuscator, t) }) t.Run("chacha20-poly1305", func(t *testing.T) { - obfuscator, err := GenerateObfs(0x01, sessionKey) + obfuscator, err := GenerateObfs(0x02, sessionKey) if err != nil { t.Errorf("failed to generate obfuscator %v", err) }