mirror of
https://github.com/ARMmbed/mbedtls.git
synced 2025-06-26 15:07:59 +08:00
Merge pull request #10186 from mpg/rm-pk-decrypt
Remove call to pk_decrypt() in ssl_server2
This commit is contained in:
commit
768f90f3c3
@ -1140,7 +1140,6 @@ static int ssl_async_set_key(ssl_async_key_context_t *ctx,
|
|||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
ASYNC_OP_SIGN,
|
ASYNC_OP_SIGN,
|
||||||
ASYNC_OP_DECRYPT,
|
|
||||||
} ssl_async_operation_type_t;
|
} ssl_async_operation_type_t;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
@ -1160,7 +1159,6 @@ typedef struct {
|
|||||||
static const char *const ssl_async_operation_names[] =
|
static const char *const ssl_async_operation_names[] =
|
||||||
{
|
{
|
||||||
"sign",
|
"sign",
|
||||||
"decrypt",
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static int ssl_async_start(mbedtls_ssl_context *ssl,
|
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) {
|
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:
|
case ASYNC_OP_SIGN:
|
||||||
ret = mbedtls_pk_sign(key_slot->pk,
|
ret = mbedtls_pk_sign(key_slot->pk,
|
||||||
ctx->md_alg,
|
ctx->md_alg,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user