From 8342012e073f5d7ec8f53950da5f08c28b5d4c07 Mon Sep 17 00:00:00 2001 From: Hans Zandbelt Date: Mon, 1 Oct 2018 16:10:16 +0200 Subject: [PATCH] preserve key order in order to be able to compare serialized JWTs _cjose_test_json_serial in check_jwe would fail with older versions of Jansson that don't have the JSON_PRESERVE_ORDER flag set by default Signed-off-by: Hans Zandbelt --- src/jwe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/jwe.c b/src/jwe.c index 822d408..204075d 100644 --- a/src/jwe.c +++ b/src/jwe.c @@ -1640,7 +1640,7 @@ char *cjose_jwe_export_json(cjose_jwe_t *jwe, cjose_err *err) } } - char *json_str = json_dumps(form, 0); + char *json_str = json_dumps(form, JSON_PRESERVE_ORDER); if (NULL == json_str) { CJOSE_ERROR(err, CJOSE_ERR_NO_MEMORY);