Go to the documentation of this file.
66 #include "../internal.h"
80 ret->method_data = NULL;
81 ret->store_ctx = NULL;
93 if ((
ctx->method != NULL) && (
ctx->method->free != NULL))
94 (*
ctx->method->free) (
ctx);
100 if (
ctx->method == NULL)
102 if (
ctx->method->init != NULL)
103 return ctx->method->init(
ctx);
110 if (
ctx->method == NULL)
112 if (
ctx->method->shutdown != NULL)
113 return ctx->method->shutdown(
ctx);
121 if (
ctx->method == NULL)
123 if (
ctx->method->ctrl != NULL)
132 if ((
ctx->method == NULL) || (
ctx->method->get_by_subject == NULL))
142 if ((
ctx->method == NULL) || (
ctx->method->get_by_issuer_serial == NULL))
151 if ((
ctx->method == NULL) || (
ctx->method->get_by_fingerprint == NULL))
159 if ((
ctx->method == NULL) || (
ctx->method->get_by_alias == NULL))
168 ret = ((*a)->type - (*b)->type);
171 switch ((*a)->type) {
194 if (
ret->objs == NULL)
197 ret->get_cert_methods = sk_X509_LOOKUP_new_null();
198 if (
ret->get_cert_methods == NULL)
201 if (
ret->param == NULL)
211 if (
ret->get_cert_methods)
212 sk_X509_LOOKUP_free(
ret->get_cert_methods);
214 sk_X509_OBJECT_free(
ret->objs);
257 sk = vfy->get_cert_methods;
258 for (j = 0; j < sk_X509_LOOKUP_num(sk); j++) {
259 lu = sk_X509_LOOKUP_value(sk, j);
263 sk_X509_LOOKUP_free(sk);
264 sk_X509_OBJECT_pop_free(vfy->objs,
cleanup);
277 sk =
v->get_cert_methods;
278 for (
i = 0;
i < sk_X509_LOOKUP_num(sk);
i++) {
279 lu = sk_X509_LOOKUP_value(sk,
i);
290 if (sk_X509_LOOKUP_push(
v->get_cert_methods, lu))
312 for (
i = 0;
i < (
int)sk_X509_LOOKUP_num(
ctx->get_cert_methods);
i++) {
313 lu = sk_X509_LOOKUP_value(
ctx->get_cert_methods,
i);
328 ret->data.ptr =
tmp->data.ptr;
359 }
else if (!sk_X509_OBJECT_push(
ctx->objs,
obj)) {
395 }
else if (!sk_X509_OBJECT_push(
ctx->objs,
obj)) {
463 crl_s.
crl = &crl_info_s;
472 sk_X509_OBJECT_sort(h);
473 if (!sk_X509_OBJECT_find(h, &
idx, &stmp))
476 if (pnmatch != NULL) {
481 for (tidx =
idx + 1; tidx < (
int)sk_X509_OBJECT_num(h); tidx++) {
482 tobj = sk_X509_OBJECT_value(h, tidx);
505 return sk_X509_OBJECT_value(h,
idx);
544 for (
i = 0;
i < cnt;
i++,
idx++) {
545 obj = sk_X509_OBJECT_value(
ctx->ctx->objs,
idx);
547 if (!sk_X509_push(sk,
x)) {
565 sk = sk_X509_CRL_new_null();
571 sk_X509_CRL_free(sk);
579 sk_X509_CRL_free(sk);
583 for (
i = 0;
i < cnt;
i++,
idx++) {
584 obj = sk_X509_OBJECT_value(
ctx->ctx->objs,
idx);
587 if (!sk_X509_CRL_push(sk,
x)) {
604 sk_X509_OBJECT_sort(h);
605 if (!sk_X509_OBJECT_find(h, &
idx,
x)) {
609 return sk_X509_OBJECT_value(h,
idx);
610 for (
i =
idx;
i < sk_X509_OBJECT_num(h);
i++) {
611 obj = sk_X509_OBJECT_value(h,
i);
657 for (
i =
idx;
i < sk_X509_OBJECT_num(
ctx->ctx->objs);
i++) {
658 pobj = sk_X509_OBJECT_value(
ctx->ctx->objs,
i);
725 return ctx->verify_cb;
731 ctx->get_issuer = get_issuer;
736 return ctx->get_issuer;
747 return ctx->check_issued;
758 return ctx->check_revocation;
764 ctx->get_crl = get_crl;
780 return ctx->check_crl;
791 return ctx->cert_crl;
795 X509_STORE_CTX_lookup_certs_fn lookup_certs)
797 ctx->lookup_certs = lookup_certs;
802 return ctx->lookup_certs;
806 X509_STORE_CTX_lookup_crls_fn lookup_crls)
808 ctx->lookup_crls = lookup_crls;
813 return ctx->lookup_crls;
819 ctx->cleanup = ctx_cleanup;
X509_LOOKUP * X509_STORE_add_lookup(X509_STORE *v, X509_LOOKUP_METHOD *m)
int X509_STORE_add_crl(X509_STORE *ctx, X509_CRL *x)
X509_STORE_CTX_lookup_certs_fn X509_STORE_get_lookup_certs(X509_STORE *ctx)
int X509_LOOKUP_shutdown(X509_LOOKUP *ctx)
void X509_STORE_set_get_issuer(X509_STORE *ctx, X509_STORE_CTX_get_issuer_fn get_issuer)
OPENSSL_EXPORT const ASN1_OBJECT * obj
X509_STORE_CTX_verify_cb X509_STORE_get_verify_cb(X509_STORE *ctx)
#define X509_VERIFY_PARAM_set_purpose
int(* X509_STORE_CTX_check_crl_fn)(X509_STORE_CTX *ctx, X509_CRL *crl)
void X509_STORE_set_verify(X509_STORE *ctx, X509_STORE_CTX_verify_fn verify)
#define X509_get_subject_name
void X509_STORE_set_check_crl(X509_STORE *ctx, X509_STORE_CTX_check_crl_fn check_crl)
#define X509_VERIFY_PARAM_set_trust
static int x509_object_idx_cnt(STACK_OF(X509_OBJECT) *h, int type, X509_NAME *name, int *pnmatch)
X509_STORE_CTX_lookup_crls_fn X509_STORE_get_lookup_crls(X509_STORE *ctx)
static int verify_cb(int ok, X509_STORE_CTX *ctx)
#define X509_R_CERT_ALREADY_IN_HASH_TABLE
int X509_LOOKUP_by_fingerprint(X509_LOOKUP *ctx, int type, unsigned char *bytes, int len, X509_OBJECT *ret)
void X509_STORE_set_check_revocation(X509_STORE *ctx, X509_STORE_CTX_check_revocation_fn check_revocation)
#define OPENSSL_PUT_ERROR(library, reason)
int X509_STORE_get_by_subject(X509_STORE_CTX *vs, int type, X509_NAME *name, X509_OBJECT *ret)
X509_VERIFY_PARAM * param
X509_STORE_CTX_cleanup_fn X509_STORE_get_cleanup(X509_STORE *ctx)
X509_STORE_CTX_check_crl_fn X509_STORE_get_check_crl(X509_STORE *ctx)
static int check_revocation(X509_STORE_CTX *ctx)
int X509_STORE_set_flags(X509_STORE *ctx, unsigned long flags)
int X509_STORE_set1_param(X509_STORE *ctx, X509_VERIFY_PARAM *param)
X509 * X509_OBJECT_get0_X509(const X509_OBJECT *a)
static int check_issued(X509_STORE_CTX *ctx, X509 *x, X509 *issuer)
int(* X509_STORE_CTX_verify_fn)(X509_STORE_CTX *)
static int x509_object_cmp(const X509_OBJECT **a, const X509_OBJECT **b)
#define CRYPTO_MUTEX_init
int(* X509_STORE_CTX_get_issuer_fn)(X509 **issuer, X509_STORE_CTX *ctx, X509 *x)
X509_STORE_CTX_get_crl_fn X509_STORE_get_get_crl(X509_STORE *ctx)
int X509_OBJECT_idx_by_subject(STACK_OF(X509_OBJECT) *h, int type, X509_NAME *name)
static void * OPENSSL_memset(void *dst, int c, size_t n)
static void verify(const verify_params params, const char *expected, size_t nheaders,...)
void X509_STORE_set_get_crl(X509_STORE *ctx, X509_STORE_CTX_get_crl_fn get_crl)
int X509_LOOKUP_by_issuer_serial(X509_LOOKUP *ctx, int type, X509_NAME *name, ASN1_INTEGER *serial, X509_OBJECT *ret)
X509_LOOKUP * X509_LOOKUP_new(X509_LOOKUP_METHOD *method)
#define X509_VERIFY_PARAM_new
int X509_LOOKUP_by_alias(X509_LOOKUP *ctx, int type, char *str, int len, X509_OBJECT *ret)
X509_STORE_CTX_cert_crl_fn X509_STORE_get_cert_crl(X509_STORE *ctx)
static int cert_crl(X509_STORE_CTX *ctx, X509_CRL *crl, X509 *x)
X509_STORE_CTX_check_issued_fn X509_STORE_get_check_issued(X509_STORE *ctx)
#define X509_VERIFY_PARAM_set_flags
static void cleanup(X509_OBJECT *a)
#define X509_get_issuer_name
void X509_STORE_free(X509_STORE *vfy)
X509_VERIFY_PARAM * X509_STORE_get0_param(X509_STORE *ctx)
int X509_LOOKUP_ctrl(X509_LOOKUP *ctx, int cmd, const char *argc, long argl, char **ret)
const unsigned char * data
OPENSSL_EXPORT int X509_up_ref(X509 *x509)
int X509_STORE_set_purpose(X509_STORE *ctx, int purpose)
int(* X509_STORE_CTX_check_revocation_fn)(X509_STORE_CTX *ctx)
void X509_STORE_set_lookup_crls(X509_STORE *ctx, X509_STORE_CTX_lookup_crls_fn lookup_crls)
int X509_OBJECT_get_type(const X509_OBJECT *a)
void X509_LOOKUP_free(X509_LOOKUP *ctx)
#define X509_STORE_get0_objects
#define X509_STORE_get1_crls
int(* X509_STORE_CTX_cleanup_fn)(X509_STORE_CTX *ctx)
int(* X509_STORE_CTX_cert_crl_fn)(X509_STORE_CTX *ctx, X509_CRL *crl, X509 *x)
int X509_STORE_up_ref(X509_STORE *store)
X509_STORE_CTX_check_revocation_fn X509_STORE_get_check_revocation(X509_STORE *ctx)
union x509_object_st::@359 data
#define CRYPTO_MUTEX_cleanup
int X509_STORE_add_cert(X509_STORE *ctx, X509 *x)
int X509_STORE_set_trust(X509_STORE *ctx, int trust)
int X509_STORE_CTX_get1_issuer(X509 **issuer, X509_STORE_CTX *ctx, X509 *x)
#define X509_STORE_get1_certs
#define X509_VERIFY_PARAM_set1
#define X509_VERIFY_PARAM_set_depth
UniquePtr< SSL_SESSION > ret
void X509_STORE_set_cleanup(X509_STORE *ctx, X509_STORE_CTX_cleanup_fn ctx_cleanup)
static int check_crl(X509_STORE_CTX *ctx, X509_CRL *crl)
#define CRYPTO_MUTEX_lock_write
X509_STORE_CTX_verify_fn X509_STORE_get_verify(X509_STORE *ctx)
X509_LOOKUP_METHOD * method
int X509_STORE_set_depth(X509_STORE *ctx, int depth)
int X509_LOOKUP_by_subject(X509_LOOKUP *ctx, int type, X509_NAME *name, X509_OBJECT *ret)
void X509_STORE_set_lookup_certs(X509_STORE *ctx, X509_STORE_CTX_lookup_certs_fn lookup_certs)
#define CRYPTO_refcount_inc
X509_STORE_CTX_get_issuer_fn X509_STORE_get_get_issuer(X509_STORE *ctx)
int(* X509_STORE_CTX_check_issued_fn)(X509_STORE_CTX *ctx, X509 *x, X509 *issuer)
X509_OBJECT * X509_OBJECT_retrieve_match(STACK_OF(X509_OBJECT) *h, X509_OBJECT *x)
void X509_STORE_set_check_issued(X509_STORE *ctx, X509_STORE_CTX_check_issued_fn check_issued)
int(* X509_STORE_CTX_verify_cb)(int, X509_STORE_CTX *)
#define X509_VERIFY_PARAM_free
X509_STORE * X509_STORE_CTX_get0_store(X509_STORE_CTX *ctx)
void X509_STORE_set_cert_crl(X509_STORE *ctx, X509_STORE_CTX_cert_crl_fn cert_crl)
int X509_LOOKUP_init(X509_LOOKUP *ctx)
#define CRYPTO_MUTEX_unlock_write
int X509_OBJECT_up_ref_count(X509_OBJECT *a)
void X509_OBJECT_free_contents(X509_OBJECT *a)
void X509_STORE_set_verify_cb(X509_STORE *ctx, X509_STORE_CTX_verify_cb verify_cb)
X509_OBJECT * X509_OBJECT_retrieve_by_subject(STACK_OF(X509_OBJECT) *h, int type, X509_NAME *name)
#define ERR_R_MALLOC_FAILURE
X509_STORE * X509_STORE_new(void)
#define CRYPTO_refcount_dec_and_test_zero
int(* X509_STORE_CTX_get_crl_fn)(X509_STORE_CTX *ctx, X509_CRL **crl, X509 *x)
#define X509_subject_name_cmp
CRYPTO_refcount_t references
grpc
Author(s):
autogenerated on Fri May 16 2025 03:00:55