diff options
Diffstat (limited to 'src/lib/libssl/s3_lib.c')
-rw-r--r-- | src/lib/libssl/s3_lib.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lib/libssl/s3_lib.c b/src/lib/libssl/s3_lib.c index 6fcbbfc2c5..e1bad1ba1a 100644 --- a/src/lib/libssl/s3_lib.c +++ b/src/lib/libssl/s3_lib.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: s3_lib.c,v 1.171 2018/10/24 18:04:50 jsing Exp $ */ | 1 | /* $OpenBSD: s3_lib.c,v 1.172 2018/11/05 06:55:37 jsing Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -2286,12 +2286,15 @@ ssl3_choose_cipher(SSL *s, STACK_OF(SSL_CIPHER) *clnt, | |||
2286 | unsigned long alg_k, alg_a, mask_k, mask_a; | 2286 | unsigned long alg_k, alg_a, mask_k, mask_a; |
2287 | STACK_OF(SSL_CIPHER) *prio, *allow; | 2287 | STACK_OF(SSL_CIPHER) *prio, *allow; |
2288 | SSL_CIPHER *c, *ret = NULL; | 2288 | SSL_CIPHER *c, *ret = NULL; |
2289 | int can_use_ecc; | ||
2289 | int i, ii, ok; | 2290 | int i, ii, ok; |
2290 | CERT *cert; | 2291 | CERT *cert; |
2291 | 2292 | ||
2292 | /* Let's see which ciphers we can support */ | 2293 | /* Let's see which ciphers we can support */ |
2293 | cert = s->cert; | 2294 | cert = s->cert; |
2294 | 2295 | ||
2296 | can_use_ecc = (tls1_get_shared_curve(s) != NID_undef); | ||
2297 | |||
2295 | /* | 2298 | /* |
2296 | * Do not set the compare functions, because this may lead to a | 2299 | * Do not set the compare functions, because this may lead to a |
2297 | * reordering by "id". We want to keep the original ordering. | 2300 | * reordering by "id". We want to keep the original ordering. |
@@ -2336,7 +2339,7 @@ ssl3_choose_cipher(SSL *s, STACK_OF(SSL_CIPHER) *clnt, | |||
2336 | * an ephemeral EC key check it. | 2339 | * an ephemeral EC key check it. |
2337 | */ | 2340 | */ |
2338 | if (alg_k & SSL_kECDHE) | 2341 | if (alg_k & SSL_kECDHE) |
2339 | ok = ok && tls1_check_ec_tmp_key(s); | 2342 | ok = ok && can_use_ecc; |
2340 | 2343 | ||
2341 | if (!ok) | 2344 | if (!ok) |
2342 | continue; | 2345 | continue; |