diff options
Diffstat (limited to '')
| -rw-r--r-- | src/regress/lib/libcrypto/ec/ec_point_conversion.c | 17 | ||||
| -rw-r--r-- | src/regress/lib/libcrypto/ecdh/ecdhtest.c | 35 |
2 files changed, 4 insertions, 48 deletions
diff --git a/src/regress/lib/libcrypto/ec/ec_point_conversion.c b/src/regress/lib/libcrypto/ec/ec_point_conversion.c index 398f868615..e65e686da7 100644 --- a/src/regress/lib/libcrypto/ec/ec_point_conversion.c +++ b/src/regress/lib/libcrypto/ec/ec_point_conversion.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: ec_point_conversion.c,v 1.12 2023/04/18 08:05:18 tb Exp $ */ | 1 | /* $OpenBSD: ec_point_conversion.c,v 1.13 2023/04/26 09:31:12 tb Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2021 Theo Buehler <tb@openbsd.org> | 3 | * Copyright (c) 2021 Theo Buehler <tb@openbsd.org> |
| 4 | * Copyright (c) 2021 Joel Sing <jsing@openbsd.org> | 4 | * Copyright (c) 2021 Joel Sing <jsing@openbsd.org> |
| @@ -118,23 +118,12 @@ test_random_points_on_curve(EC_builtin_curve *curve) | |||
| 118 | BIGNUM *order = NULL; | 118 | BIGNUM *order = NULL; |
| 119 | BIGNUM *random; | 119 | BIGNUM *random; |
| 120 | BIGNUM *x, *y; | 120 | BIGNUM *x, *y; |
| 121 | const char *curve_name; | ||
| 122 | size_t i, j; | 121 | size_t i, j; |
| 123 | int failed = 0; | 122 | int failed = 0; |
| 124 | 123 | ||
| 125 | curve_name = OBJ_nid2sn(curve->nid); | ||
| 126 | if ((group = EC_GROUP_new_by_curve_name(curve->nid)) == NULL) | 124 | if ((group = EC_GROUP_new_by_curve_name(curve->nid)) == NULL) |
| 127 | errx(1, "EC_GROUP_new_by_curve_name(%s)", curve_name); | 125 | errx(1, "EC_GROUP_new_by_curve_name(%s)", |
| 128 | 126 | OBJ_nid2sn(curve->nid)); | |
| 129 | #ifndef OPENSSL_NO_EC2M | ||
| 130 | if (EC_GROUP_get_basis_type(group)) { | ||
| 131 | EC_GROUP_free(group); | ||
| 132 | fprintf(stderr, "%s ... skipped\n", curve_name); | ||
| 133 | return 0; | ||
| 134 | } | ||
| 135 | #endif | ||
| 136 | |||
| 137 | fprintf(stderr, "%s\n", curve_name); | ||
| 138 | 127 | ||
| 139 | if ((order = BN_new()) == NULL) | 128 | if ((order = BN_new()) == NULL) |
| 140 | errx(1, "BN_new order"); | 129 | errx(1, "BN_new order"); |
diff --git a/src/regress/lib/libcrypto/ecdh/ecdhtest.c b/src/regress/lib/libcrypto/ecdh/ecdhtest.c index bf68a88e4e..e6046a5400 100644 --- a/src/regress/lib/libcrypto/ecdh/ecdhtest.c +++ b/src/regress/lib/libcrypto/ecdh/ecdhtest.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: ecdhtest.c,v 1.13 2023/03/08 16:51:42 tb Exp $ */ | 1 | /* $OpenBSD: ecdhtest.c,v 1.14 2023/04/26 09:31:12 tb Exp $ */ |
| 2 | /* ==================================================================== | 2 | /* ==================================================================== |
| 3 | * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. | 3 | * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. |
| 4 | * | 4 | * |
| @@ -407,39 +407,6 @@ main(int argc, char *argv[]) | |||
| 407 | goto err; | 407 | goto err; |
| 408 | if (!test_ecdh_curve(NID_secp521r1, "NIST Prime-Curve P-521", ctx, out)) | 408 | if (!test_ecdh_curve(NID_secp521r1, "NIST Prime-Curve P-521", ctx, out)) |
| 409 | goto err; | 409 | goto err; |
| 410 | #ifndef OPENSSL_NO_EC2M | ||
| 411 | /* NIST BINARY CURVES TESTS */ | ||
| 412 | if (!test_ecdh_curve(NID_sect163k1, "NIST Binary-Curve K-163", | ||
| 413 | ctx, out)) | ||
| 414 | goto err; | ||
| 415 | if (!test_ecdh_curve(NID_sect163r2, "NIST Binary-Curve B-163", | ||
| 416 | ctx, out)) | ||
| 417 | goto err; | ||
| 418 | if (!test_ecdh_curve(NID_sect233k1, "NIST Binary-Curve K-233", | ||
| 419 | ctx, out)) | ||
| 420 | goto err; | ||
| 421 | if (!test_ecdh_curve(NID_sect233r1, "NIST Binary-Curve B-233", | ||
| 422 | ctx, out)) | ||
| 423 | goto err; | ||
| 424 | if (!test_ecdh_curve(NID_sect283k1, "NIST Binary-Curve K-283", | ||
| 425 | ctx, out)) | ||
| 426 | goto err; | ||
| 427 | if (!test_ecdh_curve(NID_sect283r1, "NIST Binary-Curve B-283", | ||
| 428 | ctx, out)) | ||
| 429 | goto err; | ||
| 430 | if (!test_ecdh_curve(NID_sect409k1, "NIST Binary-Curve K-409", | ||
| 431 | ctx, out)) | ||
| 432 | goto err; | ||
| 433 | if (!test_ecdh_curve(NID_sect409r1, "NIST Binary-Curve B-409", | ||
| 434 | ctx, out)) | ||
| 435 | goto err; | ||
| 436 | if (!test_ecdh_curve(NID_sect571k1, "NIST Binary-Curve K-571", | ||
| 437 | ctx, out)) | ||
| 438 | goto err; | ||
| 439 | if (!test_ecdh_curve(NID_sect571r1, "NIST Binary-Curve B-571", | ||
| 440 | ctx, out)) | ||
| 441 | goto err; | ||
| 442 | #endif | ||
| 443 | if (!test_ecdh_kat(out, "Brainpool Prime-Curve brainpoolP256r1", 256)) | 410 | if (!test_ecdh_kat(out, "Brainpool Prime-Curve brainpoolP256r1", 256)) |
| 444 | goto err; | 411 | goto err; |
| 445 | if (!test_ecdh_kat(out, "Brainpool Prime-Curve brainpoolP384r1", 384)) | 412 | if (!test_ecdh_kat(out, "Brainpool Prime-Curve brainpoolP384r1", 384)) |
