]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_stir_shaken: Implemented signing of JSON payload.
authorBen Ford <bford@digium.com>
Thu, 26 Mar 2020 18:34:47 +0000 (13:34 -0500)
committerFriendly Automation <jenkins2@gerrit.asterisk.org>
Fri, 3 Apr 2020 16:08:29 +0000 (11:08 -0500)
commit57a457c26ca00edbd44da71efa0fd20c26c8d293
tree5c182ce21538a2daf64c1c4fc5e357eda1e2d089
parent3c345ec56d4e8c09ffafa07af91eaf9ba56b2fb7
res_stir_shaken: Implemented signing of JSON payload.

This change provides functions that take in a JSON payload, verify that
the contents contain all the mandatory fields and required values (if
any), and signs the payload with the private key. Four fields are added
to the payload: x5u, attest, iat, and origid. As of now, these are just
placeholder values that will be set to actual values once the logic is
implemented for what to do when an actual payload is received, but the
functions to add these values have all been implemented and are ready to
use. Upon successful signing and the addition of those four values, a
ast_stir_shaken_payload is returned, containing other useful information
such as the algorithm and signature.

Change-Id: I74fa41c0640ab2a64a1a80110155bd7062f13393
include/asterisk/res_stir_shaken.h
res/res_stir_shaken.c
res/res_stir_shaken/certificate.c
res/res_stir_shaken/certificate.h