Commit 5352fae6 authored by Max Lv's avatar Max Lv

Check deprecated ciphers (#2651)

parent e51f1779
......@@ -38,6 +38,7 @@ cargo {
profile = findProperty("CARGO_PROFILE")?.toString() ?: currentFlavor
extraCargoBuildArguments = listOf("--bin", libname!!)
featureSpec.noDefaultBut(arrayOf(
"stream-cipher",
"logging",
"local-flow-stat",
"local-dns"))
......
......@@ -53,6 +53,13 @@ class ProxyInstance(val profile: Profile, private val route: String = profile.ro
throw UnknownHostException().initCause(e)
}?.hostAddress ?: throw UnknownHostException()
}
// check the crypto
if (profile.method == "xchacha20-ietf-poly1305") {
throw IllegalArgumentException("cipher xchacha20-ietf-poly1305 is deprecated.")
}
if (profile.method == "aes-192-gcm") {
throw IllegalArgumentException("cipher aes-192-gcm is deprecated.")
}
}
/**
......
......@@ -4,11 +4,14 @@
<item>NONE</item>
<item>RC4-MD5</item>
<item>AES-128-CFB</item>
<item>AES-192-CFB</item>
<item>AES-256-CFB</item>
<item>AES-128-CTR</item>
<item>AES-192-CTR</item>
<item>AES-256-CTR</item>
<item>BF-CFB</item>
<item>CAMELLIA-128-CFB</item>
<item>CAMELLIA-192-CFB</item>
<item>CAMELLIA-256-CFB</item>
<item>SALSA20</item>
<item>CHACHA20</item>
......@@ -22,11 +25,14 @@
<item>none</item>
<item>rc4-md5</item>
<item>aes-128-cfb</item>
<item>aes-192-cfb</item>
<item>aes-256-cfb</item>
<item>aes-128-ctr</item>
<item>aes-192-ctr</item>
<item>aes-256-ctr</item>
<item>bf-cfb</item>
<item>camellia-128-cfb</item>
<item>camellia-192-cfb</item>
<item>camellia-256-cfb</item>
<item>salsa20</item>
<item>chacha20</item>
......
Subproject commit 7bf6d320a743147d165c3ff1a8d5d1992db3e970
Subproject commit 9000b31ffb9805324719ff5ba57c9338e357d1f0
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment