diff options
author | Theo Buehler <theorbuehler@gmail.com> | 2024-03-16 16:49:53 +1000 |
---|---|---|
committer | Boringssl LUCI CQ <boringssl-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2024-03-16 22:48:54 +0000 |
commit | f57a11ae566ac17c1b028d79950227a33ae32fad (patch) | |
tree | b382db5a2d9293cee730036f85fe46c4f6ad429d /decrepit | |
parent | fae0964b3d44e94ca2a2d21f86e61dabe683d130 (diff) | |
download | boringssl-f57a11ae566ac17c1b028d79950227a33ae32fad.zip boringssl-f57a11ae566ac17c1b028d79950227a33ae32fad.tar.gz boringssl-f57a11ae566ac17c1b028d79950227a33ae32fad.tar.bz2 |
Remove unused app_data from EVP_CIPHER
This field makes no sense for static const structures. It was added
early on but never used as far as I can tell.
Change-Id: Ie0272c5f498ad777cb3b114589248d8b403ae457
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/67047
Reviewed-by: David Benjamin <davidben@google.com>
Commit-Queue: Adam Langley <agl@google.com>
Reviewed-by: Adam Langley <agl@google.com>
Diffstat (limited to 'decrepit')
-rw-r--r-- | decrepit/blowfish/blowfish.c | 33 | ||||
-rw-r--r-- | decrepit/cast/cast.c | 22 | ||||
-rw-r--r-- | decrepit/cfb/cfb.c | 24 | ||||
-rw-r--r-- | decrepit/xts/xts.c | 13 |
4 files changed, 46 insertions, 46 deletions
diff --git a/decrepit/blowfish/blowfish.c b/decrepit/blowfish/blowfish.c index 7c209da..654cd86 100644 --- a/decrepit/blowfish/blowfish.c +++ b/decrepit/blowfish/blowfish.c @@ -594,30 +594,27 @@ static int bf_cfb_cipher(EVP_CIPHER_CTX *ctx, uint8_t *out, const uint8_t *in, } static const EVP_CIPHER bf_ecb = { - NID_bf_ecb, BF_BLOCK /* block_size */, - 16 /* key_size */, BF_BLOCK /* iv_len */, - sizeof(BF_KEY), EVP_CIPH_ECB_MODE | EVP_CIPH_VARIABLE_LENGTH, - NULL /* app_data */, bf_init_key, - bf_ecb_cipher, NULL /* cleanup */, - NULL /* ctrl */, + NID_bf_ecb, BF_BLOCK /* block_size */, + 16 /* key_size */, BF_BLOCK /* iv_len */, + sizeof(BF_KEY), EVP_CIPH_ECB_MODE | EVP_CIPH_VARIABLE_LENGTH, + bf_init_key, bf_ecb_cipher, + NULL /* cleanup */, NULL /* ctrl */, }; static const EVP_CIPHER bf_cbc = { - NID_bf_cbc, BF_BLOCK /* block_size */, - 16 /* key_size */, BF_BLOCK /* iv_len */, - sizeof(BF_KEY), EVP_CIPH_CBC_MODE | EVP_CIPH_VARIABLE_LENGTH, - NULL /* app_data */, bf_init_key, - bf_cbc_cipher, NULL /* cleanup */, - NULL /* ctrl */, + NID_bf_cbc, BF_BLOCK /* block_size */, + 16 /* key_size */, BF_BLOCK /* iv_len */, + sizeof(BF_KEY), EVP_CIPH_CBC_MODE | EVP_CIPH_VARIABLE_LENGTH, + bf_init_key, bf_cbc_cipher, + NULL /* cleanup */, NULL /* ctrl */, }; static const EVP_CIPHER bf_cfb = { - NID_bf_cfb64, 1 /* block_size */, - 16 /* key_size */, BF_BLOCK /* iv_len */, - sizeof(BF_KEY), EVP_CIPH_CFB_MODE | EVP_CIPH_VARIABLE_LENGTH, - NULL /* app_data */, bf_init_key, - bf_cfb_cipher, NULL /* cleanup */, - NULL /* ctrl */, + NID_bf_cfb64, 1 /* block_size */, + 16 /* key_size */, BF_BLOCK /* iv_len */, + sizeof(BF_KEY), EVP_CIPH_CFB_MODE | EVP_CIPH_VARIABLE_LENGTH, + bf_init_key, bf_cfb_cipher, + NULL /* cleanup */, NULL /* ctrl */, }; const EVP_CIPHER *EVP_bf_ecb(void) { return &bf_ecb; } diff --git a/decrepit/cast/cast.c b/decrepit/cast/cast.c index 314e3da..9e87b3f 100644 --- a/decrepit/cast/cast.c +++ b/decrepit/cast/cast.c @@ -437,21 +437,19 @@ static int cast_cbc_cipher(EVP_CIPHER_CTX *ctx, uint8_t *out, const uint8_t *in, } static const EVP_CIPHER cast5_ecb = { - NID_cast5_ecb, CAST_BLOCK, - CAST_KEY_LENGTH, CAST_BLOCK /* iv_len */, - sizeof(CAST_KEY), EVP_CIPH_ECB_MODE | EVP_CIPH_VARIABLE_LENGTH, - NULL /* app_data */, cast_init_key, - cast_ecb_cipher, NULL /* cleanup */, - NULL /* ctrl */, + NID_cast5_ecb, CAST_BLOCK, + CAST_KEY_LENGTH, CAST_BLOCK /* iv_len */, + sizeof(CAST_KEY), EVP_CIPH_ECB_MODE | EVP_CIPH_VARIABLE_LENGTH, + cast_init_key, cast_ecb_cipher, + NULL /* cleanup */, NULL /* ctrl */, }; static const EVP_CIPHER cast5_cbc = { - NID_cast5_cbc, CAST_BLOCK, - CAST_KEY_LENGTH, CAST_BLOCK /* iv_len */, - sizeof(CAST_KEY), EVP_CIPH_CBC_MODE | EVP_CIPH_VARIABLE_LENGTH, - NULL /* app_data */, cast_init_key, - cast_cbc_cipher, NULL /* cleanup */, - NULL /* ctrl */, + NID_cast5_cbc, CAST_BLOCK, + CAST_KEY_LENGTH, CAST_BLOCK /* iv_len */, + sizeof(CAST_KEY), EVP_CIPH_CBC_MODE | EVP_CIPH_VARIABLE_LENGTH, + cast_init_key, cast_cbc_cipher, + NULL /* cleanup */, NULL /* ctrl */, }; const EVP_CIPHER *EVP_cast5_ecb(void) { return &cast5_ecb; } diff --git a/decrepit/cfb/cfb.c b/decrepit/cfb/cfb.c index c15292c..12709a4 100644 --- a/decrepit/cfb/cfb.c +++ b/decrepit/cfb/cfb.c @@ -52,24 +52,24 @@ static int aes_cfb128_cipher(EVP_CIPHER_CTX *ctx, uint8_t *out, } static const EVP_CIPHER aes_128_cfb128 = { - NID_aes_128_cfb128, 1 /* block_size */, 16 /* key_size */, - 16 /* iv_len */, sizeof(EVP_CFB_CTX), EVP_CIPH_CFB_MODE, - NULL /* app_data */, aes_cfb_init_key, aes_cfb128_cipher, - NULL /* cleanup */, NULL /* ctrl */, + NID_aes_128_cfb128, 1 /* block_size */, 16 /* key_size */, + 16 /* iv_len */, sizeof(EVP_CFB_CTX), EVP_CIPH_CFB_MODE, + aes_cfb_init_key, aes_cfb128_cipher, NULL /* cleanup */, + NULL /* ctrl */, }; static const EVP_CIPHER aes_192_cfb128 = { - NID_aes_192_cfb128, 1 /* block_size */, 24 /* key_size */, - 16 /* iv_len */, sizeof(EVP_CFB_CTX), EVP_CIPH_CFB_MODE, - NULL /* app_data */, aes_cfb_init_key, aes_cfb128_cipher, - NULL /* cleanup */, NULL /* ctrl */, + NID_aes_192_cfb128, 1 /* block_size */, 24 /* key_size */, + 16 /* iv_len */, sizeof(EVP_CFB_CTX), EVP_CIPH_CFB_MODE, + aes_cfb_init_key, aes_cfb128_cipher, NULL /* cleanup */, + NULL /* ctrl */, }; static const EVP_CIPHER aes_256_cfb128 = { - NID_aes_256_cfb128, 1 /* block_size */, 32 /* key_size */, - 16 /* iv_len */, sizeof(EVP_CFB_CTX), EVP_CIPH_CFB_MODE, - NULL /* app_data */, aes_cfb_init_key, aes_cfb128_cipher, - NULL /* cleanup */, NULL /* ctrl */, + NID_aes_256_cfb128, 1 /* block_size */, 32 /* key_size */, + 16 /* iv_len */, sizeof(EVP_CFB_CTX), EVP_CIPH_CFB_MODE, + aes_cfb_init_key, aes_cfb128_cipher, NULL /* cleanup */, + NULL /* ctrl */, }; const EVP_CIPHER *EVP_aes_128_cfb128(void) { return &aes_128_cfb128; } diff --git a/decrepit/xts/xts.c b/decrepit/xts/xts.c index 8a66f0f..b44d6f4 100644 --- a/decrepit/xts/xts.c +++ b/decrepit/xts/xts.c @@ -229,11 +229,16 @@ static int aes_xts_ctrl(EVP_CIPHER_CTX *c, int type, int arg, void *ptr) { } static const EVP_CIPHER aes_256_xts = { - NID_aes_256_xts, 1 /* block_size */, 64 /* key_size (2 AES keys) */, - 16 /* iv_len */, sizeof(EVP_AES_XTS_CTX), + NID_aes_256_xts, + 1 /* block_size */, + 64 /* key_size (2 AES keys) */, + 16 /* iv_len */, + sizeof(EVP_AES_XTS_CTX), EVP_CIPH_XTS_MODE | EVP_CIPH_CUSTOM_IV | EVP_CIPH_ALWAYS_CALL_INIT | EVP_CIPH_CTRL_INIT | EVP_CIPH_CUSTOM_COPY, - NULL /* app_data */, aes_xts_init_key, aes_xts_cipher, - NULL /* cleanup */, aes_xts_ctrl}; + aes_xts_init_key, + aes_xts_cipher, + NULL /* cleanup */, + aes_xts_ctrl}; const EVP_CIPHER *EVP_aes_256_xts(void) { return &aes_256_xts; } |