From bad8463bd4680acae23b3250b1e41ab258892d4c Mon Sep 17 00:00:00 2001 From: gVisor bot Date: Mon, 30 Aug 2021 00:15:57 +0800 Subject: [PATCH] Fix: ssr auth aes128 udp hmac verify --- transport/ssr/protocol/auth_aes128_sha1.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transport/ssr/protocol/auth_aes128_sha1.go b/transport/ssr/protocol/auth_aes128_sha1.go index 65bcd741..fab9d008 100644 --- a/transport/ssr/protocol/auth_aes128_sha1.go +++ b/transport/ssr/protocol/auth_aes128_sha1.go @@ -152,7 +152,7 @@ func (a *authAES128) Encode(buf *bytes.Buffer, b []byte) error { } func (a *authAES128) DecodePacket(b []byte) ([]byte, error) { - if !bytes.Equal(a.hmac(a.Key, b[:len(b)-4])[:4], b[len(b)-4:]) { + if !bytes.Equal(a.hmac(a.userKey, b[:len(b)-4])[:4], b[len(b)-4:]) { return nil, errAuthAES128ChksumError } return b[:len(b)-4], nil