mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
jws: compact representation helper must use dots
This commit is contained in:
parent
4a5f1d83c2
commit
cf41c3e793
1 changed files with 6 additions and 0 deletions
|
@ -934,9 +934,15 @@ lws_jws_write_compact(struct lws_jws *jws, char *compact, size_t len)
|
|||
lws_strnncpy(compact + n, jws->map_b64.buf[LJWS_JOSE],
|
||||
jws->map_b64.len[LJWS_JOSE], len - n);
|
||||
n += strlen(compact + n);
|
||||
if (n >= len - 1)
|
||||
return 1;
|
||||
compact[n++] = '.';
|
||||
lws_strnncpy(compact + n, jws->map_b64.buf[LJWS_PYLD],
|
||||
jws->map_b64.len[LJWS_PYLD], len - n);
|
||||
n += strlen(compact + n);
|
||||
if (n >= len - 1)
|
||||
return 1;
|
||||
compact[n++] = '.';
|
||||
lws_strnncpy(compact + n, jws->map_b64.buf[LJWS_SIG],
|
||||
jws->map_b64.len[LJWS_SIG], len - n);
|
||||
n += strlen(compact + n);
|
||||
|
|
Loading…
Add table
Reference in a new issue