]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_stir_shaken: Implemented signature verification.
authorBen Ford <bford@digium.com>
Wed, 15 Apr 2020 18:15:21 +0000 (13:15 -0500)
committerGeorge Joseph <gjoseph@digium.com>
Tue, 6 Oct 2020 14:07:51 +0000 (09:07 -0500)
commit70af7e13114da93109332c125210a3b274dc89b3
tree5b81bf28bbd2591aae2a0c5304c439dd3a95ebab
parent971b125fc08b4066ea3f3704c732421eeda7cac4
res_stir_shaken: Implemented signature verification.

There are a lot of moving parts in this patch, but the focus of it is on
the verification of the signature using a public key located at the
public key URL provided in the JSON payload. First, we check the
database to see if we have already downloaded the key. If so, check to
see if it has expired. If it has, redownload from the URL. If we don't
have an entry in the database, just go ahead and download the public
key. The expiration is tested each time we download the file. After
that, read the public key from the file and use it to verify the
signature. All sanity checking is done when the payload is first
received, so the verification is complete once this point is reached.

The XML has also been added since a new config option was added to
general (curl_timeout). The maximum amount of time to wait for a
download can be configured through this option, with a low value by
default.

Change-Id: I3ba4c63880493bf8c7d17a9cfca1af0e934d1a1c
Makefile
doc/UPGRADE-staging/res_stir_shaken_directory.txt [new file with mode: 0644]
include/asterisk/res_stir_shaken.h
res/res_stir_shaken.c
res/res_stir_shaken/certificate.c
res/res_stir_shaken/curl.c [new file with mode: 0644]
res/res_stir_shaken/curl.h [new file with mode: 0644]
res/res_stir_shaken/general.c
res/res_stir_shaken/general.h
res/res_stir_shaken/stir_shaken.c
res/res_stir_shaken/stir_shaken.h