summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/x509/x509_lu.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/x509/x509_lu.c')
-rw-r--r--src/lib/libcrypto/x509/x509_lu.c52
1 files changed, 3 insertions, 49 deletions
diff --git a/src/lib/libcrypto/x509/x509_lu.c b/src/lib/libcrypto/x509/x509_lu.c
index 7e7a5dedd0..56fb439996 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.63 2024/02/23 10:39:07 tb Exp $ */ 1/* $OpenBSD: x509_lu.c,v 1.64 2024/03/02 10:57:03 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 *
@@ -65,7 +65,7 @@
65#include <openssl/x509v3.h> 65#include <openssl/x509v3.h>
66#include "x509_local.h" 66#include "x509_local.h"
67 67
68X509_LOOKUP * 68static X509_LOOKUP *
69X509_LOOKUP_new(X509_LOOKUP_METHOD *method) 69X509_LOOKUP_new(X509_LOOKUP_METHOD *method)
70{ 70{
71 X509_LOOKUP *lu; 71 X509_LOOKUP *lu;
@@ -84,7 +84,6 @@ X509_LOOKUP_new(X509_LOOKUP_METHOD *method)
84 84
85 return lu; 85 return lu;
86} 86}
87LCRYPTO_ALIAS(X509_LOOKUP_new);
88 87
89void 88void
90X509_LOOKUP_free(X509_LOOKUP *ctx) 89X509_LOOKUP_free(X509_LOOKUP *ctx)
@@ -98,26 +97,6 @@ X509_LOOKUP_free(X509_LOOKUP *ctx)
98LCRYPTO_ALIAS(X509_LOOKUP_free); 97LCRYPTO_ALIAS(X509_LOOKUP_free);
99 98
100int 99int
101X509_LOOKUP_init(X509_LOOKUP *ctx)
102{
103 if (ctx->method == NULL)
104 return 0;
105 /* Historical behavior: make init succeed even without method. */
106 return 1;
107}
108LCRYPTO_ALIAS(X509_LOOKUP_init);
109
110int
111X509_LOOKUP_shutdown(X509_LOOKUP *ctx)
112{
113 if (ctx->method == NULL)
114 return 0;
115 /* Historical behavior: make shutdown succeed even without method. */
116 return 1;
117}
118LCRYPTO_ALIAS(X509_LOOKUP_shutdown);
119
120int
121X509_LOOKUP_ctrl(X509_LOOKUP *ctx, int cmd, const char *argc, long argl, 100X509_LOOKUP_ctrl(X509_LOOKUP *ctx, int cmd, const char *argc, long argl,
122 char **ret) 101 char **ret)
123{ 102{
@@ -129,7 +108,7 @@ X509_LOOKUP_ctrl(X509_LOOKUP *ctx, int cmd, const char *argc, long argl,
129} 108}
130LCRYPTO_ALIAS(X509_LOOKUP_ctrl); 109LCRYPTO_ALIAS(X509_LOOKUP_ctrl);
131 110
132int 111static int
133X509_LOOKUP_by_subject(X509_LOOKUP *ctx, X509_LOOKUP_TYPE type, X509_NAME *name, 112X509_LOOKUP_by_subject(X509_LOOKUP *ctx, X509_LOOKUP_TYPE type, X509_NAME *name,
134 X509_OBJECT *ret) 113 X509_OBJECT *ret)
135{ 114{
@@ -137,31 +116,6 @@ X509_LOOKUP_by_subject(X509_LOOKUP *ctx, X509_LOOKUP_TYPE type, X509_NAME *name,
137 return 0; 116 return 0;
138 return ctx->method->get_by_subject(ctx, type, name, ret); 117 return ctx->method->get_by_subject(ctx, type, name, ret);
139} 118}
140LCRYPTO_ALIAS(X509_LOOKUP_by_subject);
141
142int
143X509_LOOKUP_by_issuer_serial(X509_LOOKUP *ctx, X509_LOOKUP_TYPE type,
144 X509_NAME *name, ASN1_INTEGER *serial, X509_OBJECT *ret)
145{
146 return 0;
147}
148LCRYPTO_ALIAS(X509_LOOKUP_by_issuer_serial);
149
150int
151X509_LOOKUP_by_fingerprint(X509_LOOKUP *ctx, X509_LOOKUP_TYPE type,
152 const unsigned char *bytes, int len, X509_OBJECT *ret)
153{
154 return 0;
155}
156LCRYPTO_ALIAS(X509_LOOKUP_by_fingerprint);
157
158int
159X509_LOOKUP_by_alias(X509_LOOKUP *ctx, X509_LOOKUP_TYPE type, const char *str,
160 int len, X509_OBJECT *ret)
161{
162 return 0;
163}
164LCRYPTO_ALIAS(X509_LOOKUP_by_alias);
165 119
166static int 120static int
167x509_object_cmp(const X509_OBJECT * const *a, const X509_OBJECT * const *b) 121x509_object_cmp(const X509_OBJECT * const *a, const X509_OBJECT * const *b)