Lines Matching refs:data
43 static int encoder_process(struct encoder_process_data_st *data);
47 struct encoder_process_data_st data; in OSSL_ENCODER_to_bio() local
49 memset(&data, 0, sizeof(data)); in OSSL_ENCODER_to_bio()
50 data.ctx = ctx; in OSSL_ENCODER_to_bio()
51 data.bio = out; in OSSL_ENCODER_to_bio()
52 data.current_encoder_inst_index = OSSL_ENCODER_CTX_get_num_encoders(ctx); in OSSL_ENCODER_to_bio()
54 if (data.current_encoder_inst_index == 0) { in OSSL_ENCODER_to_bio()
67 return encoder_process(&data) > 0; in OSSL_ENCODER_to_bio()
133 memcpy(*pdata, buf->data, buf->length); in OSSL_ENCODER_to_data()
137 *pdata = (unsigned char *)buf->data; in OSSL_ENCODER_to_data()
138 buf->data = NULL; in OSSL_ENCODER_to_data()
394 static int encoder_process(struct encoder_process_data_st *data) in encoder_process() argument
407 if (data->next_encoder_inst == NULL) { in encoder_process()
410 data->count_output_structure = in encoder_process()
411 data->ctx->output_structure == NULL ? -1 : 0; in encoder_process()
415 for (i = data->current_encoder_inst_index; i-- > 0;) { in encoder_process()
423 OSSL_ENCODER_INSTANCE_get_encoder(data->next_encoder_inst); in encoder_process()
426 sk_OSSL_ENCODER_INSTANCE_value(data->ctx->encoder_insts, i); in encoder_process()
436 new_data.ctx = data->ctx; in encoder_process()
439 new_data.count_output_structure = data->count_output_structure; in encoder_process()
440 new_data.level = data->level + 1; in encoder_process()
445 data->level, (void *)data->ctx, in encoder_process()
457 if (data->ctx->output_type != NULL in encoder_process()
459 data->ctx->output_type) != 0) { in encoder_process()
463 data->level, in encoder_process()
464 current_output_type, data->ctx->output_type); in encoder_process()
473 data->level, in encoder_process()
485 if (data->ctx->output_structure != NULL in encoder_process()
487 if (OPENSSL_strcasecmp(data->ctx->output_structure, in encoder_process()
492 data->level, in encoder_process()
494 data->ctx->output_structure); in encoder_process()
499 data->count_output_structure++; in encoder_process()
508 data->prev_encoder_inst = new_data.prev_encoder_inst; in encoder_process()
509 data->running_output = new_data.running_output; in encoder_process()
510 data->running_output_length = new_data.running_output_length; in encoder_process()
529 data->level, new_data.level); in encoder_process()
543 data->level, (void *)data->ctx); in encoder_process()
567 if (data->count_output_structure == 0) in encoder_process()
571 data->ctx->construct(current_encoder_inst, in encoder_process()
572 data->ctx->construct_data); in encoder_process()
575 data->data_type = OSSL_ENCODER_get0_name(current_encoder); in encoder_process()
584 if (!ossl_assert(data->running_output != NULL)) { in encoder_process()
598 OSSL_ENCODER_INSTANCE_get_output_structure(data->prev_encoder_inst); in encoder_process()
602 (char *)data->data_type, 0); in encoder_process()
610 data->running_output, in encoder_process()
611 data->running_output_length); in encoder_process()
629 current_out = data->bio; in encoder_process()
639 data->ctx->selection, in encoder_process()
641 &data->ctx->pwdata); in encoder_process()
645 data->level, (void *)data->ctx, in encoder_process()
651 data->prev_encoder_inst = current_encoder_inst; in encoder_process()
657 OPENSSL_free(data->running_output); in encoder_process()
658 data->running_output = NULL; in encoder_process()
668 data->running_output = (unsigned char *)buf->data; in encoder_process()
669 data->running_output_length = buf->length; in encoder_process()
675 data->ctx->cleanup(data->ctx->construct_data); in encoder_process()