small refactoring, add efm8 reset
This commit is contained in:
@@ -890,7 +890,7 @@ uint8_t ctap_update_pin_if_verified(uint8_t * pinEnc, int len, uint8_t * platfor
|
||||
|
||||
crypto_aes256_decrypt(pinEnc, len);
|
||||
|
||||
printf("new pin: %s\n", pinEnc);
|
||||
printf1(TAG_CP,"new pin: %s\n", pinEnc);
|
||||
|
||||
ret = strnlen((const char *)pinEnc, NEW_PIN_ENC_MAX_SIZE);
|
||||
if (ret == NEW_PIN_ENC_MAX_SIZE)
|
||||
|
@@ -1,7 +1,12 @@
|
||||
#ifndef _LOG_H
|
||||
#define _LOG_H
|
||||
|
||||
#define DEBUG_LEVEL 1
|
||||
#include "app.h"
|
||||
|
||||
#ifndef DEBUG_LEVEL
|
||||
#define DEBUG_LEVEL 0
|
||||
#endif
|
||||
|
||||
#define ENABLE_FILE_LOGGING
|
||||
|
||||
void LOG(uint32_t tag, const char * filename, int num, const char * fmt, ...);
|
||||
@@ -44,6 +49,7 @@ typedef enum
|
||||
#define printf1(fmt, ...)
|
||||
#define printf2(fmt, ...)
|
||||
#define printf3(fmt, ...)
|
||||
#define dump_hex1(tag,data,len)
|
||||
|
||||
#endif
|
||||
|
||||
|
@@ -390,8 +390,8 @@ int16_t bridge_u2f_to_wallet(uint8_t * _chal, uint8_t * _appid, uint8_t klen, ui
|
||||
{
|
||||
if ( ! check_pinhash(req->pinAuth, msg_buf, reqlen))
|
||||
{
|
||||
printf1(TAG_WALLET,"pinAuth is NOT valid\n");
|
||||
dump_hex(msg_buf,reqlen);
|
||||
printf2(TAG_ERR,"pinAuth is NOT valid\n");
|
||||
dump_hex1(TAG_ERR,msg_buf,reqlen);
|
||||
ret = CTAP2_ERR_PIN_AUTH_INVALID;
|
||||
goto cleanup;
|
||||
}
|
||||
@@ -427,8 +427,8 @@ int16_t bridge_u2f_to_wallet(uint8_t * _chal, uint8_t * _appid, uint8_t klen, ui
|
||||
{
|
||||
if ( ! check_pinhash(req->pinAuth, msg_buf, reqlen))
|
||||
{
|
||||
printf1(TAG_WALLET,"pinAuth is NOT valid\n");
|
||||
dump_hex(msg_buf,reqlen);
|
||||
printf2(TAG_ERR,"pinAuth is NOT valid\n");
|
||||
dump_hex1(TAG_ERR,msg_buf,reqlen);
|
||||
ret = CTAP2_ERR_PIN_AUTH_INVALID;
|
||||
goto cleanup;
|
||||
}
|
||||
|
Reference in New Issue
Block a user