Lines Matching refs:data

66 static int encoder_process(struct encoder_process_data_st *data);
70 struct encoder_process_data_st data; in OSSL_ENCODER_to_bio() local
72 memset(&data, 0, sizeof(data)); in OSSL_ENCODER_to_bio()
73 data.ctx = ctx; in OSSL_ENCODER_to_bio()
74 data.bio = out; in OSSL_ENCODER_to_bio()
75 data.current_encoder_inst_index = OSSL_ENCODER_CTX_get_num_encoders(ctx); in OSSL_ENCODER_to_bio()
77 if (data.current_encoder_inst_index == 0) { in OSSL_ENCODER_to_bio()
90 return encoder_process(&data) > 0; in OSSL_ENCODER_to_bio()
156 memcpy(*pdata, buf->data, buf->length); in OSSL_ENCODER_to_data()
160 *pdata = (unsigned char *)buf->data; in OSSL_ENCODER_to_data()
161 buf->data = NULL; in OSSL_ENCODER_to_data()
417 static int encoder_process(struct encoder_process_data_st *data) in encoder_process() argument
430 if (data->next_encoder_inst == NULL) { in encoder_process()
433 data->count_output_structure = in encoder_process()
434 data->ctx->output_structure == NULL ? -1 : 0; in encoder_process()
438 for (i = data->current_encoder_inst_index; i-- > 0;) { in encoder_process()
446 OSSL_ENCODER_INSTANCE_get_encoder(data->next_encoder_inst); in encoder_process()
449 sk_OSSL_ENCODER_INSTANCE_value(data->ctx->encoder_insts, i); in encoder_process()
459 new_data.ctx = data->ctx; in encoder_process()
462 new_data.count_output_structure = data->count_output_structure; in encoder_process()
463 new_data.level = data->level + 1; in encoder_process()
468 data->level, (void *)data->ctx, in encoder_process()
480 if (data->ctx->output_type != NULL in encoder_process()
482 data->ctx->output_type) != 0) { in encoder_process()
486 data->level, in encoder_process()
487 current_output_type, data->ctx->output_type); in encoder_process()
496 data->level, in encoder_process()
508 if (data->ctx->output_structure != NULL in encoder_process()
510 if (OPENSSL_strcasecmp(data->ctx->output_structure, in encoder_process()
515 data->level, in encoder_process()
517 data->ctx->output_structure); in encoder_process()
522 data->count_output_structure++; in encoder_process()
531 data->prev_encoder_inst = new_data.prev_encoder_inst; in encoder_process()
532 data->running_output = new_data.running_output; in encoder_process()
533 data->running_output_length = new_data.running_output_length; in encoder_process()
552 data->level, new_data.level); in encoder_process()
566 data->level, (void *)data->ctx); in encoder_process()
590 if (data->count_output_structure == 0) in encoder_process()
594 data->ctx->construct(current_encoder_inst, in encoder_process()
595 data->ctx->construct_data); in encoder_process()
598 data->data_type = OSSL_ENCODER_get0_name(current_encoder); in encoder_process()
607 if (!ossl_assert(data->running_output != NULL)) { in encoder_process()
621 OSSL_ENCODER_INSTANCE_get_output_structure(data->prev_encoder_inst); in encoder_process()
625 (char *)data->data_type, 0); in encoder_process()
633 data->running_output, in encoder_process()
634 data->running_output_length); in encoder_process()
652 current_out = data->bio; in encoder_process()
662 data->ctx->selection, in encoder_process()
664 &data->ctx->pwdata); in encoder_process()
668 data->level, (void *)data->ctx, in encoder_process()
674 data->prev_encoder_inst = current_encoder_inst; in encoder_process()
680 OPENSSL_free(data->running_output); in encoder_process()
681 data->running_output = NULL; in encoder_process()
691 data->running_output = (unsigned char *)buf->data; in encoder_process()
692 data->running_output_length = buf->length; in encoder_process()
698 data->ctx->cleanup(data->ctx->construct_data); in encoder_process()