summaryrefslogtreecommitdiffstats
path: root/lib/libssl/ssl_clnt.c
diff options
context:
space:
mode:
authorjsing <jsing@openbsd.org>2018-09-05 16:48:11 +0000
committerjsing <jsing@openbsd.org>2018-09-05 16:48:11 +0000
commitf1abf68627e51bc3621a614ccccf1e70315337bb (patch)
tree4eeb7f056bbcead7b2ae00fcb32853ab8d46cbdb /lib/libssl/ssl_clnt.c
parentBack out 1.4, it broke things (diff)
downloadwireguard-openbsd-f1abf68627e51bc3621a614ccccf1e70315337bb.tar.xz
wireguard-openbsd-f1abf68627e51bc3621a614ccccf1e70315337bb.zip
Correctly clear the current cipher state, when changing cipher state.
When a renegotiation results in a change of cipher suite, the renegotation would fail if it switched from AEAD to non-AEAD or vice versa. This is due to the fact that the previous EVP_AEAD or EVP_CIPHER state remained, resulting in incorrect logic that caused MAC failures. Rename ssl_clear_cipher_ctx() to ssl_clear_cipher_state() and split it into separate read/write components, then call these functions from the appropriate places when a ChangeCipherSpec message is being processed. Also, remove the separate ssl_clear_hash_ctx() calls and fold these into the ssl_clear_cipher_{read,write}_state() functions. Issue reported by Bernard Spil, who also tested this diff. ok tb@
Diffstat (limited to 'lib/libssl/ssl_clnt.c')
0 files changed, 0 insertions, 0 deletions