Skip to content

Commit

Permalink
Add TDS-specific SSL handshake handling (#3261)
Browse files Browse the repository at this point in the history
This commit adds the TdsSSLHandshake function to handle SSL handshakes
specifically for TDS connections. The ProtocolExtensionConfig structure
has been updated with a new fn_ssl_handshake function pointer, allowing
protocol-specific SSL handling. This change ensures that TDS connections
bypass the standard SSL handshake by returning STATUS_OK without
invoking ProcessSSLStartup.

Task: BABEL-5342

Signed-off-by: Roshan Kanwar <[email protected]>
  • Loading branch information
roshan0708 authored Dec 18, 2024
1 parent f60d8f1 commit 93b91d1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
3 changes: 2 additions & 1 deletion contrib/babelfishpg_tds/src/backend/tds/tds_srv.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ static ProtocolExtensionConfig pe_config = {
TdsShutdown,
TdsDestroy,
pe_process_command,
pe_report_param_status
pe_report_param_status,
TdsDirectSSLHandshake
};

/*
Expand Down
7 changes: 7 additions & 0 deletions contrib/babelfishpg_tds/src/backend/tds/tdsprinttup.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,3 +122,10 @@ TdsDestroy(DestReceiver *self)
{
pfree(self);
}

static int
TdsDirectSSLHandshake(struct Port *port)
{
/* Always return STATUS_OK for TDS connections */
return STATUS_OK;
}

0 comments on commit 93b91d1

Please sign in to comment.