-
Notifications
You must be signed in to change notification settings - Fork 770
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
SSL Improvements (2) #10866
SSL Improvements (2) #10866
Conversation
Change-Id: Iedd2713d405720b90e8bfb6d4b4edf4708dda751 Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
Change-Id: I2ab0e5e94071895d227f0469dd0f62a7d9310255 Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
Change-Id: I6235ec5a6e84ebcf6e9a4131fb0e94de961a61fe Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
SSL_ERROR_WANT_RETRY_VERIFY was added in version 3.0.1 of OpenSSL, so it's not available with 1.1.1. Also, simplify the version number comparison. Change-Id: Ie7315b2a3f96e2e81dabf9f4e032698f2ffbc9c3 Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
Change-Id: I4cd756422d6fb72e2132386ae0b0c1af6ca504af Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
The catch-all case still needs to know what errors it could deal with, so we handle them properly. For now, we only expect SYSCALL and SSL errors only. Change-Id: I5a21abe636dfede4174d8be8cc8001fcdbfcc12d Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
Change-Id: Icf459bf409c4f8422ce95bbbe279951799f313b2 Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
Some error can happen only with certain features. If these features are used, their error cases must be handled. The assertions is to catch if a feature is enabled without its corresponding error handling. Change-Id: Ifd1b926a95a692eccde44d2d60b2f353eb3d5ea1 Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
It's repetitive and error prone to restore errno before each return from the error handler. Change-Id: I7990c1a2f5c6b1730586e4c6e1774d929685448b Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
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.
Looks good - thanks Ash =) still think an "ErrnoPreserver" class would be best for this but - fine as-is.
net/SslSocket.hpp
Outdated
@@ -363,6 +363,7 @@ class SslStreamSocket final : public StreamSocket | |||
// Not an error; should be handled elsewhere. | |||
case SSL_ERROR_NONE: // 0 | |||
LOG_TRC(SSL_LOG_PREFIX(context, sslError, rc, last_errno) << ": " << bioErrStr); | |||
errno = last_errno; // Restore errno. |
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.
Would love to do this with some RAII guard class
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.
Sure, we could. What complicates it a little is that we override it in a couple of cases.
More non-functional error-handling improvements.
This greatly simplifies error handling, without introducing any functional changes.
Functional changes will follow.