Compare commits

...

3 Commits

Author SHA1 Message Date
Adam Langley b8cbbec76b Don't False Start with DHE.
BUG=460271

Change-Id: Ic233511114012149e4a1074470c16bd9f701cf5a
Reviewed-on: https://boringssl-review.googlesource.com/4192
Reviewed-by: Adam Langley <agl@google.com>
2015-04-06 10:46:44 -07:00
Adam Langley 367545d0b4 Don't set NEON_FUNCTIONAL in the getauxval path.
NEON_FUNCTIONAL is set by default in crypto.c. Chromium calls
|CRYPTO_set_NEON_functional| before |SSL_library_init| and thus the
getauxval path for CPU-feature detection was resetting the functional
flag, even on broken processors.

This change means that, apart from the default, only
|CRYPTO_set_NEON_functional| will change the NEON_FUNCTIONAL flag.

BUG=469511

Change-Id: I3d4dbbd9f4a5e33539f8559f90289e706ad17451
Reviewed-on: https://boringssl-review.googlesource.com/4170
Reviewed-by: David Benjamin <davidben@chromium.org>
Reviewed-by: Adam Langley <agl@google.com>
2015-03-31 12:14:58 -07:00
Adam Langley 938e03ed17 Switch an assert back to a check.
The assert was supposed to be *added* in fcf25833 but instead replaced
the check.

BUG=465557

Change-Id: I0d3db5038515021e5bdd1ccb9ff08d4f78552621
Reviewed-on: https://boringssl-review.googlesource.com/3850
Reviewed-by: David Benjamin <davidben@chromium.org>
Reviewed-by: Adam Langley <agl@google.com>
2015-03-09 19:22:09 -07:00
3 changed files with 7 additions and 6 deletions
+1 -1
View File
@@ -168,7 +168,7 @@ void OPENSSL_cpuid_setup(void) {
}
#endif
OPENSSL_armcap_P |= ARMV7_NEON | ARMV7_NEON_FUNCTIONAL;
OPENSSL_armcap_P |= ARMV7_NEON;
if (hwcap & kAES) {
OPENSSL_armcap_P |= ARMV8_AES;
+4 -1
View File
@@ -201,7 +201,10 @@ int ssl3_read_n(SSL *s, int n, int max, int extend) {
rb->offset = len + align;
}
assert(n <= (int)(rb->len - rb->offset));
if (n > (int)(rb->len - rb->offset)) {
OPENSSL_PUT_ERROR(SSL, ssl3_read_n, ERR_R_INTERNAL_ERROR);
return -1;
}
if (!s->read_ahead) {
/* ignore max parameter */
+2 -4
View File
@@ -2895,14 +2895,12 @@ void SSL_get_structure_sizes(size_t *ssl_size, size_t *ssl_ctx_size,
int ssl3_can_false_start(const SSL *s) {
const SSL_CIPHER *const cipher = SSL_get_current_cipher(s);
/* False Start only for TLS 1.2 with a forward-secure, AEAD cipher and ALPN or
* NPN. */
/* False Start only for TLS 1.2 with an ECDHE+AEAD cipher and ALPN or NPN. */
return !SSL_IS_DTLS(s) &&
SSL_version(s) >= TLS1_2_VERSION &&
(s->s3->alpn_selected || s->s3->next_proto_neg_seen) &&
cipher != NULL &&
(cipher->algorithm_mkey == SSL_kEDH ||
cipher->algorithm_mkey == SSL_kEECDH) &&
cipher->algorithm_mkey == SSL_kEECDH &&
(cipher->algorithm_enc == SSL_AES128GCM ||
cipher->algorithm_enc == SSL_AES256GCM ||
cipher->algorithm_enc == SSL_CHACHA20POLY1305);