STIR/SHAKEN: Add Date header, dest->tn, and URL checking.

STIR/SHAKEN requires a Date header alongside the Identity header, so
that has been added. Still on the outgoing side, we were missing the
dest->tn section of the JSON payload, so that has been added as well.
Moving to the incoming side, URL checking has been added to the public
cert URL to ensure that it starts with http.

https://wiki.asterisk.org/wiki/display/AST/OpenSIPit+2021

Change-Id: Idee5b1b5e45bc3b483b3070e46ce322dca5b3f1c
This commit is contained in:
Ben Ford
2021-05-19 13:45:16 -05:00
committed by Joshua Colp
parent e07fd35238
commit cee88c9826
4 changed files with 89 additions and 26 deletions

View File

@@ -947,6 +947,17 @@ enum ast_sip_contact_filter {
AST_SIP_CONTACT_FILTER_REACHABLE = (1 << 0),
};
/*!
* \brief Adds a Date header to the tdata, formatted like:
* Date: Wed, 01 Jan 2021 14:53:01 GMT
* \since 16.19.0
*
* \note There is no checking done to see if the header already exists
* before adding it. It's up to the caller of this function to determine
* if that needs to be done or not.
*/
void ast_sip_add_date_header(pjsip_tx_data *tdata);
/*!
* \brief Register a SIP service in Asterisk.
*