This commit is contained in:
iceman1001 2021-05-11 15:43:12 +02:00
commit 1ff1fa7385
4 changed files with 15 additions and 15 deletions

View file

@ -174,7 +174,7 @@ static int CmdHFFidoRegister(const char *cmd) {
} }
json_t *root = NULL; json_t *root = NULL;
int res = loadFileJSONroot(filename, (void**)&root, verbose); int res = loadFileJSONroot(filename, (void **)&root, verbose);
if (res != PM3_SUCCESS) { if (res != PM3_SUCCESS) {
CLIParserFree(ctx); CLIParserFree(ctx);
return PM3_EINVARG; return PM3_EINVARG;
@ -357,7 +357,7 @@ static int CmdHFFidoRegister(const char *cmd) {
} }
} else { } else {
PrintAndLogEx(WARNING, "Invalid signature. res = %d. ( " _RED_("fail") " )" , res); PrintAndLogEx(WARNING, "Invalid signature. res = %d. ( " _RED_("fail") " )", res);
} }
PrintAndLogEx(INFO, ""); PrintAndLogEx(INFO, "");
@ -446,7 +446,7 @@ static int CmdHFFidoAuthenticate(const char *cmd) {
} }
json_t *root = NULL; json_t *root = NULL;
int res = loadFileJSONroot(filename, (void**)&root, verbose); int res = loadFileJSONroot(filename, (void **)&root, verbose);
if (res != PM3_SUCCESS) { if (res != PM3_SUCCESS) {
CLIParserFree(ctx); CLIParserFree(ctx);
return PM3_EINVARG; return PM3_EINVARG;
@ -623,7 +623,7 @@ static int CmdHFFidoAuthenticate(const char *cmd) {
PrintAndLogEx(WARNING, "No public key provided. can't check signature."); PrintAndLogEx(WARNING, "No public key provided. can't check signature.");
} }
} else { } else {
PrintAndLogEx(WARNING, "Invalid signature. res = %d. ( " _RED_("fail") " )" , res); PrintAndLogEx(WARNING, "Invalid signature. res = %d. ( " _RED_("fail") " )", res);
} }
if (root) { if (root) {
@ -678,7 +678,7 @@ static int CmdHFFido2MakeCredential(const char *cmd) {
} }
json_t *root = NULL; json_t *root = NULL;
loadFileJSONroot(filename, (void**)&root, verbose); loadFileJSONroot(filename, (void **)&root, verbose);
if (root == NULL) { if (root == NULL) {
return PM3_EFILE; return PM3_EFILE;
} }
@ -797,7 +797,7 @@ static int CmdHFFido2GetAssertion(const char *cmd) {
} }
json_t *root = NULL; json_t *root = NULL;
loadFileJSONroot(filename, (void**)&root, verbose); loadFileJSONroot(filename, (void **)&root, verbose);
if (root == NULL) { if (root == NULL) {
return PM3_EFILE; return PM3_EFILE;
} }

View file

@ -676,7 +676,7 @@ int saveFileJSONroot(const char *preferredName, void *root, size_t flags, bool v
int res = json_dump_file(root, filename, flags); int res = json_dump_file(root, filename, flags);
if ( res == 0 ) { if (res == 0) {
if (verbose) { if (verbose) {
PrintAndLogEx(SUCCESS, "saved to json file " _YELLOW_("%s"), filename); PrintAndLogEx(SUCCESS, "saved to json file " _YELLOW_("%s"), filename);
} }