Fix long standing buf of digital signature counter.
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
2017-04-28 NIIBE Yutaka <gniibe@fsij.org>
|
||||||
|
|
||||||
|
* src/openpgp-do.c (gpg_write_digital_signature_counter): Fix
|
||||||
|
writing lower 10-bit.
|
||||||
|
|
||||||
2017-04-27 NIIBE Yutaka <gniibe@fsij.org>
|
2017-04-27 NIIBE Yutaka <gniibe@fsij.org>
|
||||||
|
|
||||||
* src/gnuk.ld.in (_data_pool): Move to the end.
|
* src/gnuk.ld.in (_data_pool): Move to the end.
|
||||||
|
|||||||
@@ -336,7 +336,7 @@ gpg_write_digital_signature_counter (const uint8_t *p, uint32_t dsc)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
hw0 = NR_COUNTER_DS | ((dsc & 0xfc0000) >> 18) | ((dsc & 0x03fc00) >> 2);
|
hw0 = NR_COUNTER_DS | ((dsc & 0xfc0000) >> 18) | ((dsc & 0x03fc00) >> 2);
|
||||||
hw1 = NR_COUNTER_DS_LSB;
|
hw1 = NR_COUNTER_DS_LSB | ((dsc & 0x0300) >> 8) | ((dsc & 0x00ff) << 8);
|
||||||
flash_put_data_internal (p, hw0);
|
flash_put_data_internal (p, hw0);
|
||||||
flash_put_data_internal (p+2, hw1);
|
flash_put_data_internal (p+2, hw1);
|
||||||
return p+4;
|
return p+4;
|
||||||
|
|||||||
Reference in New Issue
Block a user