The message header for fake SSL 3.0/TLS 1.0 client hellos created from
SSL 2.0 client hellos added with the previous commit was totally wrong -- it must start with the message type, not the protocol version. (Not that this particular header is actually used anywhere ...)
This commit is contained in:
parent
8f71fb8d98
commit
9ba3ec9176
@ -365,12 +365,11 @@ int ssl23_get_client_hello(SSL *s)
|
|||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* record header: version ... */
|
/* record header: msg_type ... */
|
||||||
*(d++) = SSL3_VERSION_MAJOR; /* == v[0] */
|
*(d++) = SSL3_MT_CLIENT_HELLO;
|
||||||
*(d++) = v[1];
|
|
||||||
/* ... and length (actual value will be written later) */
|
/* ... and length (actual value will be written later) */
|
||||||
d_len = d++;
|
d_len = d;
|
||||||
d++;
|
d += 3;
|
||||||
|
|
||||||
/* client_version */
|
/* client_version */
|
||||||
*(d++) = SSL3_VERSION_MAJOR; /* == v[0] */
|
*(d++) = SSL3_VERSION_MAJOR; /* == v[0] */
|
||||||
@ -404,7 +403,7 @@ int ssl23_get_client_hello(SSL *s)
|
|||||||
*(d++)=0;
|
*(d++)=0;
|
||||||
|
|
||||||
i=(d-(unsigned char *)s->init_buf->data);
|
i=(d-(unsigned char *)s->init_buf->data);
|
||||||
s2n(i, d_len);
|
l2n3((long)i, d_len);
|
||||||
|
|
||||||
/* get the data reused from the init_buf */
|
/* get the data reused from the init_buf */
|
||||||
s->s3->tmp.reuse_message=1;
|
s->s3->tmp.reuse_message=1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user