Merge pull request #1444 from signalwire/opensipit02

[mod_sofia] fail set up of STIR/SHAKEN verification service if configured CA directory fails to load
This commit is contained in:
Andrey Volk 2021-11-17 22:23:28 +03:00 committed by GitHub
commit e428be3f1a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -6140,7 +6140,12 @@ static switch_status_t sofia_stir_shaken_vs_create(stir_shaken_context_t *contex
return SWITCH_STATUS_FALSE;
}
if (mod_sofia_globals.stir_shaken_vs_ca_dir) {
stir_shaken_vs_load_ca_dir(context, sofia_stir_shaken_vs, mod_sofia_globals.stir_shaken_vs_ca_dir);
if (stir_shaken_vs_load_ca_dir(context, sofia_stir_shaken_vs, mod_sofia_globals.stir_shaken_vs_ca_dir) != STIR_SHAKEN_STATUS_OK) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Failed to load trusted root certificates from %s\n", mod_sofia_globals.stir_shaken_vs_ca_dir);
return SWITCH_STATUS_FALSE;
} else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Loaded trusted root certificates from %s\n", mod_sofia_globals.stir_shaken_vs_ca_dir);
}
}
stir_shaken_vs_set_x509_cert_path_check(context, sofia_stir_shaken_vs, mod_sofia_globals.stir_shaken_vs_cert_path_check);
stir_shaken_vs_set_connect_timeout(context, sofia_stir_shaken_vs, 3);