Skip to content
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

TLS: Notify clients on connection shutdown. #10931

Merged
merged 1 commit into from
Jul 5, 2022

Conversation

yossigo
Copy link
Member

@yossigo yossigo commented Jul 4, 2022

Use SSL_shutdown(), in a best-effort manner, when closing a TLS
connection. This change better supports OpenSSL 3.x clients that will
not silently ignore the socket-level EOF.

Fixes #10915

Use SSL_shutdown(), in a best-effort manner, when closing a TLS
connection. This change better supports OpenSSL 3.x clients that will
not silently ignore the socket-level EOF.
@yossigo yossigo added the release-notes indication that this issue needs to be mentioned in the release notes label Jul 4, 2022
@yossigo yossigo requested a review from oranagra July 4, 2022 11:17
Copy link
Member

@oranagra oranagra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.
I remind you we had some discussion about using shutdown on normal sockets.
see #10077

@dzuelke
Copy link

dzuelke commented Jul 4, 2022

Nice one @yossigo! Will this be backported to Redis 6 as well?

@yossigo
Copy link
Member Author

yossigo commented Jul 5, 2022

@oranagra IIRC, the only consideration for shutdown() on a socket was to force close it even if it's still held by a child. This isn't an issue with TLS because we anyway can't share the connection between the child and parent.

@yossigo
Copy link
Member Author

yossigo commented Jul 5, 2022

@dzuelke Yes, that makes sense.

@yossigo yossigo merged commit 45ae605 into redis:unstable Jul 5, 2022
@yossigo yossigo deleted the use-tls-shutdown branch July 5, 2022 05:41
@dzuelke
Copy link

dzuelke commented Jul 5, 2022

Great, thanks @yossigo (I assume it'll be ported to 7.0 as well then).

@oranagra
Copy link
Member

oranagra commented Jul 6, 2022

yes, it will be part of 7.0.3

@oranagra oranagra mentioned this pull request Jul 11, 2022
@oranagra oranagra mentioned this pull request Dec 11, 2022
oranagra pushed a commit that referenced this pull request Dec 12, 2022
Use SSL_shutdown(), in a best-effort manner, when closing a TLS
connection. This change better supports OpenSSL 3.x clients that will
not silently ignore the socket-level EOF.

(cherry picked from commit 45ae605)
@oranagra
Copy link
Member

oranagra commented Jan 16, 2023

removing this from 6.0 backport list due to risk of causing any side effect on a very old release.

enjoy-binbin pushed a commit to enjoy-binbin/redis that referenced this pull request Jul 31, 2023
Use SSL_shutdown(), in a best-effort manner, when closing a TLS
connection. This change better supports OpenSSL 3.x clients that will
not silently ignore the socket-level EOF.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-notes indication that this issue needs to be mentioned in the release notes
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

[BUG] redis-server TLS connection close breaks OpenSSL 3 clients
3 participants