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

Refactor direct SSL handshake logic #501

Conversation

roshan0708
Copy link
Contributor

@roshan0708 roshan0708 commented Dec 16, 2024

Description

This commit refactors the direct SSL handshake logic in the engine to support protocol-specific handling through the fn_direct_ssl_handshake function pointer. Changed the definition of ProcessSSLStartup function to non-static for handling non-TDS connections directly from postmaster.c. The connection startup process now delegates SSL handshake handling to the protocol-defined function.

Extension PR: babelfish-for-postgresql/babelfish_extensions#3261

Issues Resolved

BABEL-5342

Check List

  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is under the terms of the PostgreSQL license, and grant any person obtaining a copy of the contribution permission to relicense all or a portion of my contribution to the PostgreSQL License solely to contribute all or a portion of my contribution to the PostgreSQL open source project.

For more information on following Developer Certificate of Origin and signing off your commits, please check here.

This commit refactors the SSL handshake logic in the engine to support
protocol-specific handling through the fn_ssl_handshake function
pointer. A wrapper function encapsulates the static ProcessSSLStartup
logic for non-TDS connections, ensuring the original functionality is
preserved. The connection startup process now delegates SSL handshake
handling to the protocol-defined function.

Task: BABEL-5342
Signed-off-by: Roshan Kanwar <[email protected]>
src/backend/tcop/backend_startup.c Outdated Show resolved Hide resolved
src/backend/tcop/backend_startup.c Outdated Show resolved Hide resolved
src/backend/postmaster/postmaster.c Outdated Show resolved Hide resolved
kuntalghosh
kuntalghosh previously approved these changes Dec 18, 2024
@shardgupta shardgupta merged commit fc679ed into babelfish-for-postgresql:BABEL_5_X_DEV__PG_17_X Dec 18, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants