diff options
| author | tb <> | 2024-03-02 10:57:03 +0000 |
|---|---|---|
| committer | tb <> | 2024-03-02 10:57:03 +0000 |
| commit | 71f803228f85a85e040f88d8df2af4393f0d64c6 (patch) | |
| tree | 077afe863b1e03170c61fd04aaca7031177307f3 /src/lib/libcrypto/x509/x509_lu.c | |
| parent | 674fe4ef9bc076029351013b920100f4c1cbfb40 (diff) | |
| download | openbsd-71f803228f85a85e040f88d8df2af4393f0d64c6.tar.gz openbsd-71f803228f85a85e040f88d8df2af4393f0d64c6.tar.bz2 openbsd-71f803228f85a85e040f88d8df2af4393f0d64c6.zip | |
Garbage collect most of the public LOOKUP API
Yet another bit of extensibility that no one ever really used.
X509_LOOKUP_free() needs to stay because of ... rust-openssl
(and kdelibs4support).
ok jsing
Diffstat (limited to 'src/lib/libcrypto/x509/x509_lu.c')
| -rw-r--r-- | src/lib/libcrypto/x509/x509_lu.c | 52 |
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 | ||
| 68 | X509_LOOKUP * | 68 | static X509_LOOKUP * |
| 69 | X509_LOOKUP_new(X509_LOOKUP_METHOD *method) | 69 | X509_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 | } |
| 87 | LCRYPTO_ALIAS(X509_LOOKUP_new); | ||
| 88 | 87 | ||
| 89 | void | 88 | void |
| 90 | X509_LOOKUP_free(X509_LOOKUP *ctx) | 89 | X509_LOOKUP_free(X509_LOOKUP *ctx) |
| @@ -98,26 +97,6 @@ X509_LOOKUP_free(X509_LOOKUP *ctx) | |||
| 98 | LCRYPTO_ALIAS(X509_LOOKUP_free); | 97 | LCRYPTO_ALIAS(X509_LOOKUP_free); |
| 99 | 98 | ||
| 100 | int | 99 | int |
| 101 | X509_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 | } | ||
| 108 | LCRYPTO_ALIAS(X509_LOOKUP_init); | ||
| 109 | |||
| 110 | int | ||
| 111 | X509_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 | } | ||
| 118 | LCRYPTO_ALIAS(X509_LOOKUP_shutdown); | ||
| 119 | |||
| 120 | int | ||
| 121 | X509_LOOKUP_ctrl(X509_LOOKUP *ctx, int cmd, const char *argc, long argl, | 100 | X509_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 | } |
| 130 | LCRYPTO_ALIAS(X509_LOOKUP_ctrl); | 109 | LCRYPTO_ALIAS(X509_LOOKUP_ctrl); |
| 131 | 110 | ||
| 132 | int | 111 | static int |
| 133 | X509_LOOKUP_by_subject(X509_LOOKUP *ctx, X509_LOOKUP_TYPE type, X509_NAME *name, | 112 | X509_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 | } |
| 140 | LCRYPTO_ALIAS(X509_LOOKUP_by_subject); | ||
| 141 | |||
| 142 | int | ||
| 143 | X509_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 | } | ||
| 148 | LCRYPTO_ALIAS(X509_LOOKUP_by_issuer_serial); | ||
| 149 | |||
| 150 | int | ||
| 151 | X509_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 | } | ||
| 156 | LCRYPTO_ALIAS(X509_LOOKUP_by_fingerprint); | ||
| 157 | |||
| 158 | int | ||
| 159 | X509_LOOKUP_by_alias(X509_LOOKUP *ctx, X509_LOOKUP_TYPE type, const char *str, | ||
| 160 | int len, X509_OBJECT *ret) | ||
| 161 | { | ||
| 162 | return 0; | ||
| 163 | } | ||
| 164 | LCRYPTO_ALIAS(X509_LOOKUP_by_alias); | ||
| 165 | 119 | ||
| 166 | static int | 120 | static int |
| 167 | x509_object_cmp(const X509_OBJECT * const *a, const X509_OBJECT * const *b) | 121 | x509_object_cmp(const X509_OBJECT * const *a, const X509_OBJECT * const *b) |
