2
0
mirror of synced 2025-02-23 06:08:07 +00:00

mse: Make plaintext mode the default when protocol header encryption is in use

This commit is contained in:
Matt Joiner 2017-09-15 12:54:29 +10:00
parent 5d3ee0a531
commit 7fdc750166

View File

@ -563,10 +563,10 @@ func sliceIter(skeys [][]byte) SecretKeyIter {
type SecretKeyIter func(callback func(skey []byte) (more bool))
func DefaultCryptoSelector(provided uint32) uint32 {
if provided&CryptoMethodRC4 != 0 {
return CryptoMethodRC4
if provided&CryptoMethodPlaintext != 0 {
return CryptoMethodPlaintext
}
return CryptoMethodPlaintext
return CryptoMethodRC4
}
type CryptoSelector func(uint32) uint32