From: Doug MacEachern Date: Tue, 2 Apr 2002 22:07:09 +0000 (+0000) Subject: fix SSL_X509_INFO_load_path so SSLProxyMachineCertificatePath works X-Git-Tag: 2.0.35~53 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8c1cf821b8dae300f5bbba80be152f27a10be35a;p=apache fix SSL_X509_INFO_load_path so SSLProxyMachineCertificatePath works git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94406 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/ssl/ssl_util_ssl.c b/modules/ssl/ssl_util_ssl.c index 030fac299d..b3e866fd5a 100644 --- a/modules/ssl/ssl_util_ssl.c +++ b/modules/ssl/ssl_util_ssl.c @@ -444,8 +444,13 @@ BOOL SSL_X509_INFO_load_path(apr_pool_t *ptemp, STACK_OF(X509_INFO) *sk, const char *pathname) { + /* XXX: this dir read code is exactly the same as that in + * ssl_engine_init.c, only the call to handle the fullname is different, + * should fold the duplication. + */ apr_dir_t *dir; apr_finfo_t dirent; + apr_int32_t finfo_flags = APR_FINFO_MIN|APR_FINFO_NAME; const char *fullname; BOOL ok = FALSE; @@ -453,15 +458,15 @@ BOOL SSL_X509_INFO_load_path(apr_pool_t *ptemp, return FALSE; } - while ((apr_dir_read(&dirent, APR_FINFO_DIRENT, dir)) == APR_SUCCESS) { + while ((apr_dir_read(&dirent, finfo_flags, dir)) == APR_SUCCESS) { + if (dirent.filetype == APR_DIR) { + continue; /* don't try to load directories */ + } + fullname = apr_pstrcat(ptemp, pathname, "/", dirent.name, NULL); - if (dirent.filetype != APR_REG) { - continue; - } - if (SSL_X509_INFO_load_file(ptemp, sk, fullname)) { ok = TRUE; }