Lines Matching refs:rl
29 static int ktls_int_check_supported_cipher(OSSL_RECORD_LAYER *rl, in ktls_int_check_supported_cipher() argument
34 switch (rl->version) { in ktls_int_check_supported_cipher()
58 if (rl->use_etm) in ktls_int_check_supported_cipher()
129 static int ktls_int_check_supported_cipher(OSSL_RECORD_LAYER *rl, in ktls_int_check_supported_cipher() argument
134 switch (rl->version) { in ktls_int_check_supported_cipher()
289 static int ktls_set_crypto_state(OSSL_RECORD_LAYER *rl, int level, in ktls_set_crypto_state() argument
311 if (rl->max_frag_len != SSL3_RT_MAX_PLAIN_LENGTH) in ktls_set_crypto_state()
315 if (!ktls_int_check_supported_cipher(rl, ciph, md, taglen)) in ktls_set_crypto_state()
319 if (rl->direction == OSSL_RECORD_DIRECTION_WRITE) { in ktls_set_crypto_state()
320 if (BIO_flush(rl->bio) <= 0) in ktls_set_crypto_state()
324 if (rl->padding != NULL || rl->block_padding > 0) in ktls_set_crypto_state()
328 if (!ktls_configure_crypto(rl->libctx, rl->version, ciph, md, rl->sequence, in ktls_set_crypto_state()
330 rl->direction == OSSL_RECORD_DIRECTION_WRITE, in ktls_set_crypto_state()
334 if (!BIO_set_ktls(rl->bio, &crypto_info, rl->direction)) in ktls_set_crypto_state()
337 if (rl->direction == OSSL_RECORD_DIRECTION_WRITE && in ktls_set_crypto_state()
338 (rl->options & SSL_OP_ENABLE_KTLS_TX_ZEROCOPY_SENDFILE) != 0) in ktls_set_crypto_state()
343 BIO_set_ktls_tx_zerocopy_sendfile(rl->bio); in ktls_set_crypto_state()
348 static int ktls_read_n(OSSL_RECORD_LAYER *rl, size_t n, size_t max, int extend, in ktls_read_n() argument
353 ret = tls_default_read_n(rl, n, max, extend, clearold, readbytes); in ktls_read_n()
358 RLAYERfatal(rl, SSL_AD_BAD_RECORD_MAC, in ktls_read_n()
362 RLAYERfatal(rl, SSL_AD_RECORD_OVERFLOW, in ktls_read_n()
366 RLAYERfatal(rl, SSL_AD_PROTOCOL_VERSION, in ktls_read_n()
377 static int ktls_cipher(OSSL_RECORD_LAYER *rl, TLS_RL_RECORD *inrecs, in ktls_cipher() argument
384 static int ktls_validate_record_header(OSSL_RECORD_LAYER *rl, TLS_RL_RECORD *rec) in ktls_validate_record_header() argument
387 RLAYERfatal(rl, SSL_AD_DECODE_ERROR, SSL_R_WRONG_VERSION_NUMBER); in ktls_validate_record_header()
394 static int ktls_post_process_record(OSSL_RECORD_LAYER *rl, TLS_RL_RECORD *rec) in ktls_post_process_record() argument
396 if (rl->version == TLS1_3_VERSION) in ktls_post_process_record()
397 return tls13_common_post_process_record(rl, rec); in ktls_post_process_record()
446 static int ktls_allocate_write_buffers(OSSL_RECORD_LAYER *rl, in ktls_allocate_write_buffers() argument
457 rl->numwpipes = 1; in ktls_allocate_write_buffers()
462 static int ktls_initialise_write_packets(OSSL_RECORD_LAYER *rl, in ktls_initialise_write_packets() argument
492 static int ktls_prepare_record_header(OSSL_RECORD_LAYER *rl, in ktls_prepare_record_header() argument
504 static int ktls_prepare_for_encryption(OSSL_RECORD_LAYER *rl, in ktls_prepare_for_encryption() argument
513 static int ktls_post_encryption_processing(OSSL_RECORD_LAYER *rl, in ktls_post_encryption_processing() argument
523 static int ktls_prepare_write_bio(OSSL_RECORD_LAYER *rl, int type) in ktls_prepare_write_bio() argument
530 int ret, i = BIO_flush(rl->bio); in ktls_prepare_write_bio()
533 if (BIO_should_retry(rl->bio)) in ktls_prepare_write_bio()
539 BIO_set_ktls_ctrl_msg(rl->bio, type); in ktls_prepare_write_bio()
545 static int ktls_alloc_buffers(OSSL_RECORD_LAYER *rl) in ktls_alloc_buffers() argument
548 if (rl->direction == OSSL_RECORD_DIRECTION_WRITE) in ktls_alloc_buffers()
551 return tls_alloc_buffers(rl); in ktls_alloc_buffers()
554 static int ktls_free_buffers(OSSL_RECORD_LAYER *rl) in ktls_free_buffers() argument
557 if (rl->direction == OSSL_RECORD_DIRECTION_WRITE) in ktls_free_buffers()
560 return tls_free_buffers(rl); in ktls_free_buffers()