1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-06-25 17:05:23 +00:00

fix build break in shadowsocks

This commit is contained in:
Darien Raymond 2018-11-02 21:35:59 +01:00
parent f7b96507f9
commit 18ddde4fd4
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169

View File

@ -83,7 +83,7 @@ func ReadTCPSession(user *protocol.MemoryUser, reader io.Reader) (*protocol.Requ
if request.Option.Has(RequestOptionOneTimeAuth) {
actualAuth := make([]byte, AuthSize)
authenticator.Authenticate(buffer.Bytes())(actualAuth)
authenticator.Authenticate(buffer.Bytes(), actualAuth)
_, err := buffer.ReadFullFrom(br, AuthSize)
if err != nil {
@ -261,7 +261,7 @@ func DecodeUDPPacket(user *protocol.MemoryUser, payload *buf.Buffer) (*protocol.
authenticator := NewAuthenticator(HeaderKeyGenerator(account.Key, iv))
actualAuth := make([]byte, AuthSize)
common.Must2(authenticator.Authenticate(payload.BytesTo(payloadLen))(actualAuth))
authenticator.Authenticate(payload.BytesTo(payloadLen), actualAuth)
if !bytes.Equal(actualAuth, authBytes) {
return nil, nil, newError("invalid OTA")
}