Lines Matching refs:out
130 BIO *in = NULL, *out = NULL; in MAIN() local
306 out=BIO_new(BIO_s_file()); in MAIN()
307 if ((in == NULL) || (out == NULL)) in MAIN()
325 BIO_set_fp(out,stdout,BIO_NOCLOSE); in MAIN()
329 out = BIO_push(tmpbio, out); in MAIN()
335 if (BIO_write_filename(out,outfile) <= 0) in MAIN()
377 BIO_printf(out, " %-10s: ", sname); in MAIN()
378 BIO_printf(out, "%s\n", comment); in MAIN()
461 if (!ECPKParameters_print(out, group, 0)) in MAIN()
549 ecparam_print_var(out, ec_p, "ec_p", len, buffer); in MAIN()
550 ecparam_print_var(out, ec_a, "ec_a", len, buffer); in MAIN()
551 ecparam_print_var(out, ec_b, "ec_b", len, buffer); in MAIN()
552 ecparam_print_var(out, ec_gen, "ec_gen", len, buffer); in MAIN()
553 ecparam_print_var(out, ec_order, "ec_order", len, buffer); in MAIN()
554 ecparam_print_var(out, ec_cofactor, "ec_cofactor", len, in MAIN()
557 BIO_printf(out, "\n\n"); in MAIN()
559 BIO_printf(out, "EC_GROUP *get_ec_group_%d(void)\n\t{\n", len); in MAIN()
560 BIO_printf(out, "\tint ok=0;\n"); in MAIN()
561 BIO_printf(out, "\tEC_GROUP *group = NULL;\n"); in MAIN()
562 BIO_printf(out, "\tEC_POINT *point = NULL;\n"); in MAIN()
563 BIO_printf(out, "\tBIGNUM *tmp_1 = NULL, *tmp_2 = NULL, " in MAIN()
565 BIO_printf(out, "\tif ((tmp_1 = BN_bin2bn(ec_p_%d, " in MAIN()
568 BIO_printf(out, "\tif ((tmp_2 = BN_bin2bn(ec_a_%d, " in MAIN()
571 BIO_printf(out, "\tif ((tmp_3 = BN_bin2bn(ec_b_%d, " in MAIN()
576 BIO_printf(out, "\tif ((group = EC_GROUP_new_curve_" in MAIN()
585 BIO_printf(out, "\t/* build generator */\n"); in MAIN()
586 BIO_printf(out, "\tif ((tmp_1 = BN_bin2bn(ec_gen_%d, " in MAIN()
589 BIO_printf(out, "\tpoint = EC_POINT_bn2point(group, tmp_1, " in MAIN()
591 BIO_printf(out, "\tif (point == NULL)\n\t\tgoto err;\n"); in MAIN()
592 BIO_printf(out, "\tif ((tmp_2 = BN_bin2bn(ec_order_%d, " in MAIN()
595 BIO_printf(out, "\tif ((tmp_3 = BN_bin2bn(ec_cofactor_%d, " in MAIN()
598 BIO_printf(out, "\tif (!EC_GROUP_set_generator(group, point," in MAIN()
600 BIO_printf(out, "\n\tok=1;\n"); in MAIN()
601 BIO_printf(out, "err:\n"); in MAIN()
602 BIO_printf(out, "\tif (tmp_1)\n\t\tBN_free(tmp_1);\n"); in MAIN()
603 BIO_printf(out, "\tif (tmp_2)\n\t\tBN_free(tmp_2);\n"); in MAIN()
604 BIO_printf(out, "\tif (tmp_3)\n\t\tBN_free(tmp_3);\n"); in MAIN()
605 BIO_printf(out, "\tif (point)\n\t\tEC_POINT_free(point);\n"); in MAIN()
606 BIO_printf(out, "\tif (!ok)\n"); in MAIN()
607 BIO_printf(out, "\t\t{\n"); in MAIN()
608 BIO_printf(out, "\t\tEC_GROUP_free(group);\n"); in MAIN()
609 BIO_printf(out, "\t\tgroup = NULL;\n"); in MAIN()
610 BIO_printf(out, "\t\t}\n"); in MAIN()
611 BIO_printf(out, "\treturn(group);\n\t}\n"); in MAIN()
617 i = i2d_ECPKParameters_bio(out, group); in MAIN()
619 i = PEM_write_bio_ECPKParameters(out, group); in MAIN()
661 i = i2d_ECPrivateKey_bio(out, eckey); in MAIN()
663 i = PEM_write_bio_ECPrivateKey(out, eckey, NULL, in MAIN()
696 if (out != NULL) in MAIN()
697 BIO_free_all(out); in MAIN()
704 static int ecparam_print_var(BIO *out, BIGNUM *in, const char *var, in ecparam_print_var() argument
707 BIO_printf(out, "static unsigned char %s_%d[] = {", var, len); in ecparam_print_var()
709 BIO_printf(out, "\n\t0x00"); in ecparam_print_var()
718 BIO_printf(out, "\n\t"); in ecparam_print_var()
719 BIO_printf(out, "0x%02X,", buffer[i]); in ecparam_print_var()
722 BIO_printf(out, "\n\t"); in ecparam_print_var()
723 BIO_printf(out, "0x%02X", buffer[i]); in ecparam_print_var()
725 BIO_printf(out, "\n\t};\n\n"); in ecparam_print_var()