diff options
author | tb <> | 2018-09-30 10:56:46 +0000 |
---|---|---|
committer | tb <> | 2018-09-30 10:56:46 +0000 |
commit | d7320afd75964278f3f34b1191867cd0158a2e0f (patch) | |
tree | 69846dc9a47a718688c22caeeb905626a173bf24 | |
parent | 0279d79242e41cc35897f44c97554d0f4d463552 (diff) | |
download | openbsd-d7320afd75964278f3f34b1191867cd0158a2e0f.tar.gz openbsd-d7320afd75964278f3f34b1191867cd0158a2e0f.tar.bz2 openbsd-d7320afd75964278f3f34b1191867cd0158a2e0f.zip |
in ECDH, gather statistics where it makes more sense
-rw-r--r-- | src/regress/lib/libcrypto/wycheproof/wycheproof.go | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/regress/lib/libcrypto/wycheproof/wycheproof.go b/src/regress/lib/libcrypto/wycheproof/wycheproof.go index fcd806f29e..e00edc03a2 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.66 2018/09/22 15:53:38 tb Exp $ */ | 1 | /* $OpenBSD: wycheproof.go,v 1.67 2018/09/30 10:56:46 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 Theo Buehler <tb@openbsd.org> | 4 | * Copyright (c) 2018 Theo Buehler <tb@openbsd.org> |
@@ -1180,13 +1180,7 @@ func runECDHTest(nid int, doECpoint bool, wt *wycheproofTestECDH) bool { | |||
1180 | C.free(unsafe.Pointer(Cpub)) | 1180 | C.free(unsafe.Pointer(Cpub)) |
1181 | 1181 | ||
1182 | if pubKey == nil { | 1182 | if pubKey == nil { |
1183 | if wt.Result == "invalid" { | 1183 | if wt.Result == "invalid" || wt.Result == "acceptable" { |
1184 | return true | ||
1185 | } | ||
1186 | if wt.Result == "acceptable" { | ||
1187 | if acceptableAudit { | ||
1188 | gatherAcceptableStatistics(wt.TCID, wt.Comment, wt.Flags) | ||
1189 | } | ||
1190 | return true | 1184 | return true |
1191 | } | 1185 | } |
1192 | fmt.Printf("FAIL: Test case %d (%q) %v - ASN decoding failed: want %v\n", wt.TCID, wt.Comment, wt.Flags, wt.Result) | 1186 | fmt.Printf("FAIL: Test case %d (%q) %v - ASN decoding failed: want %v\n", wt.TCID, wt.Comment, wt.Flags, wt.Result) |
@@ -1223,6 +1217,9 @@ func runECDHTest(nid int, doECpoint bool, wt *wycheproofTestECDH) bool { | |||
1223 | fmt.Printf("FAIL: Test case %d (%q) %v - expected and computed shared secret do not match, want %v\n", wt.TCID, wt.Comment, wt.Flags, wt.Result) | 1217 | fmt.Printf("FAIL: Test case %d (%q) %v - expected and computed shared secret do not match, want %v\n", wt.TCID, wt.Comment, wt.Flags, wt.Result) |
1224 | success = false | 1218 | success = false |
1225 | } | 1219 | } |
1220 | if acceptableAudit && success && wt.Result == "acceptable" { | ||
1221 | gatherAcceptableStatistics(wt.TCID, wt.Comment, wt.Flags) | ||
1222 | } | ||
1226 | return success | 1223 | return success |
1227 | } | 1224 | } |
1228 | 1225 | ||