Lines Matching refs:ctx

119 static int get_issuer(X509 **issuer, X509_STORE_CTX *ctx, X509 *x);
843 X509_STORE_CTX *ctx = NULL;
909 if ((ctx = X509_STORE_CTX_new()) == NULL) {
914 (void) X509_STORE_CTX_init(ctx, sec_truststore,
916 (void) X509_STORE_CTX_set_purpose(ctx,
920 X509_STORE_CTX_set_verify_cb(ctx, web_verify);
926 (void) X509_STORE_CTX_set_app_data(ctx, &verify_data);
929 i = X509_verify_cert(ctx);
930 if (i <= 0 && ctx->error != X509_V_ERR_CERT_HAS_EXPIRED) {
932 get_subject_display_name(ctx->current_cert);
934 get_issuer_display_name(ctx->current_cert);
936 if (ctx->error != X509_V_OK) {
940 (char *)X509_verify_cert_error_string(ctx->error));
979 get_subject_display_name(ctx->current_cert);
981 get_subject_display_name(ctx->current_cert);
1011 if (ctx)
1012 X509_STORE_CTX_cleanup(ctx);
1022 * ctx - The context handle of the current verification operation
1032 web_verify(int ok, X509_STORE_CTX *ctx)
1047 err = ((verify_cb_data_t *)X509_STORE_CTX_get_app_data(ctx))->err;
1048 proxy = ((verify_cb_data_t *)X509_STORE_CTX_get_app_data(ctx))->proxy;
1049 cas = ((verify_cb_data_t *)X509_STORE_CTX_get_app_data(ctx))->cas;
1052 curr_cert = X509_STORE_CTX_get_current_cert(ctx);
1063 if (get_issuer(&curr_issuer, ctx, curr_cert) <= 0) {
1569 * ctx - The current verification context
1575 get_issuer(X509 **issuer, X509_STORE_CTX *ctx, X509 *x)
1583 if ((ok = ctx->get_issuer(issuer, ctx, x)) > 0) {
1587 if (ctx->untrusted != NULL) {
1589 for (i = 0; i < sk_X509_num(ctx->untrusted); i++) {
1590 if (X509_check_issued(sk_X509_value(ctx->untrusted, i),
1592 *issuer = sk_X509_value(ctx->untrusted, i);