From cc02eab4436984cdd6418f08392dc7247b5d6aab Mon Sep 17 00:00:00 2001 From: tb <> Date: Sun, 2 Sep 2018 17:24:02 +0000 Subject: After libcrypto/ecdh/ech_key.c -r1.8 fixed the failing test cases, remove two noisy INFO and reorder things a bit. --- src/regress/lib/libcrypto/wycheproof/wycheproof.go | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) (limited to 'src') diff --git a/src/regress/lib/libcrypto/wycheproof/wycheproof.go b/src/regress/lib/libcrypto/wycheproof/wycheproof.go index ddb6e57098..ac7d3e964b 100644 --- a/src/regress/lib/libcrypto/wycheproof/wycheproof.go +++ b/src/regress/lib/libcrypto/wycheproof/wycheproof.go @@ -1,4 +1,4 @@ -/* $OpenBSD: wycheproof.go,v 1.41 2018/09/02 17:12:01 tb Exp $ */ +/* $OpenBSD: wycheproof.go,v 1.42 2018/09/02 17:24:02 tb Exp $ */ /* * Copyright (c) 2018 Joel Sing * Copyright (c) 2018 Theo Buehler @@ -1134,20 +1134,8 @@ func runECDHTest(nid int, doECpoint bool, wt *wycheproofTestECDH) bool { return false } - pubGroup := C.EC_KEY_get0_group(pubKey) privGroup := C.EC_KEY_get0_group(privKey) - ret = C.EC_GROUP_cmp(pubGroup, privGroup, nil) - if ret != 0 { - fmt.Printf("INFO: Test case %d (%q) - EC_GROUP_cmp() = %d, want %v\n", wt.TCID, wt.Comment, ret, wt.Result) - } - - pubPoint := C.EC_KEY_get0_public_key(pubKey) - ret = C.EC_POINT_is_on_curve(privGroup, pubPoint, nil) - if ret != 1 { - fmt.Printf("INFO: Test case %d (%q) - EC_POINT_is_on_curve failed: got %d want %v\n", wt.TCID, wt.Comment, ret, wt.Result) - } - secLen := (C.EC_GROUP_get_degree(privGroup) + 7) / 8 secret := make([]byte, secLen) @@ -1155,6 +1143,8 @@ func runECDHTest(nid int, doECpoint bool, wt *wycheproofTestECDH) bool { secret = append(secret, 0) } + pubPoint := C.EC_KEY_get0_public_key(pubKey) + ret = C.ECDH_compute_key(unsafe.Pointer(&secret[0]), C.ulong(secLen), pubPoint, privKey, nil) if ret != C.int(secLen) { if wt.Result == "invalid" { -- cgit v1.2.3-55-g6feb