]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_stir_shaken: Add unit tests for signing and verification.
authorBen Ford <bford@digium.com>
Wed, 13 May 2020 21:37:25 +0000 (16:37 -0500)
committerGeorge Joseph <gjoseph@digium.com>
Tue, 6 Oct 2020 14:07:51 +0000 (09:07 -0500)
commit9d7628829cef6be12dc8029c720ce5e18e4701f0
tree58969ee8ce5d754443f47832a8cefa6172646e1b
parent035b463c931a36c15a87118bc3fab832e8ad79c5
 res_stir_shaken: Add unit tests for signing and verification.

Added two unit tests, one for signing and another for verifying.
stir_shaken_sign checks to make sure that all the required parameters
are passed in and then signs the actual payload. If a signature is
produced and a payload returned as a result, the test passes.
stir_shaken_verify takes the signature from a signed payload to verify.
This unit test also verifies that all the required information is passed
in, and then attempts to verify the signature. If verification is
successful and a payload is returned, the test passes.

Change-Id: I9fa43380f861ccf710cd0f6b6c102a517c86ea13
res/res_stir_shaken.c
res/res_stir_shaken/certificate.c
res/res_stir_shaken/certificate.h
res/res_stir_shaken/stir_shaken.c