diff options
Diffstat (limited to 'src/lib/libcrypto/x509')
| -rw-r--r-- | src/lib/libcrypto/x509/x509_lu.c | 52 | ||||
| -rw-r--r-- | src/lib/libcrypto/x509/x509_vfy.h | 14 |
2 files changed, 4 insertions, 62 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) |
diff --git a/src/lib/libcrypto/x509/x509_vfy.h b/src/lib/libcrypto/x509/x509_vfy.h index 6474d5238a..755a064353 100644 --- a/src/lib/libcrypto/x509/x509_vfy.h +++ b/src/lib/libcrypto/x509/x509_vfy.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: x509_vfy.h,v 1.67 2024/03/02 10:54:39 tb Exp $ */ | 1 | /* $OpenBSD: x509_vfy.h,v 1.68 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 | * |
| @@ -363,19 +363,7 @@ int X509_load_cert_file(X509_LOOKUP *ctx, const char *file, int type); | |||
| 363 | int X509_load_crl_file(X509_LOOKUP *ctx, const char *file, int type); | 363 | int X509_load_crl_file(X509_LOOKUP *ctx, const char *file, int type); |
| 364 | int X509_load_cert_crl_file(X509_LOOKUP *ctx, const char *file, int type); | 364 | int X509_load_cert_crl_file(X509_LOOKUP *ctx, const char *file, int type); |
| 365 | 365 | ||
| 366 | |||
| 367 | X509_LOOKUP *X509_LOOKUP_new(X509_LOOKUP_METHOD *method); | ||
| 368 | void X509_LOOKUP_free(X509_LOOKUP *ctx); | 366 | void X509_LOOKUP_free(X509_LOOKUP *ctx); |
| 369 | int X509_LOOKUP_init(X509_LOOKUP *ctx); | ||
| 370 | int X509_LOOKUP_by_subject(X509_LOOKUP *ctx, X509_LOOKUP_TYPE type, | ||
| 371 | X509_NAME *name, X509_OBJECT *ret); | ||
| 372 | int X509_LOOKUP_by_issuer_serial(X509_LOOKUP *ctx, X509_LOOKUP_TYPE type, | ||
| 373 | X509_NAME *name, ASN1_INTEGER *serial, X509_OBJECT *ret); | ||
| 374 | int X509_LOOKUP_by_fingerprint(X509_LOOKUP *ctx, X509_LOOKUP_TYPE type, | ||
| 375 | const unsigned char *bytes, int len, X509_OBJECT *ret); | ||
| 376 | int X509_LOOKUP_by_alias(X509_LOOKUP *ctx, X509_LOOKUP_TYPE type, | ||
| 377 | const char *str, int len, X509_OBJECT *ret); | ||
| 378 | int X509_LOOKUP_shutdown(X509_LOOKUP *ctx); | ||
| 379 | 367 | ||
| 380 | int X509_STORE_load_locations(X509_STORE *ctx, | 368 | int X509_STORE_load_locations(X509_STORE *ctx, |
| 381 | const char *file, const char *dir); | 369 | const char *file, const char *dir); |
