0
0
mirror of https://github.com/XTLS/REALITY.git synced 2025-08-22 14:38:35 +00:00
RPRX 2025-05-13 04:53:25 +00:00 committed by GitHub
parent f07c896f71
commit 2ea7e5619e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

4
tls.go
View File

@ -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)
}