Skip to content

Image upload data-match #64

Description

@igiona

Hi,

looking at the file upload implementation in: https://github.com/thedjnK/AuTerm/blob/main/plugins/mcumgr/smp_group_img_mgmt.cpp , and in particular at the match field in the file-upload response parsing:

if (key == "match")
{
    bool match_value = reader.toBool();
 
    if (match_value == true)
    {
        *match = MATCH_FAILED;
    }
    else
    {
        *match = MATCH_PASSED;
    }
}

I believe that this logic is wrong, or at least doesn't match the Zephyr implementation, where the match field is set to true when the SHA verification passes: https://github.com/zephyrproject-rtos/zephyr/blob/44bbc13394d334862995bb58a3c64da1bdd6d00d/subsys/mgmt/mcumgr/grp/img_mgmt/src/img_mgmt.c#L889-L913

Is the AuTerm implementation simply wrong, or there is more to it?

Metadata

Metadata

Assignees

Labels

area: MCUmgr pluginRelates to MCUmgr pluginbugSomething isn't workingtimeframe: shortPlanned for completion in the short term future

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions