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
Showing
- Makefile 1 addition, 1 deletionMakefile
- doc/UPGRADE-staging/res_stir_shaken_directory.txt 5 additions, 0 deletionsdoc/UPGRADE-staging/res_stir_shaken_directory.txt
- include/asterisk/res_stir_shaken.h 20 additions, 0 deletionsinclude/asterisk/res_stir_shaken.h
- res/res_stir_shaken.c 493 additions, 5 deletionsres/res_stir_shaken.c
- res/res_stir_shaken/certificate.c 1 addition, 1 deletionres/res_stir_shaken/certificate.c
- res/res_stir_shaken/curl.c 199 additions, 0 deletionsres/res_stir_shaken/curl.c
- res/res_stir_shaken/curl.h 73 additions, 0 deletionsres/res_stir_shaken/curl.h
- res/res_stir_shaken/general.c 11 additions, 0 deletionsres/res_stir_shaken/general.c
- res/res_stir_shaken/general.h 11 additions, 0 deletionsres/res_stir_shaken/general.h
- res/res_stir_shaken/stir_shaken.c 14 additions, 8 deletionsres/res_stir_shaken/stir_shaken.c
- res/res_stir_shaken/stir_shaken.h 4 additions, 3 deletionsres/res_stir_shaken/stir_shaken.h
Loading
Please register or sign in to comment