From 6ae1cd3865c217dabf8a23e924964c68bc173083 Mon Sep 17 00:00:00 2001 From: Conor Patrick Date: Wed, 24 Apr 2019 18:36:36 -0400 Subject: [PATCH] remove not-useful logs --- fido2/ctap.c | 11 +---------- fido2/ctap_parse.c | 4 ---- fido2/main.c | 8 ++++---- 3 files changed, 5 insertions(+), 18 deletions(-) diff --git a/fido2/ctap.c b/fido2/ctap.c index b4abc85..e3f76a1 100644 --- a/fido2/ctap.c +++ b/fido2/ctap.c @@ -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); // 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); { 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_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); 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); 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)) { 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); check_ret(ret); - printf1(TAG_GREEN,"id_size: %d\r\n", user->id_size); { ret = cbor_encode_text_string(&entity, "id", 2); check_ret(ret); @@ -1107,7 +1100,6 @@ uint8_t ctap_get_next_assertion(CborEncoder * encoder) } 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 (!getAssertionState.user_verified) @@ -1673,7 +1665,6 @@ uint8_t ctap_request(uint8_t * pkt_raw, int length, CTAP_RESPONSE * resp) else { 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; } break; diff --git a/fido2/ctap_parse.c b/fido2/ctap_parse.c index 75dcb7f..ffa1301 100644 --- a/fido2/ctap_parse.c +++ b/fido2/ctap_parse.c @@ -137,7 +137,6 @@ uint8_t parse_user(CTAP_makeCredential * MC, CborValue * val) return CTAP2_ERR_LIMIT_EXCEEDED; } MC->credInfo.user.id_size = sz; - printf1(TAG_GREEN,"parsed id_size: %d\r\n", MC->credInfo.user.id_size); check_ret(ret); } else if (strcmp((const char *)key, "name") == 0) @@ -904,9 +903,6 @@ uint8_t parse_credential_descriptor(CborValue * arr, CTAP_credentialDescriptor * buflen = sizeof(CredentialId); 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) { printf2(TAG_PARSE,"CTAP1 credential\n"); diff --git a/fido2/main.c b/fido2/main.c index b7b7d69..f794375 100644 --- a/fido2/main.c +++ b/fido2/main.c @@ -30,19 +30,19 @@ int main(int argc, char *argv[]) set_logging_mask( /*0*/ //TAG_GEN| - //TAG_MC | - //TAG_GA | + // TAG_MC | + // TAG_GA | TAG_WALLET | TAG_STOR | //TAG_NFC_APDU | TAG_NFC | //TAG_CP | - TAG_CTAP| + // TAG_CTAP| //TAG_HID| TAG_U2F| //TAG_PARSE | //TAG_TIME| - TAG_DUMP| + // TAG_DUMP| TAG_GREEN| TAG_RED| TAG_EXT|