X-Git-Url: https://git.openssl.org/?p=openssl.git;a=blobdiff_plain;f=ssl%2Frecord%2Frec_layer_s3.c;h=61010f4e727f663c2c8970f9f67a83422f3a185f;hp=0953d2b01d585192fe0ec97bb1d59f9c4fe9483b;hb=3295d2423889496e0933b3f9af6dc692c9f9a8f2;hpb=95ea8da1768bf457b021f07cde9a6330827dc8a1 diff --git a/ssl/record/rec_layer_s3.c b/ssl/record/rec_layer_s3.c index 0953d2b01d..61010f4e72 100644 --- a/ssl/record/rec_layer_s3.c +++ b/ssl/record/rec_layer_s3.c @@ -825,7 +825,6 @@ int do_ssl3_write(SSL *s, int type, const unsigned char *buf, thispkt = &pkt[j]; thiswr = &wr[j]; - SSL3_RECORD_set_type(thiswr, type); /* * In TLSv1.3, once encrypting, we always use application data for the * record type @@ -834,6 +833,8 @@ int do_ssl3_write(SSL *s, int type, const unsigned char *buf, rectype = SSL3_RT_APPLICATION_DATA; else rectype = type; + SSL3_RECORD_set_type(thiswr, rectype); + /* * Some servers hang if initial client hello is larger than 256 bytes * and record version number > TLS 1.0 @@ -843,6 +844,7 @@ int do_ssl3_write(SSL *s, int type, const unsigned char *buf, && TLS1_get_version(s) > TLS1_VERSION && s->hello_retry_request == SSL_HRR_NONE) version = TLS1_VERSION; + SSL3_RECORD_set_rec_version(thiswr, version); maxcomplen = pipelens[j]; if (s->compress != NULL)