This isn't a record layer responsibility so should be removed from
write_records.
Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19198)
WPACKET *thispkt;
SSL3_RECORD *thiswr;
unsigned char *recordstart;
- int i, mac_size, clear = 0;
+ int mac_size, clear = 0;
int eivlen = 0;
size_t align = 0;
SSL3_BUFFER *wb;
goto err;
}
- /* If we have an alert to send, lets send it */
- if (s->s3.alert_dispatch) {
- i = ssl->method->ssl_dispatch_alert(ssl);
- if (i <= 0) {
- /* SSLfatal() already called if appropriate */
- return i;
- }
- /* if it went, fall through and send more stuff */
- }
-
sess = s->session;
if ((sess == NULL)
return 1;
}
+ /* If we have an alert to send, lets send it */
+ if (s->s3.alert_dispatch) {
+ i = ssl->method->ssl_dispatch_alert(ssl);
+ if (i <= 0) {
+ /* SSLfatal() already called if appropriate */
+ return i;
+ }
+ /* if it went, fall through and send more stuff */
+ }
+
n = (len - tot);
max_send_fragment = ssl_get_max_send_fragment(s);