bloomberg / amqpprox

An AMQP 0.9.1 proxy server, designed for use in front of an AMQP 0.9.1 compliant message queue broker such as RabbitMQ.
Apache License 2.0
78 stars 16 forks source link

Avoid logging informational messages about the TLS handshake at ERROR #90

Closed adamncasey closed 2 years ago

adamncasey commented 2 years ago

At the moment amqpprox logs quite a lot about every TLS connection handshake.

E.g. For a TLS 1.2 connnection:

ERROR: SSL_accept error in: SSLv3 read client key exchange A
~ about 7 very similar lines per connection

This patch ensures we only log actual errors during the handshake. This logic is derived from the docs for SSL_CTX_set_info_callback, which state that only ret=0 indicates an error. https://www.openssl.org/docs/man1.0.2/man3/SSL_CTX_set_info_callback.html