esp_encrypted_img: fix handle pointer in tests

This commit is contained in:
MacDue 2022-03-07 10:03:16 +00:00
parent 3bb65a9687
commit c89f4af6f9
2 changed files with 6 additions and 6 deletions

View File

@ -402,7 +402,7 @@ esp_err_t esp_encrypted_img_decrypt_data(esp_decrypt_handle_t ctx, pre_enc_decry
return ESP_ERR_NOT_FINISHED;
}
}
/* falls through */
/* falls through */
case ESP_PRE_ENC_DATA_DECODE_STATE:
err = process_bin(handle, args, curr_index);
return err;

View File

@ -20,7 +20,7 @@ TEST_CASE("Sending all data at once", "[encrypted_img]")
.rsa_pub_key = (char *)rsa_private_pem_start,
.rsa_pub_key_len = rsa_private_pem_end - rsa_private_pem_start,
};
esp_decrypt_handle_t *ctx = esp_encrypted_img_decrypt_start(&cfg);
esp_decrypt_handle_t ctx = esp_encrypted_img_decrypt_start(&cfg);
TEST_ASSERT_NOT_NULL(ctx);
pre_enc_decrypt_arg_t *args = calloc(1, sizeof(pre_enc_decrypt_arg_t));
@ -50,7 +50,7 @@ TEST_CASE("Sending 1 byte data at once", "[encrypted_img]")
.rsa_pub_key = (char *)rsa_private_pem_start,
.rsa_pub_key_len = rsa_private_pem_end - rsa_private_pem_start,
};
esp_decrypt_handle_t *ctx = esp_encrypted_img_decrypt_start(&cfg);
esp_decrypt_handle_t ctx = esp_encrypted_img_decrypt_start(&cfg);
TEST_ASSERT_NOT_NULL(ctx);
pre_enc_decrypt_arg_t *args = calloc(1, sizeof(pre_enc_decrypt_arg_t));
@ -151,7 +151,7 @@ TEST_CASE("Invalid Magic", "[encrypted_img]")
.rsa_pub_key = (char *)rsa_private_pem_start,
.rsa_pub_key_len = rsa_private_pem_end - rsa_private_pem_start,
};
esp_decrypt_handle_t *ctx = esp_encrypted_img_decrypt_start(&cfg);
esp_decrypt_handle_t ctx = esp_encrypted_img_decrypt_start(&cfg);
TEST_ASSERT_NOT_NULL(ctx);
pre_enc_decrypt_arg_t *args = calloc(1, sizeof(pre_enc_decrypt_arg_t));
@ -244,7 +244,7 @@ TEST_CASE("Invalid Image", "[encrypted_img]")
.rsa_pub_key = (char *)rsa_private_pem_start,
.rsa_pub_key_len = rsa_private_pem_end - rsa_private_pem_start,
};
esp_decrypt_handle_t *ctx = esp_encrypted_img_decrypt_start(&cfg);
esp_decrypt_handle_t ctx = esp_encrypted_img_decrypt_start(&cfg);
TEST_ASSERT_NOT_NULL(ctx);
pre_enc_decrypt_arg_t *args = calloc(1, sizeof(pre_enc_decrypt_arg_t));
@ -272,7 +272,7 @@ TEST_CASE("Sending random size data at once", "[encrypted_img]")
.rsa_pub_key = (char *)rsa_private_pem_start,
.rsa_pub_key_len = rsa_private_pem_end - rsa_private_pem_start,
};
esp_decrypt_handle_t *ctx = esp_encrypted_img_decrypt_start(&cfg);
esp_decrypt_handle_t ctx = esp_encrypted_img_decrypt_start(&cfg);
TEST_ASSERT_NOT_NULL(ctx);
pre_enc_decrypt_arg_t *args = calloc(1, sizeof(pre_enc_decrypt_arg_t));