-
Notifications
You must be signed in to change notification settings - Fork 91
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
Double CloseNotify in response to incoming CloseNotify #261
Comments
I can reproduce this. |
This is because:
I guess that |
kazu-yamamoto
added a commit
to kazu-yamamoto/hs-tls
that referenced
this issue
Dec 13, 2017
The patch above should fix this issue. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
A hs-tls server instance will send 2 x CloseNotify alerts in response to receiving a CloseNotify alert:
debug: << Alert [(AlertLevel_Warning,CloseNotify)]
debug: >> Alert [(AlertLevel_Warning,CloseNotify)]
debug: >> Alert [(AlertLevel_Warning,CloseNotify)]
This can be reproduced with tls-simpleserver:
tls-simpleserver -d --tls12 --certificate=server.pem --key=server.pem 4433
.. and the following openssl command running on the same machine:
echo Q | openssl s_client
The TLS 1.2 RFC states the following:
One can argue that the RFC also states:
.. but 'data' in that context would be AppData. In the strict sense it would be an error to send 2 x CloseNotify.
Either way, I think some client TLS stacks will actually view the double CloseNotify as an error, and it would be good to improve interoperability by only sending 1 x CloseNotify.
The text was updated successfully, but these errors were encountered: