From 92a9bd345ce4aec9a4670ff2584e659f56c4e070 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Tue, 20 May 2025 12:04:26 +0200 Subject: [PATCH] Remove call to pk_decrypt() in ssl_server2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We no longer use decrypt TLS 1.2 (never did in 1.3) so we no longer need this path. Further simplifications could probably be made (we currently have an enum type with only one possible value...) but for now I'm trying to keep changes minimal. Signed-off-by: Manuel Pégourié-Gonnard --- programs/ssl/ssl_server2.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/programs/ssl/ssl_server2.c b/programs/ssl/ssl_server2.c index 3c9fb7e2e0..42fa8d6ed4 100644 --- a/programs/ssl/ssl_server2.c +++ b/programs/ssl/ssl_server2.c @@ -1140,7 +1140,6 @@ static int ssl_async_set_key(ssl_async_key_context_t *ctx, typedef enum { ASYNC_OP_SIGN, - ASYNC_OP_DECRYPT, } ssl_async_operation_type_t; typedef struct { @@ -1160,7 +1159,6 @@ typedef struct { static const char *const ssl_async_operation_names[] = { "sign", - "decrypt", }; static int ssl_async_start(mbedtls_ssl_context *ssl, @@ -1261,11 +1259,6 @@ static int ssl_async_resume(mbedtls_ssl_context *ssl, } switch (ctx->operation_type) { - case ASYNC_OP_DECRYPT: - ret = mbedtls_pk_decrypt(key_slot->pk, - ctx->input, ctx->input_len, - output, output_len, output_size); - break; case ASYNC_OP_SIGN: ret = mbedtls_pk_sign(key_slot->pk, ctx->md_alg,