Lines Matching defs:ctx

25 int OSSL_ENCODER_CTX_set_cipher(OSSL_ENCODER_CTX *ctx,
38 return OSSL_ENCODER_CTX_set_params(ctx, params);
41 int OSSL_ENCODER_CTX_set_passphrase(OSSL_ENCODER_CTX *ctx,
45 return ossl_pw_set_passphrase(&ctx->pwdata, kstr, klen);
48 int OSSL_ENCODER_CTX_set_passphrase_ui(OSSL_ENCODER_CTX *ctx,
52 return ossl_pw_set_ui_method(&ctx->pwdata, ui_method, ui_data);
55 int OSSL_ENCODER_CTX_set_pem_password_cb(OSSL_ENCODER_CTX *ctx,
58 return ossl_pw_set_pem_password_cb(&ctx->pwdata, cb, cbarg);
61 int OSSL_ENCODER_CTX_set_passphrase_cb(OSSL_ENCODER_CTX *ctx,
65 return ossl_pw_set_ossl_passphrase_cb(&ctx->pwdata, cb, cbarg);
79 OSSL_ENCODER_CTX *ctx;
115 && !encoder->does_selection(provctx, data->ctx->selection))
121 if (OSSL_ENCODER_CTX_add_encoder(data->ctx, encoder))
217 * OSSL_ENCODER_CTX_new_for_pkey() returns a ctx with no encoder if
222 static int ossl_encoder_ctx_setup_for_pkey(OSSL_ENCODER_CTX *ctx,
232 if (!ossl_assert(ctx != NULL) || !ossl_assert(pkey != NULL)) {
269 encoder_data.output_type = ctx->output_type;
270 encoder_data.output_structure = ctx->output_structure;
273 encoder_data.ctx = ctx;
296 if (data != NULL && OSSL_ENCODER_CTX_get_num_encoders(ctx) != 0) {
297 if (!OSSL_ENCODER_CTX_set_construct(ctx, encoder_construct_pkey)
298 || !OSSL_ENCODER_CTX_set_construct_data(ctx, data)
299 || !OSSL_ENCODER_CTX_set_cleanup(ctx, encoder_destruct_pkey))
311 OSSL_ENCODER_CTX_set_construct_data(ctx, NULL);
323 OSSL_ENCODER_CTX *ctx = NULL;
337 if ((ctx = OSSL_ENCODER_CTX_new()) == NULL) {
350 "(ctx %p) Looking for %s encoders with selection %d\n",
351 (void *)ctx, EVP_PKEY_get0_type_name(pkey), selection);
356 if (OSSL_ENCODER_CTX_set_output_type(ctx, output_type)
358 || OSSL_ENCODER_CTX_set_output_structure(ctx, output_struct))
359 && OSSL_ENCODER_CTX_set_selection(ctx, selection)
360 && ossl_encoder_ctx_setup_for_pkey(ctx, pkey, selection, propquery)
361 && OSSL_ENCODER_CTX_add_extra(ctx, libctx, propquery)) {
368 (void)OSSL_ENCODER_CTX_set_params(ctx, params);
371 BIO_printf(trc_out, "(ctx %p) Got %d encoders\n",
372 (void *)ctx, OSSL_ENCODER_CTX_get_num_encoders(ctx));
374 return ctx;
377 OSSL_ENCODER_CTX_free(ctx);