47bool ssl_loaded_verify_locations =
false;
102 return ssl_loaded_verify_locations;
130 port->raw_buf_consumed = 0;
138 if (
port->raw_buf_remaining > 0)
144 elog(
LOG,
"buffered unencrypted data remains after negotiating SSL connection");
147 if (
port->raw_buf != NULL)
150 port->raw_buf = NULL;
155 port->peer_dn ?
port->peer_dn :
"(anonymous)",
156 port->peer_cn ?
port->peer_cn :
"(anonymous)")));
170 if (
port->ssl_in_use)
190 if (
port->ssl_in_use)
219 WAIT_EVENT_CLIENT_READ);
240 (
errcode(ERRCODE_ADMIN_SHUTDOWN),
241 errmsg(
"terminating connection due to unexpected postmaster exit")));
273 if (
port->raw_buf_remaining > 0)
276 if (
len >
port->raw_buf_remaining)
279 memcpy(ptr,
port->raw_buf +
port->raw_buf_consumed,
len);
281 port->raw_buf_remaining -=
len;
316 if (
port->ssl_in_use)
344 WAIT_EVENT_CLIENT_WRITE);
349 (
errcode(ERRCODE_ADMIN_SHUTDOWN),
350 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)