summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortb <>2021-11-05 17:09:36 +0000
committertb <>2021-11-05 17:09:36 +0000
commit262944deecac641df0dca52b43336752ae3d1041 (patch)
tree885ffe3ea6fbe6d101eacabd6ffb77ffe1c8c19a
parent7f11ef3d087b85d9ef80b28d47e8ce3d7382cacf (diff)
downloadopenbsd-262944deecac641df0dca52b43336752ae3d1041.tar.gz
openbsd-262944deecac641df0dca52b43336752ae3d1041.tar.bz2
openbsd-262944deecac641df0dca52b43336752ae3d1041.zip
Garbage collect the unused skip member of X509_LOOKUP and
the unused cache member of X509_STORE. ok jsing
-rw-r--r--src/lib/libcrypto/x509/x509_lcl.h2
-rw-r--r--src/lib/libcrypto/x509/x509_lu.c4
2 files changed, 1 insertions, 5 deletions
diff --git a/src/lib/libcrypto/x509/x509_lcl.h b/src/lib/libcrypto/x509/x509_lcl.h
index e1894e5523..9ef99584d1 100644
--- a/src/lib/libcrypto/x509/x509_lcl.h
+++ b/src/lib/libcrypto/x509/x509_lcl.h
@@ -288,7 +288,6 @@ struct X509_VERIFY_PARAM_st {
288 */ 288 */
289struct x509_store_st { 289struct x509_store_st {
290 /* The following is a cache of trusted certs */ 290 /* The following is a cache of trusted certs */
291 int cache; /* if true, stash any hits */
292 STACK_OF(X509_OBJECT) *objs; /* Cache of all objects */ 291 STACK_OF(X509_OBJECT) *objs; /* Cache of all objects */
293 292
294 /* These are external lookup methods */ 293 /* These are external lookup methods */
@@ -316,7 +315,6 @@ struct x509_store_st {
316/* This is the functions plus an instance of the local variables. */ 315/* This is the functions plus an instance of the local variables. */
317struct x509_lookup_st { 316struct x509_lookup_st {
318 int init; /* have we been started */ 317 int init; /* have we been started */
319 int skip; /* don't use us. */
320 X509_LOOKUP_METHOD *method; /* the functions */ 318 X509_LOOKUP_METHOD *method; /* the functions */
321 char *method_data; /* method data */ 319 char *method_data; /* method data */
322 320
diff --git a/src/lib/libcrypto/x509/x509_lu.c b/src/lib/libcrypto/x509/x509_lu.c
index 3fa572c7ef..69e11f35cb 100644
--- a/src/lib/libcrypto/x509/x509_lu.c
+++ b/src/lib/libcrypto/x509/x509_lu.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: x509_lu.c,v 1.42 2021/11/05 17:08:12 tb Exp $ */ 1/* $OpenBSD: x509_lu.c,v 1.43 2021/11/05 17:09:36 tb Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -134,8 +134,6 @@ X509_LOOKUP_by_subject(X509_LOOKUP *ctx, X509_LOOKUP_TYPE type, X509_NAME *name,
134{ 134{
135 if (ctx->method == NULL || ctx->method->get_by_subject == NULL) 135 if (ctx->method == NULL || ctx->method->get_by_subject == NULL)
136 return 0; 136 return 0;
137 if (ctx->skip)
138 return 0;
139 return ctx->method->get_by_subject(ctx, type, name, ret); 137 return ctx->method->get_by_subject(ctx, type, name, ret);
140} 138}
141 139