Skip to content

Commit

Permalink
Add alg parameter to Identity header
Browse files Browse the repository at this point in the history
  • Loading branch information
kworm83 committed Jan 18, 2022
1 parent 429a42c commit b767649
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion modules/stir_shaken/stir_shaken.c
Expand Up @@ -784,7 +784,7 @@ static int add_identity_hf(struct sip_msg *msg, EVP_PKEY *pkey,

hdr_buf.len = IDENTITY_HDR_LEN + unsigned_buf.len + 1/*'.'*/ +
calc_base64_encode_len(RAW_SIG_LEN) + 1/*';'*/ + HDR_INFO_PARAM_LEN +
2/*'<','>'*/ + cr_url->len + 1/*';'*/ + HDR_PPT_PARAM_LEN + CRLF_LEN;
2/*'<','>'*/ + cr_url->len + 1/*';'*/ + HDR_ALG_PARAM_LEN + 1/*';'*/ + HDR_PPT_PARAM_LEN + CRLF_LEN;
hdr_buf.s = pkg_malloc(hdr_buf.len);
if (!hdr_buf.s) {
LM_ERR("oom!\n");
Expand Down Expand Up @@ -814,6 +814,9 @@ static int add_identity_hf(struct sip_msg *msg, EVP_PKEY *pkey,
hdr_buf.len += cr_url->len;
hdr_buf.s[hdr_buf.len++] = '>';
hdr_buf.s[hdr_buf.len++] = ';';
memcpy(hdr_buf.s + hdr_buf.len, HDR_ALG_PARAM_S, HDR_ALG_PARAM_LEN);
+ hdr_buf.len += HDR_ALG_PARAM_LEN;
+ hdr_buf.s[hdr_buf.len++] = ';';
memcpy(hdr_buf.s + hdr_buf.len, HDR_PPT_PARAM_S, HDR_PPT_PARAM_LEN);
hdr_buf.len += HDR_PPT_PARAM_LEN;
memcpy(hdr_buf.s + hdr_buf.len, CRLF, CRLF_LEN);
Expand Down

0 comments on commit b767649

Please sign in to comment.