summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjsing <jsing@openbsd.org>2014-05-15 15:44:19 +0000
committerjsing <jsing@openbsd.org>2014-05-15 15:44:19 +0000
commit319989b12b239f3a77ee2a10956cfd8c7e0014b7 (patch)
tree8192bfbc7330b6f891f63b5d7cf2846d4152a95a
parentAdd chacha20-poly1305 test vector to regress. (diff)
downloadwireguard-openbsd-319989b12b239f3a77ee2a10956cfd8c7e0014b7.tar.xz
wireguard-openbsd-319989b12b239f3a77ee2a10956cfd8c7e0014b7.zip
Use C99 initialisers for the AEAD struct.
-rw-r--r--lib/libcrypto/evp/e_chacha20poly1305.c18
-rw-r--r--lib/libssl/src/crypto/evp/e_chacha20poly1305.c18
2 files changed, 18 insertions, 18 deletions
diff --git a/lib/libcrypto/evp/e_chacha20poly1305.c b/lib/libcrypto/evp/e_chacha20poly1305.c
index 6e4a3f507aa..75ff7f209cc 100644
--- a/lib/libcrypto/evp/e_chacha20poly1305.c
+++ b/lib/libcrypto/evp/e_chacha20poly1305.c
@@ -238,15 +238,15 @@ aead_chacha20_poly1305_open(const EVP_AEAD_CTX *ctx, unsigned char *out,
}
static const EVP_AEAD aead_chacha20_poly1305 = {
- 32, /* key len */
- CHACHA20_NONCE_LEN, /* nonce len */
- POLY1305_TAG_LEN, /* overhead */
- POLY1305_TAG_LEN, /* max tag length */
-
- aead_chacha20_poly1305_init,
- aead_chacha20_poly1305_cleanup,
- aead_chacha20_poly1305_seal,
- aead_chacha20_poly1305_open,
+ .key_len = 32,
+ .nonce_len = CHACHA20_NONCE_LEN,
+ .overhead = POLY1305_TAG_LEN,
+ .max_tag_len = POLY1305_TAG_LEN,
+
+ .init = aead_chacha20_poly1305_init,
+ .cleanup = aead_chacha20_poly1305_cleanup,
+ .seal = aead_chacha20_poly1305_seal,
+ .open = aead_chacha20_poly1305_open,
};
const EVP_AEAD *
diff --git a/lib/libssl/src/crypto/evp/e_chacha20poly1305.c b/lib/libssl/src/crypto/evp/e_chacha20poly1305.c
index 6e4a3f507aa..75ff7f209cc 100644
--- a/lib/libssl/src/crypto/evp/e_chacha20poly1305.c
+++ b/lib/libssl/src/crypto/evp/e_chacha20poly1305.c
@@ -238,15 +238,15 @@ aead_chacha20_poly1305_open(const EVP_AEAD_CTX *ctx, unsigned char *out,
}
static const EVP_AEAD aead_chacha20_poly1305 = {
- 32, /* key len */
- CHACHA20_NONCE_LEN, /* nonce len */
- POLY1305_TAG_LEN, /* overhead */
- POLY1305_TAG_LEN, /* max tag length */
-
- aead_chacha20_poly1305_init,
- aead_chacha20_poly1305_cleanup,
- aead_chacha20_poly1305_seal,
- aead_chacha20_poly1305_open,
+ .key_len = 32,
+ .nonce_len = CHACHA20_NONCE_LEN,
+ .overhead = POLY1305_TAG_LEN,
+ .max_tag_len = POLY1305_TAG_LEN,
+
+ .init = aead_chacha20_poly1305_init,
+ .cleanup = aead_chacha20_poly1305_cleanup,
+ .seal = aead_chacha20_poly1305_seal,
+ .open = aead_chacha20_poly1305_open,
};
const EVP_AEAD *