summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/regress/lib/libcrypto/wycheproof/wycheproof.go10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/regress/lib/libcrypto/wycheproof/wycheproof.go b/src/regress/lib/libcrypto/wycheproof/wycheproof.go
index c5fb81b94d..2ac0ff9fe4 100644
--- a/src/regress/lib/libcrypto/wycheproof/wycheproof.go
+++ b/src/regress/lib/libcrypto/wycheproof/wycheproof.go
@@ -1,4 +1,4 @@
1/* $OpenBSD: wycheproof.go,v 1.185 2025/09/08 06:47:34 tb Exp $ */ 1/* $OpenBSD: wycheproof.go,v 1.186 2025/09/08 07:07:36 tb Exp $ */
2/* 2/*
3 * Copyright (c) 2018,2023 Joel Sing <jsing@openbsd.org> 3 * Copyright (c) 2018,2023 Joel Sing <jsing@openbsd.org>
4 * Copyright (c) 2018,2019,2022-2025 Theo Buehler <tb@openbsd.org> 4 * Copyright (c) 2018,2019,2022-2025 Theo Buehler <tb@openbsd.org>
@@ -723,10 +723,12 @@ func nidFromString(ns string) (int, error) {
723 return -1, fmt.Errorf("unknown NID %q", ns) 723 return -1, fmt.Errorf("unknown NID %q", ns)
724} 724}
725 725
726func skipSmallCurve(nid int) bool { 726func skipCurve(nid int) bool {
727 switch C.int(nid) { 727 switch C.int(nid) {
728 case C.NID_secp160k1, C.NID_secp160r1, C.NID_secp160r2, C.NID_secp192k1, C.NID_X9_62_prime192v1: 728 case C.NID_secp160k1, C.NID_secp160r1, C.NID_secp160r2, C.NID_secp192k1, C.NID_X9_62_prime192v1:
729 return true 729 return true
730 case C.NID_sect283k1, C.NID_sect283r1, C.NID_sect409k1, C.NID_sect409r1, C.NID_sect571k1, C.NID_sect571r1:
731 return true
730 } 732 }
731 return false 733 return false
732} 734}
@@ -1727,7 +1729,7 @@ func (wtg *wycheproofTestGroupECDH) run(algorithm string, variant testVariant) b
1727 if err != nil { 1729 if err != nil {
1728 log.Fatalf("Failed to get nid for curve: %v", err) 1730 log.Fatalf("Failed to get nid for curve: %v", err)
1729 } 1731 }
1730 if skipSmallCurve(nid) { 1732 if skipCurve(nid) {
1731 return true 1733 return true
1732 } 1734 }
1733 1735
@@ -1888,7 +1890,7 @@ func (wtg *wycheproofTestGroupECDSA) run(algorithm string, variant testVariant)
1888 if err != nil { 1890 if err != nil {
1889 log.Fatalf("Failed to get nid for curve: %v", err) 1891 log.Fatalf("Failed to get nid for curve: %v", err)
1890 } 1892 }
1891 if skipSmallCurve(nid) { 1893 if skipCurve(nid) {
1892 return true 1894 return true
1893 } 1895 }
1894 ecKey := C.EC_KEY_new_by_curve_name(C.int(nid)) 1896 ecKey := C.EC_KEY_new_by_curve_name(C.int(nid))