diff options
| author | tb <> | 2026-05-04 19:11:01 +0000 |
|---|---|---|
| committer | tb <> | 2026-05-04 19:11:01 +0000 |
| commit | e7eafba3b568c9f31dce079e7095ef3f965abf99 (patch) | |
| tree | 23f4463e5bbf0205e307e06bcec9ae738d91eed1 /src | |
| parent | 05ca779bc5b2e8e03bdbbf80583efa878d519ca6 (diff) | |
| download | openbsd-e7eafba3b568c9f31dce079e7095ef3f965abf99.tar.gz openbsd-e7eafba3b568c9f31dce079e7095ef3f965abf99.tar.bz2 openbsd-e7eafba3b568c9f31dce079e7095ef3f965abf99.zip | |
wycheproof: go fmt
Diffstat (limited to 'src')
| -rw-r--r-- | src/regress/lib/libcrypto/wycheproof/wycheproof.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/regress/lib/libcrypto/wycheproof/wycheproof.go b/src/regress/lib/libcrypto/wycheproof/wycheproof.go index d36cd18de4..780babfe80 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.202 2026/04/21 20:55:21 tb Exp $ */ | 1 | /* $OpenBSD: wycheproof.go,v 1.203 2026/05/04 19:11:01 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> |
| @@ -2393,7 +2393,7 @@ func runMLKEMTestGroup(rank C.int, wt *wycheproofTestMLKEM) bool { | |||
| 2393 | if C.MLKEM_private_key_from_seed(privKey, (*C.uchar)(unsafe.Pointer(&seed[0])), C.size_t(seedLen)) != 1 { | 2393 | if C.MLKEM_private_key_from_seed(privKey, (*C.uchar)(unsafe.Pointer(&seed[0])), C.size_t(seedLen)) != 1 { |
| 2394 | if wt.Result != "invalid" { | 2394 | if wt.Result != "invalid" { |
| 2395 | fmt.Printf("%s - MLKEM_private_key_from_seed failed\n", wt) | 2395 | fmt.Printf("%s - MLKEM_private_key_from_seed failed\n", wt) |
| 2396 | return false; | 2396 | return false |
| 2397 | } | 2397 | } |
| 2398 | return true | 2398 | return true |
| 2399 | } | 2399 | } |
| @@ -2453,7 +2453,7 @@ func runMLKEMEncapsTestGroup(rank C.int, wt *wycheproofTestMLKEM) bool { | |||
| 2453 | if C.MLKEM_parse_public_key(pubKey, (*C.uchar)(unsafe.Pointer(&ek[0])), (C.size_t)(ekLen)) != 1 { | 2453 | if C.MLKEM_parse_public_key(pubKey, (*C.uchar)(unsafe.Pointer(&ek[0])), (C.size_t)(ekLen)) != 1 { |
| 2454 | if wt.Result != "invalid" { | 2454 | if wt.Result != "invalid" { |
| 2455 | fmt.Printf("FAIL: %s: MLKEM_parse_public_key failed !!!\n", wt) | 2455 | fmt.Printf("FAIL: %s: MLKEM_parse_public_key failed !!!\n", wt) |
| 2456 | return false; | 2456 | return false |
| 2457 | } | 2457 | } |
| 2458 | return true | 2458 | return true |
| 2459 | } | 2459 | } |
| @@ -2544,9 +2544,9 @@ func runMLKEMKeyGenTest(rank C.int, wt *wycheproofTestMLKEM) bool { | |||
| 2544 | 2544 | ||
| 2545 | dK, _ := mustDecodeHexString(wt.Dk, "dK") | 2545 | dK, _ := mustDecodeHexString(wt.Dk, "dK") |
| 2546 | eK, _ := mustDecodeHexString(wt.Ek, "eK") | 2546 | eK, _ := mustDecodeHexString(wt.Ek, "eK") |
| 2547 | 2547 | ||
| 2548 | if (bytes.Equal(dK, gotDk) && bytes.Equal(eK, gotEk)) != (wt.Result != "invalid") { | 2548 | if (bytes.Equal(dK, gotDk) && bytes.Equal(eK, gotEk)) != (wt.Result != "invalid") { |
| 2549 | fmt.Printf("FAIL: %s - encoded keys differ", wt); | 2549 | fmt.Printf("FAIL: %s - encoded keys differ", wt) |
| 2550 | return false | 2550 | return false |
| 2551 | } | 2551 | } |
| 2552 | 2552 | ||
