mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-03 04:16:43 +00:00
STIR/SHAKEN: Fix certificate type and storage.
During OpenSIPit, we found out that the public certificates must be of type X.509. When reading in public keys, we use the corresponding X.509 functions now. We also discovered that we needed a better naming scheme for the certificates since certificates with the same name would cause issues (overwriting certs, etc.). Now when we download a public certificate, we get the serial number from it and use that as the name of the cached certificate. The configuration option public_key_url in stir_shaken.conf has also been renamed to public_cert_url, which better describes what the option is for. https://wiki.asterisk.org/wiki/display/AST/OpenSIPit+2021 Change-Id: Ia00b20835f5f976e3603797f2f2fb19672d8114d
This commit is contained in:
@@ -61,13 +61,15 @@ char *curl_cb_data_get_expires(const struct curl_cb_data *data);
|
||||
/*!
|
||||
* \brief CURL the public key from the provided URL to the specified path
|
||||
*
|
||||
* \param public_key_url The public key URL
|
||||
* \note The returned string will need to be freed by the caller
|
||||
*
|
||||
* \param public_cert_url The public cert URL
|
||||
* \param path The path to download the file to
|
||||
* \param data The curl_cb_data
|
||||
*
|
||||
* \retval 1 on failure
|
||||
* \retval 0 on success
|
||||
* \retval NULL on failure
|
||||
* \retval full path filename on success
|
||||
*/
|
||||
int curl_public_key(const char *public_key_url, const char *path, struct curl_cb_data *data);
|
||||
char *curl_public_key(const char *public_cert_url, const char *path, struct curl_cb_data *data);
|
||||
|
||||
#endif /* _STIR_SHAKEN_CURL_H */
|
||||
|
||||
Reference in New Issue
Block a user