RE: [PATCH v3 1/4] shared/att.c: Add signed command outgoing and CSRK function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Lukasz,

> > +
> > +bool bt_att_get_local_csrk(struct bt_att *att, uint8_t key[16],
> > +                                       uint32_t *local_sign_cnt)
> 
> 
> Why we need that get function ? If we assume that signing is done in bt_att then
> there is need only to feed bt_att with the CSRK.
>  BTW. There should be a way to set sign_cnt as well as this shall be in same
> storage as CSRK
> 
> I can guess that idea behind this bt_att_get_ is that client of bt_att should have
> possibility to update its sign_cnt after each transaction.
> It is in order to update storage. If so  I would propose to have some callback
> registered in bt_att for this purpose.
>
According to your proposal, I am not clear where and when you want to register
callback to get sign_cnt, and I think register new callback for only one signed_cnt
Parameter, it make sense ?

In my thought , this method user also can get signd_cnt after signed_write_cmd.
In encode_pdu function, after we encode pdu with CSRK, then it will update sign_cnt
in the bt_att structure for next signed write command.

If client of bt_att need to update its sign_cnt in the storage, when bt_att_send for
SIGNED_WRITE_COMMAND return ture, user can call bt_att_get_local_csrk to 
get newest sign_cnt and store it.

Best Regards
Chaojie Gu
��.n��������+%������w��{.n�����{����^n�r������&��z�ޗ�zf���h���~����������_��+v���)ߣ�


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux