Lines Matching refs:crypto_info

341 	struct tls_crypto_info *crypto_info;  in do_tls_getsockopt_tx()  local
347 if (!optval || (len < sizeof(*crypto_info))) { in do_tls_getsockopt_tx()
358 crypto_info = &ctx->crypto_send.info; in do_tls_getsockopt_tx()
360 if (!TLS_CRYPTO_INFO_READY(crypto_info)) { in do_tls_getsockopt_tx()
365 if (len == sizeof(*crypto_info)) { in do_tls_getsockopt_tx()
366 if (copy_to_user(optval, crypto_info, sizeof(*crypto_info))) in do_tls_getsockopt_tx()
371 switch (crypto_info->cipher_type) { in do_tls_getsockopt_tx()
375 container_of(crypto_info, in do_tls_getsockopt_tx()
399 container_of(crypto_info, in do_tls_getsockopt_tx()
459 struct tls_crypto_info *crypto_info; in do_tls_setsockopt_conf() local
466 if (!optval || (optlen < sizeof(*crypto_info))) { in do_tls_setsockopt_conf()
472 crypto_info = &ctx->crypto_send.info; in do_tls_setsockopt_conf()
475 crypto_info = &ctx->crypto_recv.info; in do_tls_setsockopt_conf()
480 if (TLS_CRYPTO_INFO_READY(crypto_info)) { in do_tls_setsockopt_conf()
485 rc = copy_from_user(crypto_info, optval, sizeof(*crypto_info)); in do_tls_setsockopt_conf()
492 if (crypto_info->version != TLS_1_2_VERSION && in do_tls_setsockopt_conf()
493 crypto_info->version != TLS_1_3_VERSION) { in do_tls_setsockopt_conf()
500 if (alt_crypto_info->version != crypto_info->version || in do_tls_setsockopt_conf()
501 alt_crypto_info->cipher_type != crypto_info->cipher_type) { in do_tls_setsockopt_conf()
507 switch (crypto_info->cipher_type) { in do_tls_setsockopt_conf()
528 rc = copy_from_user(crypto_info + 1, optval + sizeof(*crypto_info), in do_tls_setsockopt_conf()
529 optlen - sizeof(*crypto_info)); in do_tls_setsockopt_conf()
570 memzero_explicit(crypto_info, sizeof(union tls_crypto_context)); in do_tls_setsockopt_conf()