mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-09 03:21:51 +00:00
image-fit: Make string of algo parameter constant
Modifications would be invalid. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
e44d2f5df9
commit
4550ce9be0
4 changed files with 8 additions and 8 deletions
|
@ -67,7 +67,7 @@ static int fit_image_setup_verify(struct image_sign_info *info,
|
||||||
const void *fit, int noffset,
|
const void *fit, int noffset,
|
||||||
int required_keynode, char **err_msgp)
|
int required_keynode, char **err_msgp)
|
||||||
{
|
{
|
||||||
char *algo_name;
|
const char *algo_name;
|
||||||
const char *padding_name;
|
const char *padding_name;
|
||||||
|
|
||||||
if (fdt_totalsize(fit) > CONFIG_VAL(FIT_SIGNATURE_MAX_SIZE)) {
|
if (fdt_totalsize(fit) > CONFIG_VAL(FIT_SIGNATURE_MAX_SIZE)) {
|
||||||
|
|
|
@ -191,7 +191,7 @@ static void fit_image_print_data(const void *fit, int noffset, const char *p,
|
||||||
const char *keyname;
|
const char *keyname;
|
||||||
uint8_t *value;
|
uint8_t *value;
|
||||||
int value_len;
|
int value_len;
|
||||||
char *algo;
|
const char *algo;
|
||||||
const char *padding;
|
const char *padding;
|
||||||
bool required;
|
bool required;
|
||||||
int ret, i;
|
int ret, i;
|
||||||
|
@ -1063,11 +1063,11 @@ int fit_image_get_data_and_size(const void *fit, int noffset,
|
||||||
* 0, on success
|
* 0, on success
|
||||||
* -1, on failure
|
* -1, on failure
|
||||||
*/
|
*/
|
||||||
int fit_image_hash_get_algo(const void *fit, int noffset, char **algo)
|
int fit_image_hash_get_algo(const void *fit, int noffset, const char **algo)
|
||||||
{
|
{
|
||||||
int len;
|
int len;
|
||||||
|
|
||||||
*algo = (char *)fdt_getprop(fit, noffset, FIT_ALGO_PROP, &len);
|
*algo = (const char *)fdt_getprop(fit, noffset, FIT_ALGO_PROP, &len);
|
||||||
if (*algo == NULL) {
|
if (*algo == NULL) {
|
||||||
fit_get_debug(fit, noffset, FIT_ALGO_PROP, len);
|
fit_get_debug(fit, noffset, FIT_ALGO_PROP, len);
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -1265,7 +1265,7 @@ static int fit_image_check_hash(const void *fit, int noffset, const void *data,
|
||||||
{
|
{
|
||||||
uint8_t value[FIT_MAX_HASH_LEN];
|
uint8_t value[FIT_MAX_HASH_LEN];
|
||||||
int value_len;
|
int value_len;
|
||||||
char *algo;
|
const char *algo;
|
||||||
uint8_t *fit_value;
|
uint8_t *fit_value;
|
||||||
int fit_value_len;
|
int fit_value_len;
|
||||||
int ignore;
|
int ignore;
|
||||||
|
|
|
@ -1011,7 +1011,7 @@ int fit_image_get_data_size_unciphered(const void *fit, int noffset,
|
||||||
int fit_image_get_data_and_size(const void *fit, int noffset,
|
int fit_image_get_data_and_size(const void *fit, int noffset,
|
||||||
const void **data, size_t *size);
|
const void **data, size_t *size);
|
||||||
|
|
||||||
int fit_image_hash_get_algo(const void *fit, int noffset, char **algo);
|
int fit_image_hash_get_algo(const void *fit, int noffset, const char **algo);
|
||||||
int fit_image_hash_get_value(const void *fit, int noffset, uint8_t **value,
|
int fit_image_hash_get_value(const void *fit, int noffset, uint8_t **value,
|
||||||
int *value_len);
|
int *value_len);
|
||||||
|
|
||||||
|
|
|
@ -63,7 +63,7 @@ static int fit_image_process_hash(void *fit, const char *image_name,
|
||||||
uint8_t value[FIT_MAX_HASH_LEN];
|
uint8_t value[FIT_MAX_HASH_LEN];
|
||||||
const char *node_name;
|
const char *node_name;
|
||||||
int value_len;
|
int value_len;
|
||||||
char *algo;
|
const char *algo;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
node_name = fit_get_name(fit, noffset, NULL);
|
node_name = fit_get_name(fit, noffset, NULL);
|
||||||
|
@ -160,7 +160,7 @@ static int fit_image_setup_sig(struct image_sign_info *info,
|
||||||
const char *engine_id)
|
const char *engine_id)
|
||||||
{
|
{
|
||||||
const char *node_name;
|
const char *node_name;
|
||||||
char *algo_name;
|
const char *algo_name;
|
||||||
const char *padding_name;
|
const char *padding_name;
|
||||||
|
|
||||||
node_name = fit_get_name(fit, noffset, NULL);
|
node_name = fit_get_name(fit, noffset, NULL);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue