(util_ldap_state_t *)ap_get_module_config(cmd->server->module_config,
&ldap_module);
const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
+ apr_finfo_t finfo;
+
if (err != NULL) {
return err;
}
st->cert_auth_file = ap_server_root_relative(cmd->pool, file);
+ if (st->cert_auth_file &&
+ (apr_stat (&finfo, st->cert_auth_file, APR_FINFO_MIN, cmd->pool) != APR_SUCCESS))
+ {
+ ap_log_error(APLOG_MARK, APLOG_ERR, 0, cmd->server,
+ "LDAP: Could not open SSL trusted certificate authority file - %s",
+ st->cert_auth_file == NULL ? file : st->cert_auth_file);
+ return "Invalid file path";
+ }
+
return(NULL);
}