diff options
author | Joel Sing <jsing@cvs.openbsd.org> | 2014-12-07 14:58:51 +0000 |
---|---|---|
committer | Joel Sing <jsing@cvs.openbsd.org> | 2014-12-07 14:58:51 +0000 |
commit | 916756328a601cb6adc3548c88ac7cc861cbee25 (patch) | |
tree | 961f50f3919bdb51b2d77763db2c27498cdb450b /usr.bin | |
parent | 0f91aea7d238a025044263259bb77a7b15fbb099 (diff) |
Handle GF(2^m) EC curves for C code generation.
From Minux Ma.
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/openssl/ecparam.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/usr.bin/openssl/ecparam.c b/usr.bin/openssl/ecparam.c index b4d65ad2e5f..4b2119ee214 100644 --- a/usr.bin/openssl/ecparam.c +++ b/usr.bin/openssl/ecparam.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ecparam.c,v 1.4 2014/10/13 02:46:14 bcook Exp $ */ +/* $OpenBSD: ecparam.c,v 1.5 2014/12/07 14:58:50 jsing Exp $ */ /* * Written by Nils Larsch for the OpenSSL project. */ @@ -434,8 +434,9 @@ ecparam_main(int argc, char **argv) ec_b, NULL)) goto end; } else { - /* TODO */ - goto end; + if (!EC_GROUP_get_curve_GF2m(group, ec_p, ec_a, + ec_b, NULL)) + goto end; } if ((point = EC_GROUP_get0_generator(group)) == NULL) @@ -504,8 +505,9 @@ ecparam_main(int argc, char **argv) "GFp(tmp_1, tmp_2, tmp_3, NULL)) == NULL)" "\n\t\tgoto err;\n\n"); } else { - /* TODO */ - goto end; + BIO_printf(out, "\tif ((group = EC_GROUP_new_curve_" + "GF2m(tmp_1, tmp_2, tmp_3, NULL)) == NULL)" + "\n\t\tgoto err;\n\n"); } BIO_printf(out, "\t/* build generator */\n"); BIO_printf(out, "\tif ((tmp_1 = BN_bin2bn(ec_gen_%d, " |