Make ECDHE_PSK + AES_GCM unmatchable.

These are probably a good idea to ship so long as we have the PSK
callbacks at all, but they're not *completely* standard yet and Android
tests otherwise need updating to know about them. We don't care enough
about PSK to be in a rush to ship them, and taking them out is an easier
default action until then.

Change-Id: Ic646053d29b69a114e2efea61d593d5e912bdcd0
Reviewed-on: https://boringssl-review.googlesource.com/10225
Reviewed-by: David Benjamin <davidben@google.com>
Commit-Queue: David Benjamin <davidben@google.com>
CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
This commit is contained in:
David Benjamin 2016-08-10 18:29:12 -04:00 committed by CQ bot account: commit-bot@chromium.org
parent 79c576c0e1
commit 881f196075
2 changed files with 21 additions and 7 deletions

View File

@ -1136,13 +1136,22 @@ static void ssl_cipher_apply_rule(
if (strength_bits != SSL_CIPHER_get_bits(cp, NULL)) { if (strength_bits != SSL_CIPHER_get_bits(cp, NULL)) {
continue; continue;
} }
} else if (!(alg_mkey & cp->algorithm_mkey) || } else {
!(alg_auth & cp->algorithm_auth) || if (!(alg_mkey & cp->algorithm_mkey) ||
!(alg_enc & cp->algorithm_enc) || !(alg_auth & cp->algorithm_auth) ||
!(alg_mac & cp->algorithm_mac) || !(alg_enc & cp->algorithm_enc) ||
(min_version != 0 && !(alg_mac & cp->algorithm_mac) ||
SSL_CIPHER_get_min_version(cp) != min_version)) { (min_version != 0 && SSL_CIPHER_get_min_version(cp) != min_version)) {
continue; continue;
}
/* The following ciphers are internal implementation details of TLS 1.3
* resumption but are not yet finalized. Disable them by default until
* then. */
if (cp->id == TLS1_CK_ECDHE_PSK_WITH_AES_128_GCM_SHA256 ||
cp->id == TLS1_CK_ECDHE_PSK_WITH_AES_256_GCM_SHA384) {
continue;
}
} }
/* add the cipher if it has not been added yet. */ /* add the cipher if it has not been added yet. */

View File

@ -2269,6 +2269,11 @@ func addCipherSuiteTests() {
// CECPQ1 ciphers must be explicitly enabled. // CECPQ1 ciphers must be explicitly enabled.
flags = append(flags, "-cipher", "DEFAULT:kCECPQ1") flags = append(flags, "-cipher", "DEFAULT:kCECPQ1")
} }
if hasComponent(suite.name, "ECDHE-PSK") && hasComponent(suite.name, "GCM") {
// ECDHE_PSK AES_GCM ciphers must be explicitly enabled
// for now.
flags = append(flags, "-cipher", suite.name)
}
for _, ver := range tlsVersions { for _, ver := range tlsVersions {
for _, protocol := range []protocol{tls, dtls} { for _, protocol := range []protocol{tls, dtls} {