Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/jwe.c
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ static bool _cjose_jwe_malloc(size_t bytes, bool random, uint8_t **buffer, cjose
static bool _cjose_jwe_build_hdr(cjose_jwe_t *jwe, cjose_err *err)
{
// serialize the header
char *hdr_str = json_dumps(jwe->hdr, JSON_ENCODE_ANY | JSON_PRESERVE_ORDER);
char *hdr_str = json_dumps(jwe->hdr, JSON_ENCODE_ANY | JSON_PRESERVE_ORDER | JSON_COMPACT);
if (NULL == hdr_str)
{
CJOSE_ERROR(err, CJOSE_ERR_NO_MEMORY);
Expand Down
2 changes: 1 addition & 1 deletion src/jws.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ static bool _cjose_jws_build_hdr(cjose_jws_t *jws, cjose_header_t *header, cjose
json_incref(jws->hdr);

// base64url encode the header
char *hdr_str = json_dumps(jws->hdr, JSON_ENCODE_ANY | JSON_PRESERVE_ORDER);
char *hdr_str = json_dumps(jws->hdr, JSON_ENCODE_ANY | JSON_PRESERVE_ORDER | JSON_COMPACT);
if (NULL == hdr_str)
{
CJOSE_ERROR(err, CJOSE_ERR_NO_MEMORY);
Expand Down