Lines Matching refs:rlayer

185         iter = pqueue_iterator(sc->rlayer.d->buffered_app_data);  in ssl3_pending()
192 for (i = 0; i < sc->rlayer.num_recs; i++) { in ssl3_pending()
193 if (sc->rlayer.tlsrecs[i].type != SSL3_RT_APPLICATION_DATA) in ssl3_pending()
195 num += sc->rlayer.tlsrecs[i].length; in ssl3_pending()
198 num += sc->rlayer.rrlmethod->app_data_pending(sc->rlayer.rrl); in ssl3_pending()
214 sc->rlayer.default_read_buf_len = len; in SSL_set_default_read_buffer_len()
225 if (sc->rlayer.rrlmethod == NULL || sc->rlayer.rrl == NULL) in SSL_rstate_string_long()
228 sc->rlayer.rrlmethod->get_state(sc->rlayer.rrl, NULL, &lng); in SSL_rstate_string_long()
241 if (sc->rlayer.rrlmethod == NULL || sc->rlayer.rrl == NULL) in SSL_rstate_string()
244 sc->rlayer.rrlmethod->get_state(sc->rlayer.rrl, &shrt, NULL); in SSL_rstate_string()
252 if (s->rlayer.wpend_tot == 0) in tls_write_check_pending()
256 if ((s->rlayer.wpend_tot > len) in tls_write_check_pending()
258 && (s->rlayer.wpend_buf != buf)) in tls_write_check_pending()
259 || (s->rlayer.wpend_type != type)) { in tls_write_check_pending()
285 tot = s->rlayer.wnum; in ssl3_write_bytes()
295 if ((len < s->rlayer.wnum) in ssl3_write_bytes()
296 || ((s->rlayer.wpend_tot != 0) in ssl3_write_bytes()
297 && (len < (s->rlayer.wnum + s->rlayer.wpend_tot)))) { in ssl3_write_bytes()
308 s->rlayer.wnum = 0; in ssl3_write_bytes()
315 if (s->rlayer.wpend_tot == 0 && (s->key_update != SSL_KEY_UPDATE_NONE in ssl3_write_bytes()
342 s->rlayer.wrlmethod->retry_write_records(s->rlayer.wrl)); in ssl3_write_bytes()
344 s->rlayer.wnum = tot; in ssl3_write_bytes()
347 tot += s->rlayer.wpend_tot; in ssl3_write_bytes()
348 s->rlayer.wpend_tot = 0; in ssl3_write_bytes()
356 s->rlayer.wpend_tot = 0; in ssl3_write_bytes()
357 s->rlayer.wpend_type = type; in ssl3_write_bytes()
358 s->rlayer.wpend_buf = buf; in ssl3_write_bytes()
371 s->rlayer.wnum = tot; in ssl3_write_bytes()
412 maxpipes = s->rlayer.wrlmethod->get_max_records(s->rlayer.wrl, type, n, in ssl3_write_bytes()
444 s->rlayer.wpend_tot = maxpipes * split_send_fragment; in ssl3_write_bytes()
465 s->rlayer.wpend_tot = n; in ssl3_write_bytes()
469 s->rlayer.wrlmethod->write_records(s->rlayer.wrl, tmpls, maxpipes)); in ssl3_write_bytes()
472 s->rlayer.wnum = tot; in ssl3_write_bytes()
476 if (s->rlayer.wpend_tot == n in ssl3_write_bytes()
479 *written = tot + s->rlayer.wpend_tot; in ssl3_write_bytes()
480 s->rlayer.wpend_tot = 0; in ssl3_write_bytes()
484 n -= s->rlayer.wpend_tot; in ssl3_write_bytes()
485 tot += s->rlayer.wpend_tot; in ssl3_write_bytes()
524 int al = s->rlayer.rrlmethod->get_alert_code(s->rlayer.rrl); in ossl_tls_handle_rlayer_return()
561 s->rlayer.rrlmethod->release_record(s->rlayer.rrl, in ssl_release_record()
569 s->rlayer.curr_rec++; in ssl_release_record()
635 if ((type == SSL3_RT_HANDSHAKE) && (s->rlayer.handshake_fragment_len > 0)) in ssl3_read_bytes()
638 unsigned char *src = s->rlayer.handshake_fragment; in ssl3_read_bytes()
644 while ((len > 0) && (s->rlayer.handshake_fragment_len > 0)) { in ssl3_read_bytes()
647 s->rlayer.handshake_fragment_len--; in ssl3_read_bytes()
651 for (k = 0; k < s->rlayer.handshake_fragment_len; k++) in ssl3_read_bytes()
652 s->rlayer.handshake_fragment[k] = *src++; in ssl3_read_bytes()
685 if (s->rlayer.curr_rec >= s->rlayer.num_recs) { in ssl3_read_bytes()
686 s->rlayer.curr_rec = s->rlayer.num_recs = 0; in ssl3_read_bytes()
688 rr = &s->rlayer.tlsrecs[s->rlayer.num_recs]; in ssl3_read_bytes()
691 s->rlayer.rrlmethod->read_record(s->rlayer.rrl, in ssl3_read_bytes()
701 s->rlayer.num_recs++; in ssl3_read_bytes()
702 } while (s->rlayer.rrlmethod->processed_read_pending(s->rlayer.rrl) in ssl3_read_bytes()
703 && s->rlayer.num_recs < SSL_MAX_PIPELINES); in ssl3_read_bytes()
705 rr = &s->rlayer.tlsrecs[s->rlayer.curr_rec]; in ssl3_read_bytes()
707 if (s->rlayer.handshake_fragment_len > 0 in ssl3_read_bytes()
720 s->rlayer.alert_count = 0; in ssl3_read_bytes()
737 s->rlayer.curr_rec++; in ssl3_read_bytes()
763 && s->rlayer.handshake_fragment_len > 0) { in ssl3_read_bytes()
784 curr_rec = s->rlayer.curr_rec; in ssl3_read_bytes()
808 && curr_rec < s->rlayer.num_recs in ssl3_read_bytes()
889 s->rlayer.alert_count++; in ssl3_read_bytes()
890 if (s->rlayer.alert_count == MAX_WARN_ALERT_COUNT) { in ssl3_read_bytes()
985 size_t dest_maxlen = sizeof(s->rlayer.handshake_fragment); in ssl3_read_bytes()
986 unsigned char *dest = s->rlayer.handshake_fragment; in ssl3_read_bytes()
987 size_t *dest_len = &s->rlayer.handshake_fragment_len; in ssl3_read_bytes()
1018 if ((s->rlayer.handshake_fragment_len >= 4) in ssl3_read_bytes()
1042 if (!RECORD_LAYER_read_pending(&s->rlayer)) { in ssl3_read_bytes()
1156 return s->rlayer.record_padding_cb(ssl, type, len, in rlayer_padding_wrapper()
1157 s->rlayer.record_padding_arg); in rlayer_padding_wrapper()
1172 s->rlayer.custom_rlmethod = meth; in ossl_ssl_set_custom_record_layer()
1173 s->rlayer.rlarg = rlarg; in ossl_ssl_set_custom_record_layer()
1180 if (s->rlayer.custom_rlmethod != NULL) in ssl_select_next_record_layer()
1181 return s->rlayer.custom_rlmethod; in ssl_select_next_record_layer()
1199 return direction == OSSL_RECORD_DIRECTION_READ ? s->rlayer.rrlmethod in ssl_select_next_record_layer()
1200 : s->rlayer.wrlmethod; in ssl_select_next_record_layer()
1209 thismethod = s->rlayer.rrlmethod; in ssl_post_record_layer_select()
1210 thisrl = s->rlayer.rrl; in ssl_post_record_layer_select()
1212 thismethod = s->rlayer.wrlmethod; in ssl_post_record_layer_select()
1213 thisrl = s->rlayer.wrl; in ssl_post_record_layer_select()
1220 if (s->rlayer.rrlmethod == &ossl_ktls_record_method) { in ssl_post_record_layer_select()
1263 thismethod = &s->rlayer.rrlmethod; in ssl_set_new_record_layer()
1264 thisrl = &s->rlayer.rrl; in ssl_set_new_record_layer()
1267 thismethod = &s->rlayer.wrlmethod; in ssl_set_new_record_layer()
1268 thisrl = &s->rlayer.wrl; in ssl_set_new_record_layer()
1287 &s->rlayer.default_read_buf_len); in ssl_set_new_record_layer()
1289 &s->rlayer.read_ahead); in ssl_set_new_record_layer()
1292 &s->rlayer.block_padding); in ssl_set_new_record_layer()
1294 &s->rlayer.hs_padding); in ssl_set_new_record_layer()
1371 prev = s->rlayer.rrlnext; in ssl_set_new_record_layer()
1387 s->rlayer.rrlnext = next; in ssl_set_new_record_layer()
1405 if (s->rlayer.record_padding_cb == NULL) in ssl_set_new_record_layer()
1421 s->rlayer.rlarg, &newrl); in ssl_set_new_record_layer()
1475 if (!ossl_assert(s->rlayer.rrlmethod != NULL) in ssl_set_record_protocol_version()
1476 || !ossl_assert(s->rlayer.wrlmethod != NULL)) in ssl_set_record_protocol_version()
1478 s->rlayer.rrlmethod->set_protocol_version(s->rlayer.rrl, s->version); in ssl_set_record_protocol_version()
1479 s->rlayer.wrlmethod->set_protocol_version(s->rlayer.wrl, s->version); in ssl_set_record_protocol_version()