Erase CERTDO on terminate.

When both certdo and lifecycle support are enabled, flash_terminate
neglected to erase the certdo pages.  It now does so.
This commit is contained in:
Jeremy Drake
2017-08-01 16:00:28 -07:00
committed by NIIBE Yutaka
parent 22156ea7f9
commit e736227de7
3 changed files with 10 additions and 0 deletions

View File

@@ -1,3 +1,7 @@
2017-08-02 Jeremy Drake <jeremydrake+gnuk@eacceleration.com>
* src/flash.c (flash_terminate): Erase Certificate DO, too.
2017-08-01 NIIBE Yutaka <gniibe@fsij.org>
* src/openpgp.c (FILE_CARD_TERMINATED_OPENPGP): Remove.

1
THANKS
View File

@@ -18,6 +18,7 @@ Daniel Kahn Gillmor dkg@fifthhorseman.net
Elliott Mitchell
Hironobu SUZUKI hironobu@h2np.net
Jan Suhr jan@suhr.info
Jeremy Drake jeremydrake+gnuk@eacceleration.com
Jonathan McDowell noodles@earth.li
Kaz Kojima kkojima@rr.iij4u.or.jp
Kenji Rikitake

View File

@@ -154,6 +154,11 @@ flash_terminate (void)
flash_erase_page ((uint32_t)(&_data_pool + flash_page_size));
data_pool = &_data_pool;
last_p = &_data_pool + FLASH_DATA_POOL_HEADER_SIZE;
#if defined(CERTDO_SUPPORT)
flash_erase_page ((uint32_t)&ch_certificate_start);
if (FLASH_CH_CERTIFICATE_SIZE > flash_page_size)
flash_erase_page ((uint32_t)(&ch_certificate_start + flash_page_size));
#endif
}
void