diff options
author | Jakub Jelen <jjelen@redhat.com> | 2018-10-09 11:22:40 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2018-10-09 12:05:40 +0200 |
commit | 777786d76c83b017ce6936bd15aa3413fd65bcca (patch) | |
tree | 14625183105f7d770210f0c8a4a5669fd2e629f8 | |
parent | 101df98e541b0d7e3a81e44f4130121edea9b3a9 (diff) | |
download | libssh-777786d76c83b017ce6936bd15aa3413fd65bcca.tar.gz libssh-777786d76c83b017ce6936bd15aa3413fd65bcca.tar.xz libssh-777786d76c83b017ce6936bd15aa3413fd65bcca.zip |
libcrypto: Do not use magic numbers for AES block size
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
-rw-r--r-- | src/libcrypto.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/libcrypto.c b/src/libcrypto.c index 5c0ff2de..ffbb1171 100644 --- a/src/libcrypto.c +++ b/src/libcrypto.c @@ -666,7 +666,7 @@ static struct ssh_cipher_struct ssh_ciphertab[] = { #ifdef HAVE_OPENSSL_EVP_AES_CTR { .name = "aes128-ctr", - .blocksize = 16, + .blocksize = AES_BLOCK_SIZE, .ciphertype = SSH_AES128_CTR, .keysize = 128, .set_encrypt_key = evp_cipher_set_encrypt_key, @@ -677,7 +677,7 @@ static struct ssh_cipher_struct ssh_ciphertab[] = { }, { .name = "aes192-ctr", - .blocksize = 16, + .blocksize = AES_BLOCK_SIZE, .ciphertype = SSH_AES192_CTR, .keysize = 192, .set_encrypt_key = evp_cipher_set_encrypt_key, @@ -688,7 +688,7 @@ static struct ssh_cipher_struct ssh_ciphertab[] = { }, { .name = "aes256-ctr", - .blocksize = 16, + .blocksize = AES_BLOCK_SIZE, .ciphertype = SSH_AES256_CTR, .keysize = 256, .set_encrypt_key = evp_cipher_set_encrypt_key, @@ -700,7 +700,7 @@ static struct ssh_cipher_struct ssh_ciphertab[] = { #else /* HAVE_OPENSSL_EVP_AES_CTR */ { .name = "aes128-ctr", - .blocksize = 16, + .blocksize = AES_BLOCK_SIZE, .ciphertype = SSH_AES128_CTR, .keysize = 128, .set_encrypt_key = aes_ctr_set_key, @@ -711,7 +711,7 @@ static struct ssh_cipher_struct ssh_ciphertab[] = { }, { .name = "aes192-ctr", - .blocksize = 16, + .blocksize = AES_BLOCK_SIZE, .ciphertype = SSH_AES192_CTR, .keysize = 192, .set_encrypt_key = aes_ctr_set_key, @@ -722,7 +722,7 @@ static struct ssh_cipher_struct ssh_ciphertab[] = { }, { .name = "aes256-ctr", - .blocksize = 16, + .blocksize = AES_BLOCK_SIZE, .ciphertype = SSH_AES256_CTR, .keysize = 256, .set_encrypt_key = aes_ctr_set_key, @@ -735,7 +735,7 @@ static struct ssh_cipher_struct ssh_ciphertab[] = { #endif /* BROKEN_AES_CTR */ { .name = "aes128-cbc", - .blocksize = 16, + .blocksize = AES_BLOCK_SIZE, .ciphertype = SSH_AES128_CBC, .keysize = 128, .set_encrypt_key = evp_cipher_set_encrypt_key, @@ -746,7 +746,7 @@ static struct ssh_cipher_struct ssh_ciphertab[] = { }, { .name = "aes192-cbc", - .blocksize = 16, + .blocksize = AES_BLOCK_SIZE, .ciphertype = SSH_AES192_CBC, .keysize = 192, .set_encrypt_key = evp_cipher_set_encrypt_key, @@ -757,7 +757,7 @@ static struct ssh_cipher_struct ssh_ciphertab[] = { }, { .name = "aes256-cbc", - .blocksize = 16, + .blocksize = AES_BLOCK_SIZE, .ciphertype = SSH_AES256_CBC, .keysize = 256, .set_encrypt_key = evp_cipher_set_encrypt_key, |