]> arthur.barton.de Git - ngircd-alex.git/commit
S2S-TLS/OpenSSL: Postpone verification of TLS session right before server handshake
authorAlexander Barton <alex@barton.de>
Tue, 2 Jan 2024 21:02:46 +0000 (22:02 +0100)
committerAlexander Barton <alex@barton.de>
Sat, 23 Mar 2024 19:19:01 +0000 (20:19 +0100)
commit3db3b47fc7172a69b7d99d66eddb07a323dc6e74
treec4b9ad8c522755c112ecfe35861453e2df4077be
parent679505aab9fea21b27a3d4bbf99cf2a16cf3d3d5
S2S-TLS/OpenSSL: Postpone verification of TLS session right before server handshake

The verify callback in OpenSSL is called pretty early, and at that time
it is not possible yet to check which connection it belongs to, and some
connections may have relaxed requirements.

So always return success in the Verify_openssl() callback, and postpone
validation of the TLS session until starting the server handshake in
cb_connserver_login_ssl(), when we know which server this connection
belongs to and which options (like "SSLVerify") are in effect.

The code doing this was already present in cb_connserver_login_ssl(),
but this patch adds a more prominent comment to the function.
src/ngircd/conn-ssl.c
src/ngircd/conn.c