-
Notifications
You must be signed in to change notification settings - Fork 379
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
minor SSL code cleanups #2328
minor SSL code cleanups #2328
Conversation
- added comment that using "SSLv23" methods will automatically negotiate the highest possible TLS protocol version - cleaned up error handling in ACE_SSL_SOCK_Stream::close()
WalkthroughThe pull request introduces clarifying comments and minor code adjustments across SSL-related files. In the SSL context files, comments now explain that OpenSSL macros and enum values negotiate the highest available SSL/TLS version, including the addition of a new enum value (SSLv23). In the SSL socket stream source, the return value of the Changes
Sequence Diagram(s)sequenceDiagram
participant S as ACE_SSL_SOCK_Stream
participant SSL as SSL Library
S->>SSL: Call SSL_get_error()
alt SSL_ERROR_WANT_READ / SSL_ERROR_WANT_WRITE
Note right of S: Set errno to EWOULDBLOCK
else SSL_ERROR_SSL
Note right of S: Handle SSL_ERROR_SSL
S->>S: Call set_handle(ACE_INVALID_HANDLE)
else Default (including SSL_ERROR_SYSCALL)
Note right of S: Reset SSL object on error
S->>S: Call set_handle(ACE_INVALID_HANDLE)
end
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (1)
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
ACE/ace/SSL/SSL_SOCK_Stream.inl (1)
320-345
: LGTM! Error handling improvements look good.The changes improve error handling by:
- Better organizing error cases
- Ensuring proper cleanup in all error scenarios
- Adding explicit handling for SSL-specific errors
Consider adding a comment explaining why
SSL_ERROR_SYSCALL
is handled in the default case along withSSL_ERROR_SSL
, as it might not be immediately obvious to future maintainers. For example:case SSL_ERROR_SSL: + // SSL_ERROR_SYSCALL needs the same error handling as SSL_ERROR_SSL case SSL_ERROR_SYSCALL: default:
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
ACE/ace/SSL/SSL_Context.cpp
(1 hunks)ACE/ace/SSL/SSL_Context.h
(1 hunks)ACE/ace/SSL/SSL_SOCK_Stream.cpp
(1 hunks)ACE/ace/SSL/SSL_SOCK_Stream.inl
(2 hunks)
✅ Files skipped from review due to trivial changes (2)
- ACE/ace/SSL/SSL_Context.cpp
- ACE/ace/SSL/SSL_Context.h
⏰ Context from checks skipped due to timeout of 90000ms (20)
- GitHub Check: ubuntu-20.04 g++-10 ACE for TAO
- GitHub Check: ubuntu-20.04 clang++-10
- GitHub Check: VS2022Release64
- GitHub Check: VS2022Debug64
- GitHub Check: VS2022WChar
- GitHub Check: VS2019Debug64Cxx20
- GitHub Check: VS2019Debug64Cxx17
- GitHub Check: Codacy Static Code Analysis
- GitHub Check: VS2019Release32
- GitHub Check: VS2019Debug32
- GitHub Check: VS2019Release64
- GitHub Check: VS2019Debug64
- GitHub Check: VS2019WChar
- GitHub Check: macos-14-C++
- GitHub Check: windows-2019 vs2019
- GitHub Check: MINGW64-gcc
- GitHub Check: macos-13-C++
- GitHub Check: ubuntu-20.04 g++-10
- GitHub Check: ubuntu-22.04 g++-12
- GitHub Check: alpine-3.18
🔇 Additional comments (1)
ACE/ace/SSL/SSL_SOCK_Stream.cpp (1)
161-161
: LGTM! Explicit cast improves type safety.The explicit cast from
ssize_t
tou_long
makes the conversion intention clear and prevents potential sign conversion warnings. The cast is safe here as error cases are properly handled earlier in the function.
Summary by CodeRabbit