aboutsummaryrefslogtreecommitdiff
path: root/src/lib/crypt_ops/aes_openssl.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-11-13 08:27:29 -0500
committerNick Mathewson <nickm@torproject.org>2018-11-13 08:27:29 -0500
commitae4c94bb6468078ba16de481991e781e1b486340 (patch)
tree206ee467ba6fd5954df3b90aaf2dabd48e50124b /src/lib/crypt_ops/aes_openssl.c
parent896d0ebb994cc0b1df2c9497fcf3afe55654d01f (diff)
parent42be1c668b9f8ec255afb307054e6388f478e837 (diff)
downloadtor-ae4c94bb6468078ba16de481991e781e1b486340.tar.gz
tor-ae4c94bb6468078ba16de481991e781e1b486340.zip
Merge branch 'maint-0.3.4' into maint-0.3.5
Diffstat (limited to 'src/lib/crypt_ops/aes_openssl.c')
-rw-r--r--src/lib/crypt_ops/aes_openssl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/crypt_ops/aes_openssl.c b/src/lib/crypt_ops/aes_openssl.c
index f2990fc06d..ac275af33c 100644
--- a/src/lib/crypt_ops/aes_openssl.c
+++ b/src/lib/crypt_ops/aes_openssl.c
@@ -101,12 +101,12 @@ aes_cnt_cipher_t *
aes_new_cipher(const uint8_t *key, const uint8_t *iv, int key_bits)
{
EVP_CIPHER_CTX *cipher = EVP_CIPHER_CTX_new();
- const EVP_CIPHER *c;
+ const EVP_CIPHER *c = NULL;
switch (key_bits) {
case 128: c = EVP_aes_128_ctr(); break;
case 192: c = EVP_aes_192_ctr(); break;
case 256: c = EVP_aes_256_ctr(); break;
- default: tor_assert(0); // LCOV_EXCL_LINE
+ default: tor_assert_unreached(); // LCOV_EXCL_LINE
}
EVP_EncryptInit(cipher, c, key, iv);
return (aes_cnt_cipher_t *) cipher;