diff options
| author | jsing <> | 2014-12-07 14:58:50 +0000 |
|---|---|---|
| committer | jsing <> | 2014-12-07 14:58:50 +0000 |
| commit | 0eaa29b6532ab032e411dcff4650b06dc3747dd0 (patch) | |
| tree | 7f5179a6cbdb8690e06dde4a5ee82b1c550d2140 | |
| parent | c9a56f5b6b9be93d7b9773dc5ec926d954765dec (diff) | |
| download | openbsd-0eaa29b6532ab032e411dcff4650b06dc3747dd0.tar.gz openbsd-0eaa29b6532ab032e411dcff4650b06dc3747dd0.tar.bz2 openbsd-0eaa29b6532ab032e411dcff4650b06dc3747dd0.zip | |
Handle GF(2^m) EC curves for C code generation.
From Minux Ma.
Diffstat (limited to '')
| -rw-r--r-- | src/usr.bin/openssl/ecparam.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/usr.bin/openssl/ecparam.c b/src/usr.bin/openssl/ecparam.c index b4d65ad2e5..4b2119ee21 100644 --- a/src/usr.bin/openssl/ecparam.c +++ b/src/usr.bin/openssl/ecparam.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: ecparam.c,v 1.4 2014/10/13 02:46:14 bcook Exp $ */ | 1 | /* $OpenBSD: ecparam.c,v 1.5 2014/12/07 14:58:50 jsing Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Written by Nils Larsch for the OpenSSL project. | 3 | * Written by Nils Larsch for the OpenSSL project. |
| 4 | */ | 4 | */ |
| @@ -434,8 +434,9 @@ ecparam_main(int argc, char **argv) | |||
| 434 | ec_b, NULL)) | 434 | ec_b, NULL)) |
| 435 | goto end; | 435 | goto end; |
| 436 | } else { | 436 | } else { |
| 437 | /* TODO */ | 437 | if (!EC_GROUP_get_curve_GF2m(group, ec_p, ec_a, |
| 438 | goto end; | 438 | ec_b, NULL)) |
| 439 | goto end; | ||
| 439 | } | 440 | } |
| 440 | 441 | ||
| 441 | if ((point = EC_GROUP_get0_generator(group)) == NULL) | 442 | if ((point = EC_GROUP_get0_generator(group)) == NULL) |
| @@ -504,8 +505,9 @@ ecparam_main(int argc, char **argv) | |||
| 504 | "GFp(tmp_1, tmp_2, tmp_3, NULL)) == NULL)" | 505 | "GFp(tmp_1, tmp_2, tmp_3, NULL)) == NULL)" |
| 505 | "\n\t\tgoto err;\n\n"); | 506 | "\n\t\tgoto err;\n\n"); |
| 506 | } else { | 507 | } else { |
| 507 | /* TODO */ | 508 | BIO_printf(out, "\tif ((group = EC_GROUP_new_curve_" |
| 508 | goto end; | 509 | "GF2m(tmp_1, tmp_2, tmp_3, NULL)) == NULL)" |
| 510 | "\n\t\tgoto err;\n\n"); | ||
| 509 | } | 511 | } |
| 510 | BIO_printf(out, "\t/* build generator */\n"); | 512 | BIO_printf(out, "\t/* build generator */\n"); |
| 511 | BIO_printf(out, "\tif ((tmp_1 = BN_bin2bn(ec_gen_%d, " | 513 | BIO_printf(out, "\tif ((tmp_1 = BN_bin2bn(ec_gen_%d, " |
