diff options
| author | tb <> | 2018-09-02 20:29:01 +0000 |
|---|---|---|
| committer | tb <> | 2018-09-02 20:29:01 +0000 |
| commit | 33bc5eb3795f4edaf222dd4e00d30952bf2ab18c (patch) | |
| tree | 9f5f189b094a34ccb9fc37818a8e08af718e7dfa /src | |
| parent | 78fe85b6b5474dcc56112b0ad1f01aa563bd9008 (diff) | |
| download | openbsd-33bc5eb3795f4edaf222dd4e00d30952bf2ab18c.tar.gz openbsd-33bc5eb3795f4edaf222dd4e00d30952bf2ab18c.tar.bz2 openbsd-33bc5eb3795f4edaf222dd4e00d30952bf2ab18c.zip | |
Remove a few unnecessary casts
Diffstat (limited to '')
| -rw-r--r-- | src/regress/lib/libcrypto/wycheproof/wycheproof.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/regress/lib/libcrypto/wycheproof/wycheproof.go b/src/regress/lib/libcrypto/wycheproof/wycheproof.go index 3e8b399e3b..28bbf2b4cd 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.45 2018/09/02 20:09:29 bluhm Exp $ */ | 1 | /* $OpenBSD: wycheproof.go,v 1.46 2018/09/02 20:29:01 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> |
| @@ -913,13 +913,13 @@ func runChaCha20Poly1305Test(iv_len int, key_len int, tag_len int, wt *wycheproo | |||
| 913 | } | 913 | } |
| 914 | 914 | ||
| 915 | var ctx C.EVP_AEAD_CTX | 915 | var ctx C.EVP_AEAD_CTX |
| 916 | 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 { | 916 | if C.EVP_AEAD_CTX_init(&ctx, aead, (*C.uchar)(unsafe.Pointer(&key[0])), C.size_t(key_len), C.size_t(tag_len), nil) != 1 { |
| 917 | log.Fatal("Failed to initialize AEAD context") | 917 | log.Fatal("Failed to initialize AEAD context") |
| 918 | } | 918 | } |
| 919 | defer C.EVP_AEAD_CTX_cleanup((*C.EVP_AEAD_CTX)(unsafe.Pointer(&ctx))) | 919 | defer C.EVP_AEAD_CTX_cleanup(&ctx) |
| 920 | 920 | ||
| 921 | openSuccess := checkChaCha20Poly1305Open((*C.EVP_AEAD_CTX)(unsafe.Pointer(&ctx)), iv, ivLen, aad, aadLen, msg, msgLen, ct, ctLen, tag, tagLen, wt) | 921 | openSuccess := checkChaCha20Poly1305Open(&ctx, iv, ivLen, aad, aadLen, msg, msgLen, ct, ctLen, tag, tagLen, wt) |
| 922 | sealSuccess := checkChaCha20Poly1305Seal((*C.EVP_AEAD_CTX)(unsafe.Pointer(&ctx)), iv, ivLen, aad, aadLen, msg, msgLen, ct, ctLen, tag, tagLen, wt) | 922 | sealSuccess := checkChaCha20Poly1305Seal(&ctx, iv, ivLen, aad, aadLen, msg, msgLen, ct, ctLen, tag, tagLen, wt) |
| 923 | 923 | ||
| 924 | return openSuccess && sealSuccess | 924 | return openSuccess && sealSuccess |
| 925 | } | 925 | } |
