Simplify crypto select func
This commit is contained in:
parent
5023dcaa3a
commit
e3fdd4890e
|
@ -188,7 +188,6 @@ func handleEncryption(
|
|||
}
|
||||
headerEncrypted = true
|
||||
ret, err = mse.ReceiveHandshake(rw, skeys, func(provides uint32) uint32 {
|
||||
cryptoMethod = func() uint32 {
|
||||
switch {
|
||||
case policy.ForceEncryption:
|
||||
return mse.CryptoMethodRC4
|
||||
|
@ -199,8 +198,6 @@ func handleEncryption(
|
|||
default:
|
||||
return mse.DefaultCryptoSelector(provides)
|
||||
}
|
||||
}()
|
||||
return cryptoMethod
|
||||
})
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue