X-Git-Url: https://git.openssl.org/?p=openssl.git;a=blobdiff_plain;f=ssl%2Fs3_pkt.c;h=2d569cc1cedc5aa2bb0d0e7f876a22468e77950e;hp=ca5412dc2a4c15dfc7e0baf8f0986b8fd6c2a00c;hb=293706e72c314b0155f4e7062e57db4b48d0e60e;hpb=4a1fbd13ee2a15b6db2e795a57528509c52355bf diff --git a/ssl/s3_pkt.c b/ssl/s3_pkt.c index ca5412dc2a..2d569cc1ce 100644 --- a/ssl/s3_pkt.c +++ b/ssl/s3_pkt.c @@ -740,7 +740,14 @@ static int do_ssl3_write(SSL *s, int type, const unsigned char *buf, wr->type=type; *(p++)=(s->version>>8); - *(p++)=s->version&0xff; + /* Some servers hang if iniatial client hello is larger than 256 + * bytes and record version number > TLS 1.0 + */ + if (s->state == SSL3_ST_CW_CLNT_HELLO_B + && TLS1_get_version(s) > TLS1_VERSION) + *(p++) = 0x1; + else + *(p++)=s->version&0xff; /* field where we are to write out packet length */ plen=p;