diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/regress/lib/libcrypto/wycheproof/wycheproof.go | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/src/regress/lib/libcrypto/wycheproof/wycheproof.go b/src/regress/lib/libcrypto/wycheproof/wycheproof.go index feeb6c897f..39f1456b67 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.150 2023/11/06 15:17:02 tb Exp $ */ | 1 | /* $OpenBSD: wycheproof.go,v 1.151 2023/11/06 15:21:44 tb Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2018 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2018 Joel Sing <jsing@openbsd.org> |
| 4 | * Copyright (c) 2018,2019,2022 Theo Buehler <tb@openbsd.org> | 4 | * Copyright (c) 2018,2019,2022 Theo Buehler <tb@openbsd.org> |
| @@ -2830,17 +2830,15 @@ func runTestVectors(path string, variant testVariant) bool { | |||
| 2830 | 2830 | ||
| 2831 | success := true | 2831 | success := true |
| 2832 | for _, tg := range wtv.TestGroups { | 2832 | for _, tg := range wtv.TestGroups { |
| 2833 | testGroupJSON := tg | 2833 | wtg := testGroupFromAlgorithm(wtv.Algorithm, variant) |
| 2834 | if wtg == nil { | ||
| 2835 | log.Printf("INFO: Unknown test vector algorithm %q", wtv.Algorithm) | ||
| 2836 | return false | ||
| 2837 | } | ||
| 2838 | if err := json.Unmarshal(tg, wtg); err != nil { | ||
| 2839 | log.Fatalf("Failed to unmarshal test groups JSON: %v", err) | ||
| 2840 | } | ||
| 2834 | testc.runTest(func() bool { | 2841 | testc.runTest(func() bool { |
| 2835 | wtg := testGroupFromAlgorithm(wtv.Algorithm, variant) | ||
| 2836 | if wtg == nil { | ||
| 2837 | log.Printf("INFO: Unknown test vector algorithm %q", wtv.Algorithm) | ||
| 2838 | return false | ||
| 2839 | } | ||
| 2840 | |||
| 2841 | if err := json.Unmarshal(testGroupJSON, wtg); err != nil { | ||
| 2842 | log.Fatalf("Failed to unmarshal test groups JSON: %v", err) | ||
| 2843 | } | ||
| 2844 | return wtg.run(wtv.Algorithm, variant) | 2842 | return wtg.run(wtv.Algorithm, variant) |
| 2845 | }) | 2843 | }) |
| 2846 | } | 2844 | } |
