diff options
author | 2019-11-27 10:09:29 +0000 | |
---|---|---|
committer | 2019-11-27 10:09:29 +0000 | |
commit | dae773a10a72af44b3f8229354886247b8205f3e (patch) | |
tree | bff8b5fa23e9118b2341b24c1944446157d978a1 | |
parent | Initialize nfds fields of new file structures. (diff) | |
download | wireguard-openbsd-dae773a10a72af44b3f8229354886247b8205f3e.tar.xz wireguard-openbsd-dae773a10a72af44b3f8229354886247b8205f3e.zip |
Prepare update of wycheproof-testvectors. Skip some tests for things
we don't support in LibreSSL and make sure we run as many tests as
possible.
-rw-r--r-- | regress/lib/libcrypto/wycheproof/wycheproof.go | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/regress/lib/libcrypto/wycheproof/wycheproof.go b/regress/lib/libcrypto/wycheproof/wycheproof.go index af4f18b38bc..6cc739e831a 100644 --- a/regress/lib/libcrypto/wycheproof/wycheproof.go +++ b/regress/lib/libcrypto/wycheproof/wycheproof.go @@ -1,4 +1,4 @@ -/* $OpenBSD: wycheproof.go,v 1.87 2018/11/07 22:51:17 tb Exp $ */ +/* $OpenBSD: wycheproof.go,v 1.88 2019/11/27 10:09:29 tb Exp $ */ /* * Copyright (c) 2018 Joel Sing <jsing@openbsd.org> * Copyright (c) 2018 Theo Buehler <tb@openbsd.org> @@ -55,6 +55,7 @@ import ( "log" "os" "path/filepath" + "regexp" "sort" "unsafe" ) @@ -2081,7 +2082,8 @@ func runTestVectors(path string, webcrypto bool) bool { case "X25519": wtg = &wycheproofTestGroupX25519{} default: - log.Fatalf("Unknown test vector algorithm %q", wtv.Algorithm) + log.Printf("INFO: Unknown test vector algorithm %q", wtv.Algorithm) + return false } success := true @@ -2188,6 +2190,8 @@ func main() { success := true + skip := regexp.MustCompile(`_(p1363|sha3|sha512_256)_`) + for _, test := range tests { webcrypto := test.name == "ECDSAWebCrypto" || test.name == "ECDHWebCrypto" tvs, err := filepath.Glob(filepath.Join(testVectorPath, test.pattern)) @@ -2198,6 +2202,10 @@ func main() { log.Fatalf("Failed to find %v test vectors at %q\n", test.name, testVectorPath) } for _, tv := range tvs { + if skip.Match([]byte(tv)) { + fmt.Printf("INFO: Skipping tests from %s\n", tv) + continue + } if !runTestVectors(tv, webcrypto) { success = false } |