47 bool ssl_loaded_verify_locations =
false;
101 return ssl_loaded_verify_locations;
129 port->raw_buf_consumed = 0;
137 if (
port->raw_buf_remaining > 0)
143 elog(
LOG,
"buffered unencrypted data remains after negotiating SSL connection");
146 if (
port->raw_buf != NULL)
149 port->raw_buf = NULL;
154 port->peer_dn ?
port->peer_dn :
"(anonymous)",
155 port->peer_cn ?
port->peer_cn :
"(anonymous)")));
169 if (
port->ssl_in_use)
189 if (
port->ssl_in_use)
218 WAIT_EVENT_CLIENT_READ);
239 (
errcode(ERRCODE_ADMIN_SHUTDOWN),
240 errmsg(
"terminating connection due to unexpected postmaster exit")));
272 if (
port->raw_buf_remaining > 0)
275 if (
len >
port->raw_buf_remaining)
278 memcpy(ptr,
port->raw_buf +
port->raw_buf_consumed,
len);
280 port->raw_buf_remaining -=
len;
315 if (
port->ssl_in_use)
343 WAIT_EVENT_CLIENT_WRITE);
348 (
errcode(ERRCODE_ADMIN_SHUTDOWN),
349 errmsg(
"terminating connection due to unexpected postmaster exit")));
ssize_t be_gssapi_read(Port *port, void *ptr, size_t len)
ssize_t be_gssapi_write(Port *port, void *ptr, size_t len)
void be_tls_destroy(void)
int be_tls_init(bool isServerStart)
int be_tls_open_server(Port *port)
void be_tls_close(Port *port)
ssize_t be_tls_read(Port *port, void *ptr, size_t len, int *waitfor)
ssize_t be_tls_write(Port *port, void *ptr, size_t len, int *waitfor)
void secure_destroy(void)
char * ssl_dh_params_file
int ssl_min_protocol_version
ssize_t secure_raw_read(Port *port, void *ptr, size_t len)
int secure_initialize(bool isServerStart)
bool SSLPreferServerCiphers
int ssl_max_protocol_version
char * ssl_passphrase_command
ssize_t secure_write(Port *port, void *ptr, size_t len)
int secure_open_server(Port *port)
bool ssl_passphrase_command_supports_reload
bool secure_loaded_verify_locations(void)
void secure_close(Port *port)
ssize_t secure_read(Port *port, void *ptr, size_t len)
ssize_t secure_raw_write(Port *port, const void *ptr, size_t len)
#define Assert(condition)
int errmsg_internal(const char *fmt,...)
int errcode(int sqlerrcode)
int errmsg(const char *fmt,...)
#define ereport(elevel,...)
#define INJECTION_POINT(name)
void ModifyWaitEvent(WaitEventSet *set, int pos, uint32 events, Latch *latch)
int WaitEventSetWait(WaitEventSet *set, long timeout, WaitEvent *occurred_events, int nevents, uint32 wait_event_info)
void ResetLatch(Latch *latch)
#define WL_SOCKET_READABLE
#define WL_POSTMASTER_DEATH
#define WL_SOCKET_WRITEABLE
#define FeBeWaitSetSocketPos
void pfree(void *pointer)
void ProcessClientReadInterrupt(bool blocked)
void ProcessClientWriteInterrupt(bool blocked)
int pq_getbytes(char *s, size_t len)
ssize_t pq_buffer_remaining_data(void)
WaitEventSet * FeBeWaitSet
void pq_startmsgread(void)
#define recv(s, buf, len, flags)
#define send(s, buf, len, flags)