Lines Matching refs:ctx
35 void X509_LOOKUP_free(X509_LOOKUP *ctx)
37 if (ctx == NULL)
39 if ((ctx->method != NULL) && (ctx->method->free != NULL))
40 (*ctx->method->free) (ctx);
41 OPENSSL_free(ctx);
54 int X509_LOOKUP_init(X509_LOOKUP *ctx)
56 if (ctx->method == NULL)
58 if (ctx->method->init != NULL)
59 return ctx->method->init(ctx);
64 int X509_LOOKUP_shutdown(X509_LOOKUP *ctx)
66 if (ctx->method == NULL)
68 if (ctx->method->shutdown != NULL)
69 return ctx->method->shutdown(ctx);
74 int X509_LOOKUP_ctrl_ex(X509_LOOKUP *ctx, int cmd, const char *argc, long argl,
77 if (ctx->method == NULL)
79 if (ctx->method->ctrl_ex != NULL)
80 return ctx->method->ctrl_ex(ctx, cmd, argc, argl, ret, libctx, propq);
81 if (ctx->method->ctrl != NULL)
82 return ctx->method->ctrl(ctx, cmd, argc, argl, ret);
86 int X509_LOOKUP_ctrl(X509_LOOKUP *ctx, int cmd, const char *argc, long argl,
89 return X509_LOOKUP_ctrl_ex(ctx, cmd, argc, argl, ret, NULL, NULL);
92 int X509_LOOKUP_by_subject_ex(X509_LOOKUP *ctx, X509_LOOKUP_TYPE type,
96 if (ctx->skip
97 || ctx->method == NULL
98 || (ctx->method->get_by_subject == NULL
99 && ctx->method->get_by_subject_ex == NULL))
101 if (ctx->method->get_by_subject_ex != NULL)
102 return ctx->method->get_by_subject_ex(ctx, type, name, ret, libctx,
105 return ctx->method->get_by_subject(ctx, type, name, ret);
108 int X509_LOOKUP_by_subject(X509_LOOKUP *ctx, X509_LOOKUP_TYPE type,
111 return X509_LOOKUP_by_subject_ex(ctx, type, name, ret, NULL, NULL);
114 int X509_LOOKUP_by_issuer_serial(X509_LOOKUP *ctx, X509_LOOKUP_TYPE type,
119 if ((ctx->method == NULL) || (ctx->method->get_by_issuer_serial == NULL))
121 return ctx->method->get_by_issuer_serial(ctx, type, name, serial, ret);
124 int X509_LOOKUP_by_fingerprint(X509_LOOKUP *ctx, X509_LOOKUP_TYPE type,
128 if ((ctx->method == NULL) || (ctx->method->get_by_fingerprint == NULL))
130 return ctx->method->get_by_fingerprint(ctx, type, bytes, len, ret);
133 int X509_LOOKUP_by_alias(X509_LOOKUP *ctx, X509_LOOKUP_TYPE type,
136 if ((ctx->method == NULL) || (ctx->method->get_by_alias == NULL))
138 return ctx->method->get_by_alias(ctx, type, str, len, ret);
141 int X509_LOOKUP_set_method_data(X509_LOOKUP *ctx, void *data)
143 ctx->method_data = data;
147 void *X509_LOOKUP_get_method_data(const X509_LOOKUP *ctx)
149 return ctx->method_data;
152 X509_STORE *X509_LOOKUP_get_store(const X509_LOOKUP *ctx)
154 return ctx->store_ctx;
396 int X509_STORE_add_cert(X509_STORE *ctx, X509 *x)
398 if (!x509_store_add(ctx, x, 0)) {
405 int X509_STORE_add_crl(X509_STORE *ctx, X509_CRL *x)
407 if (!x509_store_add(ctx, x, 1)) {
584 STACK_OF(X509) *X509_STORE_CTX_get1_certs(X509_STORE_CTX *ctx,
591 X509_STORE *store = ctx->store;
611 if (!X509_STORE_CTX_get_by_subject(ctx, X509_LU_X509, nm, xobj)) {
639 STACK_OF(X509_CRL) *X509_STORE_CTX_get1_crls(const X509_STORE_CTX *ctx,
646 X509_STORE *store = ctx->store;
652 || !X509_STORE_CTX_get_by_subject(ctx, X509_LU_CRL, nm, xobj)) {
717 * Try to get issuer cert from |ctx->store| matching the subject name of |x|.
725 int X509_STORE_CTX_get1_issuer(X509 **issuer, X509_STORE_CTX *ctx, X509 *x)
729 X509_STORE *store = ctx->store;
736 ok = X509_STORE_CTX_get_by_subject(ctx, X509_LU_X509, xn, obj);
742 if (ctx->check_issued(ctx, x, obj->data.x509)) {
743 if (ossl_x509_check_cert_time(ctx, obj->data.x509, -1)) {
774 if (ctx->check_issued(ctx, x, pobj->data.x509)) {
777 if (ossl_x509_check_cert_time(ctx, pobj->data.x509, -1)) {
800 int X509_STORE_set_flags(X509_STORE *ctx, unsigned long flags)
802 return X509_VERIFY_PARAM_set_flags(ctx->param, flags);
805 int X509_STORE_set_depth(X509_STORE *ctx, int depth)
807 X509_VERIFY_PARAM_set_depth(ctx->param, depth);
811 int X509_STORE_set_purpose(X509_STORE *ctx, int purpose)
813 return X509_VERIFY_PARAM_set_purpose(ctx->param, purpose);
816 int X509_STORE_set_trust(X509_STORE *ctx, int trust)
818 return X509_VERIFY_PARAM_set_trust(ctx->param, trust);
821 int X509_STORE_set1_param(X509_STORE *ctx, const X509_VERIFY_PARAM *param)
823 return X509_VERIFY_PARAM_set1(ctx->param, param);
826 X509_VERIFY_PARAM *X509_STORE_get0_param(const X509_STORE *ctx)
828 return ctx->param;
831 void X509_STORE_set_verify(X509_STORE *ctx, X509_STORE_CTX_verify_fn verify)
833 ctx->verify = verify;
836 X509_STORE_CTX_verify_fn X509_STORE_get_verify(const X509_STORE *ctx)
838 return ctx->verify;
841 void X509_STORE_set_verify_cb(X509_STORE *ctx,
844 ctx->verify_cb = verify_cb;
847 X509_STORE_CTX_verify_cb X509_STORE_get_verify_cb(const X509_STORE *ctx)
849 return ctx->verify_cb;
852 void X509_STORE_set_get_issuer(X509_STORE *ctx,
855 ctx->get_issuer = get_issuer;
858 X509_STORE_CTX_get_issuer_fn X509_STORE_get_get_issuer(const X509_STORE *ctx)
860 return ctx->get_issuer;
863 void X509_STORE_set_check_issued(X509_STORE *ctx,
866 ctx->check_issued = check_issued;
869 X509_STORE_CTX_check_issued_fn X509_STORE_get_check_issued(const X509_STORE *ctx)
871 return ctx->check_issued;
874 void X509_STORE_set_check_revocation(X509_STORE *ctx,
877 ctx->check_revocation = check_revocation;
880 X509_STORE_CTX_check_revocation_fn X509_STORE_get_check_revocation(const X509_STORE *ctx)
882 return ctx->check_revocation;
885 void X509_STORE_set_get_crl(X509_STORE *ctx,
888 ctx->get_crl = get_crl;
891 X509_STORE_CTX_get_crl_fn X509_STORE_get_get_crl(const X509_STORE *ctx)
893 return ctx->get_crl;
896 void X509_STORE_set_check_crl(X509_STORE *ctx,
899 ctx->check_crl = check_crl;
902 X509_STORE_CTX_check_crl_fn X509_STORE_get_check_crl(const X509_STORE *ctx)
904 return ctx->check_crl;
907 void X509_STORE_set_cert_crl(X509_STORE *ctx,
910 ctx->cert_crl = cert_crl;
913 X509_STORE_CTX_cert_crl_fn X509_STORE_get_cert_crl(const X509_STORE *ctx)
915 return ctx->cert_crl;
918 void X509_STORE_set_check_policy(X509_STORE *ctx,
921 ctx->check_policy = check_policy;
924 X509_STORE_CTX_check_policy_fn X509_STORE_get_check_policy(const X509_STORE *ctx)
926 return ctx->check_policy;
929 void X509_STORE_set_lookup_certs(X509_STORE *ctx,
932 ctx->lookup_certs = lookup_certs;
935 X509_STORE_CTX_lookup_certs_fn X509_STORE_get_lookup_certs(const X509_STORE *ctx)
937 return ctx->lookup_certs;
940 void X509_STORE_set_lookup_crls(X509_STORE *ctx,
943 ctx->lookup_crls = lookup_crls;
946 X509_STORE_CTX_lookup_crls_fn X509_STORE_get_lookup_crls(const X509_STORE *ctx)
948 return ctx->lookup_crls;
951 void X509_STORE_set_cleanup(X509_STORE *ctx,
954 ctx->cleanup = ctx_cleanup;
957 X509_STORE_CTX_cleanup_fn X509_STORE_get_cleanup(const X509_STORE *ctx)
959 return ctx->cleanup;
962 int X509_STORE_set_ex_data(X509_STORE *ctx, int idx, void *data)
964 return CRYPTO_set_ex_data(&ctx->ex_data, idx, data);
967 void *X509_STORE_get_ex_data(const X509_STORE *ctx, int idx)
969 return CRYPTO_get_ex_data(&ctx->ex_data, idx);
972 X509_STORE *X509_STORE_CTX_get0_store(const X509_STORE_CTX *ctx)
974 return ctx->store;