Lines Matching defs:out
49 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
93 * -out arg - output file - default stdout
130 BIO *in = NULL, *out = NULL;
170 else if (strcmp(*argv,"-out") == 0)
258 BIO_printf(bio_err, " -out arg output file - "
303 out=BIO_new(BIO_s_file());
304 if ((in == NULL) || (out == NULL))
322 BIO_set_fp(out,stdout,BIO_NOCLOSE);
326 out = BIO_push(tmpbio, out);
332 if (BIO_write_filename(out,outfile) <= 0)
374 BIO_printf(out, " %-10s: ", sname);
375 BIO_printf(out, "%s\n", comment);
458 if (!ECPKParameters_print(out, group, 0))
546 ecparam_print_var(out, ec_p, "ec_p", len, buffer);
547 ecparam_print_var(out, ec_a, "ec_a", len, buffer);
548 ecparam_print_var(out, ec_b, "ec_b", len, buffer);
549 ecparam_print_var(out, ec_gen, "ec_gen", len, buffer);
550 ecparam_print_var(out, ec_order, "ec_order", len, buffer);
551 ecparam_print_var(out, ec_cofactor, "ec_cofactor", len,
554 BIO_printf(out, "\n\n");
556 BIO_printf(out, "EC_GROUP *get_ec_group_%d(void)\n\t{\n", len);
557 BIO_printf(out, "\tint ok=0;\n");
558 BIO_printf(out, "\tEC_GROUP *group = NULL;\n");
559 BIO_printf(out, "\tEC_POINT *point = NULL;\n");
560 BIO_printf(out, "\tBIGNUM *tmp_1 = NULL, *tmp_2 = NULL, "
562 BIO_printf(out, "\tif ((tmp_1 = BN_bin2bn(ec_p_%d, "
565 BIO_printf(out, "\tif ((tmp_2 = BN_bin2bn(ec_a_%d, "
568 BIO_printf(out, "\tif ((tmp_3 = BN_bin2bn(ec_b_%d, "
573 BIO_printf(out, "\tif ((group = EC_GROUP_new_curve_"
582 BIO_printf(out
583 BIO_printf(out, "\tif ((tmp_1 = BN_bin2bn(ec_gen_%d, "
586 BIO_printf(out, "\tpoint = EC_POINT_bn2point(group, tmp_1, "
588 BIO_printf(out, "\tif (point == NULL)\n\t\tgoto err;\n");
589 BIO_printf(out, "\tif ((tmp_2 = BN_bin2bn(ec_order_%d, "
592 BIO_printf(out, "\tif ((tmp_3 = BN_bin2bn(ec_cofactor_%d, "
595 BIO_printf(out, "\tif (!EC_GROUP_set_generator(group, point,"
597 BIO_printf(out, "\n\tok=1;\n");
598 BIO_printf(out, "err:\n");
599 BIO_printf(out, "\tif (tmp_1)\n\t\tBN_free(tmp_1);\n");
600 BIO_printf(out, "\tif (tmp_2)\n\t\tBN_free(tmp_2);\n");
601 BIO_printf(out, "\tif (tmp_3)\n\t\tBN_free(tmp_3);\n");
602 BIO_printf(out, "\tif (point)\n\t\tEC_POINT_free(point);\n");
603 BIO_printf(out, "\tif (!ok)\n");
604 BIO_printf(out, "\t\t{\n");
605 BIO_printf(out, "\t\tEC_GROUP_free(group);\n");
606 BIO_printf(out, "\t\tgroup = NULL;\n");
607 BIO_printf(out, "\t\t}\n");
608 BIO_printf(out, "\treturn(group);\n\t}\n");
614 i = i2d_ECPKParameters_bio(out, group);
616 i = PEM_write_bio_ECPKParameters(out, group);
658 i = i2d_ECPrivateKey_bio(out, eckey);
660 i = PEM_write_bio_ECPrivateKey(out, eckey, NULL,
693 if (out != NULL)
694 BIO_free_all(out);
701 static int ecparam_print_var(BIO *out, BIGNUM *in, const char *var,
704 BIO_printf(out, "static unsigned char %s_%d[] = {", var, len);
706 BIO_printf(out, "\n\t0x00");
715 BIO_printf(out, "\n\t");
716 BIO_printf(out, "0x%02X,", buffer[i]);
719 BIO_printf(out, "\n\t");
720 BIO_printf(out, "0x%02X", buffer[i]);
722 BIO_printf(out, "\n\t};\n\n");