38 lines
1.2 KiB
Diff
38 lines
1.2 KiB
Diff
--- a/u2f-host/u2fmisc.c 2019-05-15 07:54:11.000000000 -0400
|
|
+++ b/u2f-host/u2fmisc.c 2020-05-31 11:19:24.305252337 -0400
|
|
@@ -19,6 +19,7 @@
|
|
#include "internal.h"
|
|
|
|
#include <json.h>
|
|
+#include <stdbool.h>
|
|
|
|
#include "sha256.h"
|
|
|
|
@@ -30,7 +31,7 @@
|
|
#define u2fh_json_object_object_get(obj, key, value) json_object_object_get_ex(obj, key, &value)
|
|
#else
|
|
typedef int json_bool;
|
|
-#define u2fh_json_object_object_get(obj, key, value) (value = json_object_object_get(obj, key)) == NULL ? (json_bool)FALSE : (json_bool)TRUE
|
|
+#define u2fh_json_object_object_get(obj, key, value) (value = json_object_object_get(obj, key)) == NULL ? (json_bool)false : (json_bool)true
|
|
#endif
|
|
|
|
static void
|
|
@@ -114,7 +115,7 @@
|
|
if (debug)
|
|
fprintf (stderr, "JSON: %s\n", json_object_to_json_string (jo));
|
|
|
|
- if (u2fh_json_object_object_get (jo, "appId", k) == FALSE)
|
|
+ if (u2fh_json_object_object_get (jo, "appId", k) == false)
|
|
return U2FH_JSON_ERROR;
|
|
|
|
app_id = json_object_get_string (k);
|
|
@@ -390,7 +391,7 @@
|
|
if (debug)
|
|
fprintf (stderr, "JSON: %s\n", json_object_to_json_string (jo));
|
|
|
|
- if (u2fh_json_object_object_get (jo, key, k) == FALSE)
|
|
+ if (u2fh_json_object_object_get (jo, key, k) == false)
|
|
return U2FH_JSON_ERROR;
|
|
|
|
urlb64 = json_object_get_string (k);
|