#include <openssl/lhash.h>
#include <openssl/x509.h>
-DECLARE_STACK_OF(BY_DIR_HASH)
-DECLARE_STACK_OF(BY_DIR_ENTRY)
typedef struct lookup_dir_hashes_st
{
STACK_OF(BY_DIR_ENTRY) *dirs;
} BY_DIR;
+DECLARE_STACK_OF(BY_DIR_HASH)
+DECLARE_STACK_OF(BY_DIR_ENTRY)
static int dir_ctrl(X509_LOOKUP *ctx, int cmd, const char *argp, long argl,
char **ret);
s=dir;
p=s;
- for (;;)
+ for (;;p++)
{
if ((*p == LIST_SEPARATOR_CHAR) || (*p == '\0'))
{
for (j=0; j < sk_BY_DIR_ENTRY_num(ctx->dirs); j++)
{
ent = sk_BY_DIR_ENTRY_value(ctx->dirs, j);
- if (strncmp(ent->dir,ss,(unsigned int)len) == 0)
- continue;
+ if (strlen(ent->dir) == (size_t)len &&
+ strncmp(ent->dir,ss,(unsigned int)len) == 0)
+ break;
}
-
+ if (j < sk_BY_DIR_ENTRY_num(ctx->dirs))
+ continue;
if (ctx->dirs == NULL)
{
ctx->dirs = sk_BY_DIR_ENTRY_new_null();
}
if (*p == '\0')
break;
- p++;
}
return 1;
}
postfix,k);
}
#ifndef OPENSSL_NO_POSIX_IO
+#ifdef _WIN32
+#define stat _stat
+#endif
{
struct stat st;
if (stat(b->data,&st) < 0)