mirror of
https://github.com/XTLS/REALITY.git
synced 2025-08-22 14:38:35 +00:00
This commit is contained in:
parent
f07c896f71
commit
2ea7e5619e
4
tls.go
4
tls.go
@ -193,8 +193,8 @@ func Server(ctx context.Context, conn net.Conn, config *Config) (*Conn, error) {
|
|||||||
}
|
}
|
||||||
var aead cipher.AEAD
|
var aead cipher.AEAD
|
||||||
if isAESGCMPreferred(hs.clientHello.cipherSuites) {
|
if isAESGCMPreferred(hs.clientHello.cipherSuites) {
|
||||||
block, _ := aes.NewCipher(hs.c.AuthKey)
|
block, _ := fipsaes.New(hs.c.AuthKey)
|
||||||
aead, _ = gcm.NewGCMForTLS13(block.(*fipsaes.Block))
|
aead, _ = gcm.NewGCMForTLS13(block)
|
||||||
} else {
|
} else {
|
||||||
aead, _ = chacha20poly1305.New(hs.c.AuthKey)
|
aead, _ = chacha20poly1305.New(hs.c.AuthKey)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user