#ifndef NO_SYS_TYPES_H
# include <sys/types.h>
#endif
-#ifdef MAC_OS_pre_X
-# include <stat.h>
-#else
+#ifndef OPENSSL_NO_POSIX_IO
# include <sys/stat.h>
#endif
{
int ret=0;
BY_DIR *ld;
- char *dir;
+ char *dir = NULL;
ld=(BY_DIR *)ctx->method_data;
{
case X509_L_ADD_DIR:
if (argl == X509_FILETYPE_DEFAULT)
- dir=(char *)Getenv(X509_get_default_cert_dir_env());
+ {
+ dir=(char *)getenv(X509_get_default_cert_dir_env());
if (dir)
- ret=add_cert_dir(ld,dir,X509_FILETYPE_PEM);
+ ret=add_cert_dir(ld,dir,X509_FILETYPE_PEM);
else
- {
- ret=add_cert_dir(ld,X509_get_default_cert_dir(),
- X509_FILETYPE_PEM);
- }
+ ret=add_cert_dir(ld,X509_get_default_cert_dir(),
+ X509_FILETYPE_PEM);
if (!ret)
{
X509err(X509_F_DIR_CTRL,X509_R_LOADING_CERT_DIR);
}
-
+ }
else
ret=add_cert_dir(ld,argp,(int)argl);
break;
int i,j,k;
unsigned long h;
BUF_MEM *b=NULL;
- struct stat st;
X509_OBJECT stmp,*tmp;
const char *postfix="";
postfix,k);
}
k++;
+#ifndef OPENSSL_NO_POSIX_IO
+ {
+ struct stat st;
if (stat(b->data,&st) < 0)
break;
+ }
+#endif
/* found one. */
if (type == X509_LU_X509)
{