-
Notifications
You must be signed in to change notification settings - Fork 100
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
Fix tls_no_tls_switching_issue. #237
Conversation
shalinnijel2
commented
May 10, 2023
•
edited
Loading
edited
- Fixed a TLS issue where once TLS server is created, a TCP server wouldn't be created when requested in the following session.
Hey @shalinnijel2 check what I did in my PR for the TLS: That should be equivalent to what you did, as you can check in the code here: https://github.com/python/cpython/blob/3.11/Lib/ssl.py#L745 we could just use the default context, but the fact is that we modify it later on for the EVCC side, also we shall not include the cafile attribute unless we want the mutual authentication. I also changed the env name, because we are not enabling TLS 1.3 with it...we are just enforcing the client to authenticate as well and that can be done in 1.2. The 1.3 Vs 1.2 will depend on the cipher suits that the client and server support... In theory we can even use the -2 certificates for TLS 1.3 connection. let me know your thoughts about this |
8ce2b49
to
7fa3c0a
Compare
…chEV/iso15118 into fix_tls_no_tls_switch_issue
Hi André -
I have removed the mutual auth change from this PR as it was initially intended to fix the tls/tcp server switching issue seen during the testival. |
so, that is a tricky one... we dont know if the connection is a -20 or -2 one until we are in supportedAppProtocol, which is then too late for the TLS handshake; I dont think we can actively control this if we want to support -2 and -20 at the same time....so I think the best here is to support all the groups by default. i did some tests, and the Server will pick the client first supported named group in the Client Hello, that the Server also supports. Maybe in SupportedAppProtocol, we can later detect which was the agreed curve, and kill the connection if the curve is not a -20 one, but I think this may be complicated. I also tried to use the I think for the best is really to not set any particular curve in the server and let client and server handle it between them. Once we have the TLS from Louis, maybe we can do some more sophisticated settings. EDIT: |
""" | ||
return | ||
if self.tcp_server_handler and self.tcp_server.is_tls_enabled == with_tls: | ||
return True |
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.
do we need to return it as True, it seems just 'return'
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.
yes, fixed.