From 2ea7e5619e0bc0849d91bef1c3a1ae612d4bc02d Mon Sep 17 00:00:00 2001 From: RPRX <63339210+RPRX@users.noreply.github.com> Date: Tue, 13 May 2025 04:53:25 +0000 Subject: [PATCH] Fix https://github.com/XTLS/Xray-core/pull/3813#issuecomment-2874943277 --- tls.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tls.go b/tls.go index 5ee87e6..de585ed 100644 --- a/tls.go +++ b/tls.go @@ -193,8 +193,8 @@ func Server(ctx context.Context, conn net.Conn, config *Config) (*Conn, error) { } var aead cipher.AEAD if isAESGCMPreferred(hs.clientHello.cipherSuites) { - block, _ := aes.NewCipher(hs.c.AuthKey) - aead, _ = gcm.NewGCMForTLS13(block.(*fipsaes.Block)) + block, _ := fipsaes.New(hs.c.AuthKey) + aead, _ = gcm.NewGCMForTLS13(block) } else { aead, _ = chacha20poly1305.New(hs.c.AuthKey) }