-/* $OpenBSD: by_dir.c,v 1.45 2023/12/25 22:14:23 tb Exp $ */
+/* $OpenBSD: by_dir.c,v 1.46 2023/12/29 05:33:32 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
dir_ctrl(X509_LOOKUP *ctx, int cmd, const char *argp, long argl,
char **retp)
{
+ BY_DIR *ld = ctx->method_data;
int ret = 0;
- BY_DIR *ld;
-
- ld = (BY_DIR *)ctx->method_data;
switch (cmd) {
case X509_L_ADD_DIR:
return 0;
}
a->dirs = NULL;
- lu->method_data = (char *)a;
+ lu->method_data = a;
return 1;
}
{
BY_DIR *a;
- a = (BY_DIR *)lu->method_data;
+ a = lu->method_data;
sk_BY_DIR_ENTRY_pop_free(a->dirs, by_dir_entry_free);
BUF_MEM_free(a->buffer);
free(a);
goto finish;
}
- ctx = (BY_DIR *)xl->method_data;
+ ctx = xl->method_data;
h = X509_NAME_hash(name);
for (i = 0; i < sk_BY_DIR_ENTRY_num(ctx->dirs); i++) {
-/* $OpenBSD: x509_local.h,v 1.16 2023/12/29 05:17:20 tb Exp $ */
+/* $OpenBSD: x509_local.h,v 1.17 2023/12/29 05:33:32 tb Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project 2013.
*/
/* This is the functions plus an instance of the local variables. */
struct x509_lookup_st {
X509_LOOKUP_METHOD *method; /* the functions */
- char *method_data; /* method data */
+ void *method_data; /* method data */
X509_STORE *store_ctx; /* who owns us */
} /* X509_LOOKUP */;