Latest update - pre9
This commit is contained in:
@@ -816,8 +816,8 @@ int do_ssl3_write(SSL *s, int type, const unsigned char *buf,
|
||||
/* Clear our SSL3_RECORD structures */
|
||||
memset(wr, 0, sizeof(wr));
|
||||
for (j = 0; j < numpipes; j++) {
|
||||
unsigned int version = SSL_TREAT_AS_TLS13(s) ? TLS1_2_VERSION
|
||||
: s->version;
|
||||
unsigned int version = (s->version == TLS1_3_VERSION) ? TLS1_2_VERSION
|
||||
: s->version;
|
||||
unsigned char *compressdata = NULL;
|
||||
size_t maxcomplen;
|
||||
unsigned int rectype;
|
||||
@@ -829,7 +829,10 @@ int do_ssl3_write(SSL *s, int type, const unsigned char *buf,
|
||||
* In TLSv1.3, once encrypting, we always use application data for the
|
||||
* record type
|
||||
*/
|
||||
if (SSL_TREAT_AS_TLS13(s) && s->enc_write_ctx != NULL)
|
||||
if (SSL_TREAT_AS_TLS13(s)
|
||||
&& s->enc_write_ctx != NULL
|
||||
&& (s->statem.enc_write_state != ENC_WRITE_STATE_WRITE_PLAIN_ALERTS
|
||||
|| type != SSL3_RT_ALERT))
|
||||
rectype = SSL3_RT_APPLICATION_DATA;
|
||||
else
|
||||
rectype = type;
|
||||
@@ -892,7 +895,10 @@ int do_ssl3_write(SSL *s, int type, const unsigned char *buf,
|
||||
SSL3_RECORD_reset_input(&wr[j]);
|
||||
}
|
||||
|
||||
if (SSL_TREAT_AS_TLS13(s) && s->enc_write_ctx != NULL) {
|
||||
if (SSL_TREAT_AS_TLS13(s)
|
||||
&& s->enc_write_ctx != NULL
|
||||
&& (s->statem.enc_write_state != ENC_WRITE_STATE_WRITE_PLAIN_ALERTS
|
||||
|| type != SSL3_RT_ALERT)) {
|
||||
size_t rlen, max_send_fragment;
|
||||
|
||||
if (!WPACKET_put_bytes_u8(thispkt, type)) {
|
||||
@@ -981,8 +987,7 @@ int do_ssl3_write(SSL *s, int type, const unsigned char *buf,
|
||||
SSL3_RECORD_set_length(thiswr, len);
|
||||
}
|
||||
|
||||
if (s->early_data_state == SSL_EARLY_DATA_WRITING
|
||||
|| s->early_data_state == SSL_EARLY_DATA_WRITE_RETRY) {
|
||||
if (s->statem.enc_write_state == ENC_WRITE_STATE_WRITE_PLAIN_ALERTS) {
|
||||
/*
|
||||
* We haven't actually negotiated the version yet, but we're trying to
|
||||
* send early data - so we need to use the tls13enc function.
|
||||
|
||||
Reference in New Issue
Block a user