add bootloader project

This commit is contained in:
Conor Patrick
2018-07-14 15:55:57 -04:00
parent 1ccc6b8960
commit b05f3cc9e8
23 changed files with 12250 additions and 7 deletions

View File

@@ -1404,7 +1404,7 @@ static uint16_t key_addr_offset(int index)
uint16_t ctap_key_len(uint8_t index)
{
int i = ctap_keys_stored();
if (i >= MAX_KEYS || index >= MAX_KEYS)
if (index >= i || index >= MAX_KEYS)
{
return 0;
}
@@ -1449,7 +1449,7 @@ int8_t ctap_load_key(uint8_t index, uint8_t * key)
int i = ctap_keys_stored();
uint16_t offset;
uint16_t len;
if (i >= MAX_KEYS || index >= MAX_KEYS)
if (index >= i || index >= MAX_KEYS)
{
return ERR_NO_KEY_SPACE;
}

View File

@@ -24,10 +24,10 @@ int main(int argc, char * argv[])
set_logging_mask(
/*0*/
// TAG_GEN|
TAG_GEN|
/*TAG_MC |*/
/*TAG_GA |*/
/*TAG_WALLET |*/
TAG_WALLET |
TAG_STOR |
/*TAG_CP |*/
// TAG_CTAP|

View File

@@ -15,7 +15,7 @@
#include "storage.h"
#include "device.h"
#ifdef USING_PC
#if defined(USING_PC) || defined(IS_BOOTLOADER)
typedef enum
{
MBEDTLS_ECP_DP_NONE = 0,