]> git.ipfire.org Git - thirdparty/hostap.git/commit
openssl: Disable padding after initializing the cipher suite
authorDavide Caratti <davide.caratti@gmail.com>
Tue, 17 Aug 2021 08:58:53 +0000 (10:58 +0200)
committerJouni Malinen <j@w1.fi>
Thu, 19 Aug 2021 09:13:17 +0000 (12:13 +0300)
commite2e9adc3d9b6bb9c433ebb6404ee439b42e91746
tree55116dde8f3c7387eb223361c955d1f4e98293b6
parentd265dd2d965db3669d07caa69539beb8def0edb2
openssl: Disable padding after initializing the cipher suite

according to OpenSSL documentation [1], EVP_CIPHER_CTX_set_padding()
should be called after EVP_EncryptInit_ex(), EVP_DecryptInit_ex(), or
EVP_CipherInit_ex(). Not doing this causes EVP_CIPHER_CTX_set_padding()
to return false on OpenSSL-3.0.0, resulting in the impossibility to
connect in many scenarios. Fix this changing the order of function calls
where needed.

[1] https://www.openssl.org/docs/man1.1.1/man3/EVP_CIPHER_CTX_set_padding.html

Reported-by: Vladimir Benes <vbenes@redhat.com>
Signed-off-by: Davide Caratti <davide.caratti@gmail.com>
src/crypto/crypto_openssl.c