store_ctx
struct store_ctx *sc = ctx;
struct store_ctx sc;
verify_callback(int preverify_ok, X509_STORE_CTX *store_ctx)
ssl = X509_STORE_CTX_get_ex_data(store_ctx,
x = X509_STORE_CTX_get_current_cert(store_ctx);
depth = X509_STORE_CTX_get_error_depth(store_ctx);
err = X509_STORE_CTX_get_error(store_ctx);
struct util_store_cap_data store_ctx;
store_ctx.engine = e;
store_ctx.cap_buf = &cap_buf;
store_ctx.cap_size = &cap_size;
store_ctx.ok = 1;
OSSL_STORE_do_all_loaders(util_store_cap, &store_ctx);
if (!store_ctx.ok)
X509_STORE_CTX *store_ctx = NULL;
store_ctx = X509_STORE_CTX_new_ex(app_get0_libctx(), app_get0_propq());
if (store_ctx == NULL) {
if (!X509_STORE_CTX_init(store_ctx, store, cert, untrusted_certs)) {
if (X509_verify_cert(store_ctx) > 0)
chn = X509_STORE_CTX_get1_chain(store_ctx);
else if ((i = X509_STORE_CTX_get_error(store_ctx)) == 0)
X509_STORE_CTX_free(store_ctx);
OSSL_STORE_CTX *store_ctx = NULL;
if ((store_ctx = OSSL_STORE_open_ex(uri, libctx, app_get0_propq(), uimeth, uidata,
if (!OSSL_STORE_expect(store_ctx, expected)) {
if (!OSSL_STORE_supports_search(store_ctx, criterion)) {
if (!OSSL_STORE_find(store_ctx, search)) {
OSSL_STORE_INFO *info = OSSL_STORE_load(store_ctx);
if (OSSL_STORE_error(store_ctx)) {
if (OSSL_STORE_eof(store_ctx))
if (OSSL_STORE_eof(store_ctx))
if (!OSSL_STORE_close(store_ctx)) {
static int selfsigned_verify_cb(int ok, X509_STORE_CTX *store_ctx)
&& X509_STORE_CTX_get_error_depth(store_ctx) == 0
&& X509_STORE_CTX_get_error(store_ctx)
STACK_OF(X509) *chain = X509_STORE_CTX_get0_chain(store_ctx);
STACK_OF(X509) *untrusted = X509_STORE_CTX_get0_untrusted(store_ctx);
X509_STORE_CTX_check_issued_fn check_issued = X509_STORE_CTX_get_check_issued(store_ctx);
trust = X509_STORE_get1_all_certs(X509_STORE_CTX_get0_store(store_ctx));
if ((*check_issued)(store_ctx, cert, issuer)) {
X509_STORE *ts = X509_STORE_CTX_get0_store(store_ctx);
return (*verify_cb)(ok, store_ctx);
if (!X509_STORE_lock(xl->store_ctx))
j = sk_X509_OBJECT_find(xl->store_ctx->objs, &stmp);
tmp = sk_X509_OBJECT_value(xl->store_ctx->objs, j);
X509_STORE_unlock(xl->store_ctx);
if (X509_STORE_lock(xl->store_ctx)) {
if (!sk_X509_OBJECT_is_sorted(xl->store_ctx->objs)) {
sk_X509_OBJECT_sort(xl->store_ctx->objs);
X509_STORE_unlock(xl->store_ctx);
if (!X509_STORE_add_cert(ctx->store_ctx, x)) {
count = X509_STORE_add_cert(ctx->store_ctx, x);
if (!X509_STORE_add_crl(ctx->store_ctx, x)) {
count = X509_STORE_add_crl(ctx->store_ctx, x);
if (!X509_STORE_add_cert(ctx->store_ctx, itmp->x509)) {
if (!X509_STORE_add_crl(ctx->store_ctx, itmp->crl)) {
X509_STORE *store_ctx; /* who owns us */
return ctx->store_ctx;
lu->store_ctx = xs;
static void store_ctx_dane_init(X509_STORE_CTX *store_ctx, SSL *ssl)
X509_STORE_CTX_set0_dane(store_ctx, SSL_get0_dane(ssl));
X509_STORE_CTX *store_ctx = NULL;
if (!TEST_ptr(store_ctx = X509_STORE_CTX_new())
|| !TEST_true(X509_STORE_CTX_init(store_ctx, store, NULL, chain))
|| !TEST_true(X509_STORE_CTX_set_ex_data(store_ctx, store_ctx_idx,
X509_STORE_CTX_set_default(store_ctx, SSL_is_server(ssl) ? "ssl_client" : "ssl_server");
X509_VERIFY_PARAM_set1(X509_STORE_CTX_get0_param(store_ctx),
store_ctx_dane_init(store_ctx, ssl);
X509_STORE_CTX_set_verify_cb(store_ctx, SSL_get_verify_callback(ssl));
if (!TEST_int_ge(ret = X509_STORE_CTX_verify(store_ctx), 0))
SSL_set_verify_result(ssl, X509_STORE_CTX_get_error(store_ctx));
X509_STORE_CTX_free(store_ctx);
OSSL_STORE_CTX *store_ctx = NULL;
&& TEST_ptr(store_ctx = OSSL_STORE_attach(bio, "file", libctx, NULL,
OSSL_STORE_close(store_ctx);