Remove redundant check from tls1_get_curvelist
The function tls1_get_curvelist() has an explicit check to see if s->cert
is NULL or not. However the check appears *after* calling the tls1_suiteb
macro which derefs s->cert. In reality s->cert can never be NULL because
it is created in SSL_new(). If the malloc fails then the SSL_new call fails
and no SSL object is created.
Reviewed-by: Tim Hudson <tjh@openssl.org>
(cherry picked from commit 6329b6092b
)
Conflicts:
ssl/t1_lib.c
This commit is contained in:
parent
903738ac63
commit
822d265ced
1 changed files with 1 additions and 1 deletions
|
@ -497,7 +497,7 @@ static int tls1_get_curvelist(SSL *s, int sess,
|
||||||
} else
|
} else
|
||||||
# endif
|
# endif
|
||||||
{
|
{
|
||||||
if (!s->server || (s->cert && s->cert->ecdh_tmp_auto)) {
|
if (!s->server || s->cert->ecdh_tmp_auto) {
|
||||||
*pcurves = eccurves_auto;
|
*pcurves = eccurves_auto;
|
||||||
pcurveslen = sizeof(eccurves_auto);
|
pcurveslen = sizeof(eccurves_auto);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue