MCPcopy Create free account
hub / github.com/apache/httpd / ssl_cmd_check_file

Function ssl_cmd_check_file

modules/ssl/ssl_engine_config.c:820–845  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

818 (SSL_PCM_EXISTS|SSL_PCM_ISDIR)
819
820static const char *ssl_cmd_check_file(cmd_parms *parms,
821 const char **file)
822{
823 const char *filepath;
824
825 /* If only dumping the config, don't verify the paths */
826 if (ap_state_query(AP_SQ_RUN_MODE) == AP_SQ_RM_CONFIG_DUMP) {
827 return NULL;
828 }
829
830 filepath = ap_server_root_relative(parms->pool, *file);
831 if (!filepath) {
832 return apr_pstrcat(parms->pool, parms->cmd->name,
833 ": Invalid file path ", *file, NULL);
834 }
835 *file = filepath;
836
837 if (ssl_util_path_check(SSL_FLAGS_CHECK_FILE, *file, parms->pool)) {
838 return NULL;
839 }
840
841 return apr_pstrcat(parms->pool, parms->cmd->name,
842 ": file '", *file,
843 "' does not exist or is empty", NULL);
844
845}
846
847const char *ssl_cmd_SSLCompression(cmd_parms *cmd, void *dcfg, int flag)
848{

Calls 3

ap_state_queryFunction · 0.85
ap_server_root_relativeFunction · 0.85
ssl_util_path_checkFunction · 0.85

Tested by

no test coverage detected