diff options
-rw-r--r-- | src/regress/lib/libcrypto/wycheproof/wycheproof.go | 26 |
1 files changed, 7 insertions, 19 deletions
diff --git a/src/regress/lib/libcrypto/wycheproof/wycheproof.go b/src/regress/lib/libcrypto/wycheproof/wycheproof.go index 0babddaa1d..0936dabc0f 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.102 2019/11/28 21:35:47 tb Exp $ */ | 1 | /* $OpenBSD: wycheproof.go,v 1.103 2019/11/28 21:41:14 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 Theo Buehler <tb@openbsd.org> | 4 | * Copyright (c) 2018, 2019 Theo Buehler <tb@openbsd.org> |
@@ -2407,9 +2407,7 @@ func runTestVectors(path string, webcrypto bool) bool { | |||
2407 | wtg = &wycheproofTestGroupAesCmac{} | 2407 | wtg = &wycheproofTestGroupAesCmac{} |
2408 | case "AES-GCM": | 2408 | case "AES-GCM": |
2409 | wtg = &wycheproofTestGroupAead{} | 2409 | wtg = &wycheproofTestGroupAead{} |
2410 | case "CHACHA20-POLY1305": | 2410 | case "CHACHA20-POLY1305", "XCHACHA20-POLY1305": |
2411 | fallthrough | ||
2412 | case "XCHACHA20-POLY1305": | ||
2413 | wtg = &wycheproofTestGroupAead{} | 2411 | wtg = &wycheproofTestGroupAead{} |
2414 | case "DSA": | 2412 | case "DSA": |
2415 | wtg = &wycheproofTestGroupDSA{} | 2413 | wtg = &wycheproofTestGroupDSA{} |
@@ -2435,13 +2433,9 @@ func runTestVectors(path string, webcrypto bool) bool { | |||
2435 | wtg = &wycheproofTestGroupRsaesPkcs1{} | 2433 | wtg = &wycheproofTestGroupRsaesPkcs1{} |
2436 | case "RSASSA-PSS": | 2434 | case "RSASSA-PSS": |
2437 | wtg = &wycheproofTestGroupRsassa{} | 2435 | wtg = &wycheproofTestGroupRsassa{} |
2438 | case "RSASSA-PKCS1-v1_5": | 2436 | case "RSASSA-PKCS1-v1_5", "RSASig": |
2439 | fallthrough | ||
2440 | case "RSASig": | ||
2441 | wtg = &wycheproofTestGroupRSA{} | 2437 | wtg = &wycheproofTestGroupRSA{} |
2442 | case "XDH": | 2438 | case "XDH", "X25519": |
2443 | fallthrough | ||
2444 | case "X25519": | ||
2445 | wtg = &wycheproofTestGroupX25519{} | 2439 | wtg = &wycheproofTestGroupX25519{} |
2446 | default: | 2440 | default: |
2447 | log.Printf("INFO: Unknown test vector algorithm %q", wtv.Algorithm) | 2441 | log.Printf("INFO: Unknown test vector algorithm %q", wtv.Algorithm) |
@@ -2470,9 +2464,7 @@ func runTestVectors(path string, webcrypto bool) bool { | |||
2470 | if !runAesAeadTestGroup(wtv.Algorithm, wtg.(*wycheproofTestGroupAead)) { | 2464 | if !runAesAeadTestGroup(wtv.Algorithm, wtg.(*wycheproofTestGroupAead)) { |
2471 | success = false | 2465 | success = false |
2472 | } | 2466 | } |
2473 | case "CHACHA20-POLY1305": | 2467 | case "CHACHA20-POLY1305", "XCHACHA20-POLY1305": |
2474 | fallthrough | ||
2475 | case "XCHACHA20-POLY1305": | ||
2476 | if !runChaCha20Poly1305TestGroup(wtv.Algorithm, wtg.(*wycheproofTestGroupAead)) { | 2468 | if !runChaCha20Poly1305TestGroup(wtv.Algorithm, wtg.(*wycheproofTestGroupAead)) { |
2477 | success = false | 2469 | success = false |
2478 | } | 2470 | } |
@@ -2520,15 +2512,11 @@ func runTestVectors(path string, webcrypto bool) bool { | |||
2520 | if !runRsassaTestGroup(wtv.Algorithm, wtg.(*wycheproofTestGroupRsassa)) { | 2512 | if !runRsassaTestGroup(wtv.Algorithm, wtg.(*wycheproofTestGroupRsassa)) { |
2521 | success = false | 2513 | success = false |
2522 | } | 2514 | } |
2523 | case "RSASSA-PKCS1-v1_5": | 2515 | case "RSASSA-PKCS1-v1_5", "RSASig": |
2524 | fallthrough | ||
2525 | case "RSASig": | ||
2526 | if !runRSATestGroup(wtv.Algorithm, wtg.(*wycheproofTestGroupRSA)) { | 2516 | if !runRSATestGroup(wtv.Algorithm, wtg.(*wycheproofTestGroupRSA)) { |
2527 | success = false | 2517 | success = false |
2528 | } | 2518 | } |
2529 | case "XDH": | 2519 | case "XDH", "X25519": |
2530 | fallthrough | ||
2531 | case "X25519": | ||
2532 | if !runX25519TestGroup(wtv.Algorithm, wtg.(*wycheproofTestGroupX25519)) { | 2520 | if !runX25519TestGroup(wtv.Algorithm, wtg.(*wycheproofTestGroupX25519)) { |
2533 | success = false | 2521 | success = false |
2534 | } | 2522 | } |