summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo Buehler <tb@cvs.openbsd.org>2018-09-02 17:24:03 +0000
committerTheo Buehler <tb@cvs.openbsd.org>2018-09-02 17:24:03 +0000
commitb0a65b4f614f655a1b0ecb99218ab45b0eabf99e (patch)
tree3c7e00fe1dcabf615308359657a7ee378ff76b77
parent93c32879e1f5f45e6393cc8976cff3ee8e3aaaca (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.go16
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" {