From: tb Date: Sun, 2 Sep 2018 17:24:02 +0000 (+0000) Subject: After libcrypto/ecdh/ech_key.c -r1.8 fixed the failing test cases, remove X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=9177fdf3ee70addcca704569c2afc9e9cab55b5d;p=openbsd After libcrypto/ecdh/ech_key.c -r1.8 fixed the failing test cases, remove two noisy INFO and reorder things a bit. --- diff --git a/regress/lib/libcrypto/wycheproof/wycheproof.go b/regress/lib/libcrypto/wycheproof/wycheproof.go index ddb6e57098d..ac7d3e964bf 100644 --- a/regress/lib/libcrypto/wycheproof/wycheproof.go +++ b/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" {