diff options
author | Theo Buehler <tb@cvs.openbsd.org> | 2018-09-02 17:24:03 +0000 |
---|---|---|
committer | Theo Buehler <tb@cvs.openbsd.org> | 2018-09-02 17:24:03 +0000 |
commit | b0a65b4f614f655a1b0ecb99218ab45b0eabf99e (patch) | |
tree | 3c7e00fe1dcabf615308359657a7ee378ff76b77 | |
parent | 93c32879e1f5f45e6393cc8976cff3ee8e3aaaca (diff) |
After libcrypto/ecdh/ech_key.c -r1.8 fixed the failing test cases, remove
two noisy INFO and reorder things a bit.
-rw-r--r-- | regress/lib/libcrypto/wycheproof/wycheproof.go | 16 |
1 files changed, 3 insertions, 13 deletions
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 <jsing@openbsd.org> * Copyright (c) 2018 Theo Buehler <tb@openbsd.org> @@ -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" { |