-
Notifications
You must be signed in to change notification settings - Fork 51
Adding support for TLS connections from client to amqproxy #232
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
| end | ||
|
|
||
| private def reload_tls_context | ||
| return unless tls = @tls_context |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm i might be missing some Crystal. But I dont understand this??
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I copy/pasted much of the TLS functionality from LavinMQ. Commented lines (mentioned in your other comment) are from a testing procedure -- they either did not work or were not necessary. Such commented lines should be removed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a nil guard. @tls_context may be nil, but the thanks to the guard tls won't be nil.
| module AMQProxy | ||
| class ConnectionInfo | ||
| getter remote_address : IPAddress | ||
| getter local_address : IPAddress | ||
| property? ssl : Bool = false | ||
| property? ssl_verify : Bool = false | ||
| property ssl_version : String? | ||
| property ssl_cipher : String? | ||
| property ssl_key_alg : String? | ||
| property ssl_sig_alg : String? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LMQ codebase spotted!!! 🔥
| # ensure | ||
| # @listeners.delete(s) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason for those comments?
lukas8219
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you planning to add specs @chadknutson ?
Specs are definitely needed! |
This pull requests supports TLS connections from clients to amqproxy. I cannot think of a compelling reason to support both TLS and non-TLS connections simulteneously, so either TLS or non-TLS can be utilized. I think that should keep the management of the connection pools simpler.