Lines Matching refs:test_ctx

44     struct ccache_test_ctx *test_ctx;
60 test_ctx = talloc_zero(global_talloc_context, struct ccache_test_ctx);
61 assert_non_null(test_ctx);
63 kerr = krb5_init_context(&test_ctx->kctx);
73 kerr = krb5_parse_name(test_ctx->kctx, CCACHE_TEST_CLIENT_PRINC,
74 &test_ctx->client_principal);
76 test_creds.client = test_ctx->client_principal;
77 kerr = krb5_parse_name(test_ctx->kctx, CCACHE_TEST_SERVER_PRINC,
78 &test_ctx->server_principal);
80 test_creds.server = test_ctx->server_principal;
115 test_ctx->ccache_file_name = "FILE:" CCACHE_PATH;
117 kerr = krb5_cc_resolve(test_ctx->kctx, test_ctx->ccache_file_name,
121 kerr = krb5_cc_initialize(test_ctx->kctx, ccache, test_creds.client);
124 kerr = krb5_cc_store_cred(test_ctx->kctx, ccache, &test_creds);
127 kerr = krb5_cc_close(test_ctx->kctx, ccache);
130 check_leaks_push(test_ctx);
131 *state = test_ctx;
133 krb5_free_authdata(test_ctx->kctx, test_creds.authdata);
140 struct ccache_test_ctx *test_ctx = talloc_get_type(*state,
142 assert_non_null(test_ctx);
144 krb5_free_principal(test_ctx->kctx, test_ctx->client_principal);
145 krb5_free_principal(test_ctx->kctx, test_ctx->server_principal);
146 krb5_free_context(test_ctx->kctx);
151 assert_true(check_leaks_pop(test_ctx) == true);
152 talloc_free(test_ctx);
165 struct ccache_test_ctx *test_ctx = talloc_get_type(*state,
167 assert_non_null(test_ctx);
169 kerr = copy_ccache_into_memory(test_ctx, test_ctx->kctx,
170 test_ctx->ccache_file_name,
175 kerr = krb5_cc_resolve(test_ctx->kctx, mem_ccache_name, &ccache);
180 kerr = krb5_cc_get_principal(test_ctx->kctx, ccache, &mem_principal);
184 assert_true(krb5_principal_compare(test_ctx->kctx, mem_principal,
185 test_ctx->client_principal));
186 krb5_free_principal(test_ctx->kctx, mem_principal);
190 mcreds.client = test_ctx->client_principal;
191 mcreds.server = test_ctx->server_principal;
192 kerr = krb5_cc_retrieve_cred(test_ctx->kctx, ccache, 0, &mcreds, &creds);
194 krb5_free_cred_contents(test_ctx->kctx, &creds);
196 kerr = krb5_cc_destroy(test_ctx->kctx, ccache);