archrelease: copy trunk to community-any
[ArchLinux/community.git] / fastd / repos / community-x86_64 / 0001-cipher-aes128-ctr-openssl-fix-compatiblity-with-Open.patch
blobd44761ae3c2f4d212d942f174a5e21eec109b99b
1 From 8505374ee208d51a39e7b22846f9b781b9ccb452 Mon Sep 17 00:00:00 2001
2 Message-Id: <8505374ee208d51a39e7b22846f9b781b9ccb452.1515434692.git.mschiffer@universe-factory.net>
3 From: Matthias Schiffer <mschiffer@universe-factory.net>
4 Date: Fri, 19 May 2017 19:36:24 +0200
5 Subject: [PATCH] cipher: aes128-ctr: openssl: fix compatiblity with OpenSSL
6 1.1
8 ---
9 src/crypto/cipher/aes128_ctr/openssl/aes128_ctr_openssl.c | 4 ++--
10 1 file changed, 2 insertions(+), 2 deletions(-)
12 diff --git a/src/crypto/cipher/aes128_ctr/openssl/aes128_ctr_openssl.c b/src/crypto/cipher/aes128_ctr/openssl/aes128_ctr_openssl.c
13 index 7a2b565..c44427f 100644
14 --- a/src/crypto/cipher/aes128_ctr/openssl/aes128_ctr_openssl.c
15 +++ b/src/crypto/cipher/aes128_ctr/openssl/aes128_ctr_openssl.c
16 @@ -47,7 +47,7 @@ static fastd_cipher_state_t * aes128_ctr_init(const uint8_t *key) {
17 fastd_cipher_state_t *state = fastd_new(fastd_cipher_state_t);
19 state->aes = EVP_CIPHER_CTX_new();
20 - EVP_EncryptInit(state->aes, EVP_aes_128_ctr(), (const unsigned char *)key, NULL);
21 + EVP_EncryptInit_ex(state->aes, EVP_aes_128_ctr(), NULL, (const unsigned char *)key, NULL);
23 return state;
25 @@ -56,7 +56,7 @@ static fastd_cipher_state_t * aes128_ctr_init(const uint8_t *key) {
26 static bool aes128_ctr_crypt(const fastd_cipher_state_t *state, fastd_block128_t *out, const fastd_block128_t *in, size_t len, const uint8_t *iv) {
27 int clen, clen2;
29 - if (!EVP_EncryptInit(state->aes, NULL, NULL, iv))
30 + if (!EVP_EncryptInit_ex(state->aes, NULL, NULL, NULL, iv))
31 return false;
33 if (!EVP_EncryptUpdate(state->aes, (unsigned char *)out, &clen, (const unsigned char *)in, len))
34 --
35 2.15.1