diff options
author | tb <> | 2018-08-21 16:34:40 +0000 |
---|---|---|
committer | tb <> | 2018-08-21 16:34:40 +0000 |
commit | 53e398d973627d7a56dacc2650fcb0c86edff951 (patch) | |
tree | 6393c0cd917ffa4158f21573d48f9ab306ba2234 /src | |
parent | 4ea370bb99420518962069f2deed314fb5421a51 (diff) | |
download | openbsd-53e398d973627d7a56dacc2650fcb0c86edff951.tar.gz openbsd-53e398d973627d7a56dacc2650fcb0c86edff951.tar.bz2 openbsd-53e398d973627d7a56dacc2650fcb0c86edff951.zip |
fix return value
Diffstat (limited to 'src')
-rw-r--r-- | src/regress/lib/libcrypto/wycheproof/wycheproof.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/regress/lib/libcrypto/wycheproof/wycheproof.go b/src/regress/lib/libcrypto/wycheproof/wycheproof.go index a3d71fe04b..d30637612d 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.14 2018/08/21 16:31:16 tb Exp $ */ | 1 | /* $OpenBSD: wycheproof.go,v 1.15 2018/08/21 16:34:40 tb Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2018 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2018 Joel Sing <jsing@openbsd.org> |
4 | * | 4 | * |
@@ -237,7 +237,7 @@ func checkChaCha20Poly1305Seal(ctx *C.EVP_AEAD_CTX, iv []byte, ivLen int, aad [] | |||
237 | 237 | ||
238 | if sealRet != 1 { | 238 | if sealRet != 1 { |
239 | fmt.Printf("FAIL: Test case %d (%q) - EVP_AEAD_CTX_seal() = %d, want %v\n", wt.TCID, wt.Comment, int(sealRet), wt.Result) | 239 | fmt.Printf("FAIL: Test case %d (%q) - EVP_AEAD_CTX_seal() = %d, want %v\n", wt.TCID, wt.Comment, int(sealRet), wt.Result) |
240 | return wt.Result == "invalid" | 240 | return false |
241 | } | 241 | } |
242 | 242 | ||
243 | if (sealedLen != C.size_t(maxOutLen)) { | 243 | if (sealedLen != C.size_t(maxOutLen)) { |
@@ -312,7 +312,7 @@ func runChaCha20Poly1305Test(iv_len int, key_len int, tag_len int, wt *wycheproo | |||
312 | 312 | ||
313 | var ctx C.EVP_AEAD_CTX | 313 | var ctx C.EVP_AEAD_CTX |
314 | if C.EVP_AEAD_CTX_init((*C.EVP_AEAD_CTX)(unsafe.Pointer(&ctx)), aead, (*C.uchar)(unsafe.Pointer(&key[0])), C.size_t(key_len), C.size_t(tag_len), nil) != 1 { | 314 | if C.EVP_AEAD_CTX_init((*C.EVP_AEAD_CTX)(unsafe.Pointer(&ctx)), aead, (*C.uchar)(unsafe.Pointer(&key[0])), C.size_t(key_len), C.size_t(tag_len), nil) != 1 { |
315 | log.Fatalf("Failed to initialize AEAD context") | 315 | log.Fatal("Failed to initialize AEAD context") |
316 | } | 316 | } |
317 | defer C.EVP_AEAD_CTX_cleanup((*C.EVP_AEAD_CTX)(unsafe.Pointer(&ctx))) | 317 | defer C.EVP_AEAD_CTX_cleanup((*C.EVP_AEAD_CTX)(unsafe.Pointer(&ctx))) |
318 | 318 | ||