Add ECC extensions with DTLS.
PR#3449
(cherry picked from commit 2054eb771e
)
This commit is contained in:
18
ssl/t1_lib.c
18
ssl/t1_lib.c
@@ -342,8 +342,7 @@ unsigned char *ssl_add_clienthello_tlsext(SSL *s, unsigned char *p, unsigned cha
|
||||
}
|
||||
|
||||
#ifndef OPENSSL_NO_EC
|
||||
if (s->tlsext_ecpointformatlist != NULL &&
|
||||
s->version != DTLS1_VERSION)
|
||||
if (s->tlsext_ecpointformatlist != NULL)
|
||||
{
|
||||
/* Add TLS extension ECPointFormats to the ClientHello message */
|
||||
long lenmax;
|
||||
@@ -362,8 +361,7 @@ unsigned char *ssl_add_clienthello_tlsext(SSL *s, unsigned char *p, unsigned cha
|
||||
memcpy(ret, s->tlsext_ecpointformatlist, s->tlsext_ecpointformatlist_length);
|
||||
ret+=s->tlsext_ecpointformatlist_length;
|
||||
}
|
||||
if (s->tlsext_ellipticcurvelist != NULL &&
|
||||
s->version != DTLS1_VERSION)
|
||||
if (s->tlsext_ellipticcurvelist != NULL)
|
||||
{
|
||||
/* Add TLS extension EllipticCurves to the ClientHello message */
|
||||
long lenmax;
|
||||
@@ -546,8 +544,7 @@ unsigned char *ssl_add_serverhello_tlsext(SSL *s, unsigned char *p, unsigned cha
|
||||
}
|
||||
|
||||
#ifndef OPENSSL_NO_EC
|
||||
if (s->tlsext_ecpointformatlist != NULL &&
|
||||
s->version != DTLS1_VERSION)
|
||||
if (s->tlsext_ecpointformatlist != NULL)
|
||||
{
|
||||
/* Add TLS extension ECPointFormats to the ServerHello message */
|
||||
long lenmax;
|
||||
@@ -852,8 +849,7 @@ int ssl_parse_clienthello_tlsext(SSL *s, unsigned char **p, unsigned char *d, in
|
||||
}
|
||||
|
||||
#ifndef OPENSSL_NO_EC
|
||||
else if (type == TLSEXT_TYPE_ec_point_formats &&
|
||||
s->version != DTLS1_VERSION)
|
||||
else if (type == TLSEXT_TYPE_ec_point_formats)
|
||||
{
|
||||
unsigned char *sdata = data;
|
||||
int ecpointformatlist_length = *(sdata++);
|
||||
@@ -887,8 +883,7 @@ int ssl_parse_clienthello_tlsext(SSL *s, unsigned char **p, unsigned char *d, in
|
||||
fprintf(stderr,"\n");
|
||||
#endif
|
||||
}
|
||||
else if (type == TLSEXT_TYPE_elliptic_curves &&
|
||||
s->version != DTLS1_VERSION)
|
||||
else if (type == TLSEXT_TYPE_elliptic_curves)
|
||||
{
|
||||
unsigned char *sdata = data;
|
||||
int ellipticcurvelist_length = (*(sdata++) << 8);
|
||||
@@ -1148,8 +1143,7 @@ int ssl_parse_serverhello_tlsext(SSL *s, unsigned char **p, unsigned char *d, in
|
||||
}
|
||||
|
||||
#ifndef OPENSSL_NO_EC
|
||||
else if (type == TLSEXT_TYPE_ec_point_formats &&
|
||||
s->version != DTLS1_VERSION)
|
||||
else if (type == TLSEXT_TYPE_ec_point_formats)
|
||||
{
|
||||
unsigned char *sdata = data;
|
||||
int ecpointformatlist_length = *(sdata++);
|
||||
|
Reference in New Issue
Block a user