remove not-useful logs

This commit is contained in:
Conor Patrick
2019-04-24 18:36:36 -04:00
parent f9d3b9561d
commit 6ae1cd3865
3 changed files with 5 additions and 18 deletions

View File

@@ -379,7 +379,6 @@ static int ctap_make_extensions(CTAP_extensions * ext, uint8_t * ext_encoder_buf
crypto_aes256_encrypt(output, ext->hmac_secret.saltLen); crypto_aes256_encrypt(output, ext->hmac_secret.saltLen);
// output // output
printf1(TAG_GREEN, "have %d bytes for Extenstions encoder\r\n",*ext_encoder_buf_size);
cbor_encoder_init(&extensions, ext_encoder_buf, *ext_encoder_buf_size, 0); cbor_encoder_init(&extensions, ext_encoder_buf, *ext_encoder_buf_size, 0);
{ {
CborEncoder hmac_secret_map; CborEncoder hmac_secret_map;
@@ -453,9 +452,6 @@ static int ctap_make_auth_data(struct rpId * rp, CborEncoder * map, uint8_t * au
crypto_sha256_update(rp->id, rp->size); crypto_sha256_update(rp->id, rp->size);
crypto_sha256_final(authData->head.rpIdHash); crypto_sha256_final(authData->head.rpIdHash);
printf1(TAG_RED, "rpId: "); dump_hex1(TAG_RED, rp->id, rp->size);
printf1(TAG_RED, "hash: "); dump_hex1(TAG_RED, authData->head.rpIdHash, 32);
count = auth_data_update_count(&authData->head); count = auth_data_update_count(&authData->head);
device_set_status(CTAPHID_STATUS_UPNEEDED); device_set_status(CTAPHID_STATUS_UPNEEDED);
@@ -742,9 +738,7 @@ uint8_t ctap_make_credential(CborEncoder * encoder, uint8_t * request, int lengt
check_retr(ret); check_retr(ret);
printf1(TAG_GREEN, "checking credId: "); dump_hex1(TAG_GREEN, (uint8_t*) &excl_cred->credential.id, sizeof(CredentialId)); printf1(TAG_GREEN, "checking credId: "); dump_hex1(TAG_GREEN, (uint8_t*) &excl_cred->credential.id, sizeof(CredentialId));
// DELETE
// crypto_aes256_reset_iv(NULL);
// crypto_aes256_decrypt((uint8_t*)& excl_cred->credential.enc, CREDENTIAL_ENC_SIZE);
if (ctap_authenticate_credential(&MC.rp, excl_cred)) if (ctap_authenticate_credential(&MC.rp, excl_cred))
{ {
printf1(TAG_MC, "Cred %d failed!\r\n",i); printf1(TAG_MC, "Cred %d failed!\r\n",i);
@@ -865,7 +859,6 @@ uint8_t ctap_add_user_entity(CborEncoder * map, CTAP_userEntity * user)
ret = cbor_encoder_create_map(map, &entity, 1); ret = cbor_encoder_create_map(map, &entity, 1);
check_ret(ret); check_ret(ret);
printf1(TAG_GREEN,"id_size: %d\r\n", user->id_size);
{ {
ret = cbor_encode_text_string(&entity, "id", 2); ret = cbor_encode_text_string(&entity, "id", 2);
check_ret(ret); check_ret(ret);
@@ -1107,7 +1100,6 @@ uint8_t ctap_get_next_assertion(CborEncoder * encoder)
} }
check_ret(ret); check_ret(ret);
printf1(TAG_RED, "RPID hash: "); dump_hex1(TAG_RED, authData.rpIdHash, 32);
// if only one account for this RP, null out the user details // if only one account for this RP, null out the user details
if (!getAssertionState.user_verified) if (!getAssertionState.user_verified)
@@ -1673,7 +1665,6 @@ uint8_t ctap_request(uint8_t * pkt_raw, int length, CTAP_RESPONSE * resp)
else else
{ {
printf2(TAG_ERR, "unwanted GET_NEXT_ASSERTION. lastcmd == 0x%02x\n", getAssertionState.lastcmd); printf2(TAG_ERR, "unwanted GET_NEXT_ASSERTION. lastcmd == 0x%02x\n", getAssertionState.lastcmd);
dump_hex1(TAG_GREEN, (uint8_t*)&getAssertionState, sizeof(getAssertionState));
status = CTAP2_ERR_NOT_ALLOWED; status = CTAP2_ERR_NOT_ALLOWED;
} }
break; break;

View File

@@ -137,7 +137,6 @@ uint8_t parse_user(CTAP_makeCredential * MC, CborValue * val)
return CTAP2_ERR_LIMIT_EXCEEDED; return CTAP2_ERR_LIMIT_EXCEEDED;
} }
MC->credInfo.user.id_size = sz; MC->credInfo.user.id_size = sz;
printf1(TAG_GREEN,"parsed id_size: %d\r\n", MC->credInfo.user.id_size);
check_ret(ret); check_ret(ret);
} }
else if (strcmp((const char *)key, "name") == 0) else if (strcmp((const char *)key, "name") == 0)
@@ -904,9 +903,6 @@ uint8_t parse_credential_descriptor(CborValue * arr, CTAP_credentialDescriptor *
buflen = sizeof(CredentialId); buflen = sizeof(CredentialId);
ret = cbor_value_copy_byte_string(&val, (uint8_t*)&cred->credential.id, &buflen, NULL); ret = cbor_value_copy_byte_string(&val, (uint8_t*)&cred->credential.id, &buflen, NULL);
printf1(TAG_GREEN,"KEYL is %d\r\n", buflen);
printf1(TAG_GREEN,"MAX is %d\r\n", sizeof(CredentialId));
if (buflen == U2F_KEY_HANDLE_SIZE) if (buflen == U2F_KEY_HANDLE_SIZE)
{ {
printf2(TAG_PARSE,"CTAP1 credential\n"); printf2(TAG_PARSE,"CTAP1 credential\n");

View File

@@ -30,19 +30,19 @@ int main(int argc, char *argv[])
set_logging_mask( set_logging_mask(
/*0*/ /*0*/
//TAG_GEN| //TAG_GEN|
//TAG_MC | // TAG_MC |
//TAG_GA | // TAG_GA |
TAG_WALLET | TAG_WALLET |
TAG_STOR | TAG_STOR |
//TAG_NFC_APDU | //TAG_NFC_APDU |
TAG_NFC | TAG_NFC |
//TAG_CP | //TAG_CP |
TAG_CTAP| // TAG_CTAP|
//TAG_HID| //TAG_HID|
TAG_U2F| TAG_U2F|
//TAG_PARSE | //TAG_PARSE |
//TAG_TIME| //TAG_TIME|
TAG_DUMP| // TAG_DUMP|
TAG_GREEN| TAG_GREEN|
TAG_RED| TAG_RED|
TAG_EXT| TAG_EXT|