diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c index 8c38688061b..9dd3c3b0319 100644 --- a/src/backend/postmaster/postmaster.c +++ b/src/backend/postmaster/postmaster.c @@ -248,7 +248,7 @@ ProtocolExtensionConfig default_protocol_config = { NULL, NULL, NULL, NULL, /* use libpq defaults for printtup*() */ NULL, libpq_report_param_status, - libpq_ssl_handshake + libpq_direct_ssl_handshake }; /* still more option variables */ @@ -1513,9 +1513,9 @@ libpq_end_command(QueryCompletion *qc, CommandDest dest) } int -libpq_ssl_handshake(struct Port *port) +libpq_direct_ssl_handshake(struct Port *port) { - return WrapperProcessSSLStartup(port); + return ProcessSSLStartup(port); } /* diff --git a/src/backend/tcop/backend_startup.c b/src/backend/tcop/backend_startup.c index 5f0294161eb..d7459cb7500 100644 --- a/src/backend/tcop/backend_startup.c +++ b/src/backend/tcop/backend_startup.c @@ -42,7 +42,7 @@ bool Trace_connection_negotiation = false; static void BackendInitialize(ClientSocket *client_sock, CAC_state cac, ProtocolExtensionConfig *protocol_config); int ProcessStartupPacket(Port *port, bool ssl_done, bool gss_done); -static int ProcessSSLStartup(Port *port); +int ProcessSSLStartup(Port *port); static void SendNegotiateProtocolVersion(List *unrecognized_protocol_options); static void process_startup_packet_die(SIGNAL_ARGS); static void StartupPacketTimeoutHandler(void); @@ -359,7 +359,7 @@ BackendInitialize(ClientSocket *client_sock, CAC_state cac, ProtocolExtensionCon * This happens before the startup packet so we are careful not to actually * read any bytes from the stream if it's not a direct SSL connection. */ -static int +int ProcessSSLStartup(Port *port) { int firstbyte; @@ -888,12 +888,3 @@ StartupPacketTimeoutHandler(void) { _exit(1); } - -/* - * Wrapper for ProcessSSLStartup to handle direct SSL handshake - */ -int -WrapperProcessSSLStartup(Port *port) -{ - return ProcessSSLStartup(port); -} diff --git a/src/include/postmaster/protocol_extension.h b/src/include/postmaster/protocol_extension.h index a22cf02b2c7..f1c78c85b73 100644 --- a/src/include/postmaster/protocol_extension.h +++ b/src/include/postmaster/protocol_extension.h @@ -42,6 +42,6 @@ extern void libpq_send_ready_for_query(CommandDest dest); extern int libpq_read_command(StringInfo inBuf); extern void libpq_end_command(QueryCompletion *qc, CommandDest dest); extern void libpq_report_param_status(const char *name, char *val); -extern int libpq_ssl_handshake(struct Port *port); +extern int libpq_direct_ssl_handshake(struct Port *port); #endif /* _PROTOCOL_EXTENSION_H */ diff --git a/src/include/tcop/backend_startup.h b/src/include/tcop/backend_startup.h index 3099c5c9b54..31b0814691c 100644 --- a/src/include/tcop/backend_startup.h +++ b/src/include/tcop/backend_startup.h @@ -39,6 +39,6 @@ typedef struct BackendStartupData extern void BackendMain(char *startup_data, size_t startup_data_len) pg_attribute_noreturn(); extern int ProcessStartupPacket(Port *port, bool ssl_done, bool gss_done); -extern int WrapperProcessSSLStartup(Port *port); +extern int ProcessSSLStartup(Port *port); #endif /* BACKEND_STARTUP_H */