brianmario / mysql2

A modern, simple and very fast Mysql library for Ruby - binding to libmysql
http://github.com/brianmario/mysql2
MIT License
2.25k stars 550 forks source link

Add configuration option for SSL_OP_IGNORE_UNEXPECTED_EOF #1363

Closed ramasangita closed 4 months ago

ramasangita commented 7 months ago

I see the following error randomly in our application "Mysql2::Error::ConnectionError: TLS/SSL error: unexpected eof while reading"

I understand this error of from latest openssl version if connection is closed without close_notify alert (https://github.com/openssl/openssl/issues/18866#issuecomment-1194219601)

and mariadb does this intentionally: https://github.com/MariaDB/server/blob/73ed0a23ebeba96d777b768cf79a290f6b4ea2e8/vio/viossl.c#L222

So could a configuration option be added to set SSL_OP_IGNORE_UNEXPECTED_EOF?

ramasangita commented 4 months ago

Closing it, as I realise this is irrelevant. It just changes the error message and I should handler underlying issue