summaryrefslogtreecommitdiff
path: root/src/json
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-01-19 21:18:03 +0100
committerChristian Grothoff <christian@grothoff.org>2020-01-19 21:18:03 +0100
commitc48e4a8a06f5554ff484f1a60c8e5673e70a897a (patch)
treec1a044a461300beaf967e3f5abe098d431a38e7c /src/json
parent84fd3013138db335d34fb734608b43fe2b85641e (diff)
downloadexchange-c48e4a8a06f5554ff484f1a60c8e5673e70a897a.tar.gz
exchange-c48e4a8a06f5554ff484f1a60c8e5673e70a897a.tar.bz2
exchange-c48e4a8a06f5554ff484f1a60c8e5673e70a897a.zip
comment on JSON canonicalization
Diffstat (limited to 'src/json')
-rw-r--r--src/json/json.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/json/json.c b/src/json/json.c
index 688086a5..807ea0b6 100644
--- a/src/json/json.c
+++ b/src/json/json.c
@@ -25,7 +25,13 @@
/**
- * Hash a JSON for binary signing.
+ * Hash a JSON object for binary signing.
+ *
+ * See https://tools.ietf.org/html/draft-rundgren-json-canonicalization-scheme-15
+ * for fun JSON canonicalization problems. Callers must ensure that
+ * those are avoided in the input. We will use libjanson's "JSON_COMPACT"
+ * encoding for whitespace and "JSON_SORT_KEYS" to canonicalize as best
+ * as we can.
*
* @param[in] json some JSON value
* @param[out] hc resulting hash code