Fixes from HEAD.
This commit is contained in:
@@ -223,6 +223,15 @@ static int ssl23_client_hello(SSL *s)
|
|||||||
{
|
{
|
||||||
version = SSL2_VERSION;
|
version = SSL2_VERSION;
|
||||||
}
|
}
|
||||||
|
#ifndef OPENSSL_NO_TLSEXT
|
||||||
|
if (version != SSL2_VERSION)
|
||||||
|
{
|
||||||
|
/* have to disable SSL 2.0 compatibility if we need TLS extensions */
|
||||||
|
|
||||||
|
if (s->tlsext_hostname != NULL)
|
||||||
|
ssl2_compat = 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
buf=(unsigned char *)s->init_buf->data;
|
buf=(unsigned char *)s->init_buf->data;
|
||||||
if (s->state == SSL23_ST_CW_CLNT_HELLO_A)
|
if (s->state == SSL23_ST_CW_CLNT_HELLO_A)
|
||||||
|
@@ -1935,6 +1935,7 @@ long ssl3_ctrl(SSL *s, int cmd, long larg, void *parg)
|
|||||||
break;
|
break;
|
||||||
case SSL_CTRL_SET_TLSEXT_DEBUG_ARG:
|
case SSL_CTRL_SET_TLSEXT_DEBUG_ARG:
|
||||||
s->tlsext_debug_arg=parg;
|
s->tlsext_debug_arg=parg;
|
||||||
|
ret = 1;
|
||||||
break;
|
break;
|
||||||
#endif /* !OPENSSL_NO_TLSEXT */
|
#endif /* !OPENSSL_NO_TLSEXT */
|
||||||
default:
|
default:
|
||||||
|
@@ -150,7 +150,7 @@ unsigned char *ssl_add_clienthello_tlsext(SSL *s, unsigned char *p, unsigned cha
|
|||||||
+ hostname length
|
+ hostname length
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ((lenmax = limit - p - 9) < 0
|
if ((lenmax = limit - ret - 9) < 0
|
||||||
|| (size_str = strlen(s->tlsext_hostname)) > (unsigned long)lenmax)
|
|| (size_str = strlen(s->tlsext_hostname)) > (unsigned long)lenmax)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
@@ -179,7 +179,7 @@ unsigned char *ssl_add_clienthello_tlsext(SSL *s, unsigned char *p, unsigned cha
|
|||||||
/* Check for enough room 2 for extension type, 2 for len
|
/* Check for enough room 2 for extension type, 2 for len
|
||||||
* rest for ticket
|
* rest for ticket
|
||||||
*/
|
*/
|
||||||
if (limit - p - 4 - ticklen < 0)
|
if (limit - ret - 4 - ticklen < 0)
|
||||||
return NULL;
|
return NULL;
|
||||||
s2n(TLSEXT_TYPE_session_ticket,ret);
|
s2n(TLSEXT_TYPE_session_ticket,ret);
|
||||||
s2n(ticklen,ret);
|
s2n(ticklen,ret);
|
||||||
|
Reference in New Issue
Block a user