PostgreSQL Source Code
git master
|
#include "postgres.h"
#include <signal.h>
#include <fcntl.h>
#include <ctype.h>
#include <sys/socket.h>
#include <netdb.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <arpa/inet.h>
#include "libpq/libpq.h"
#include "miscadmin.h"
#include "tcop/tcopprot.h"
#include "utils/injection_point.h"
#include "utils/wait_event.h"
Go to the source code of this file.
Functions | |
int | secure_initialize (bool isServerStart) |
void | secure_destroy (void) |
bool | secure_loaded_verify_locations (void) |
int | secure_open_server (Port *port) |
void | secure_close (Port *port) |
ssize_t | secure_read (Port *port, void *ptr, size_t len) |
ssize_t | secure_raw_read (Port *port, void *ptr, size_t len) |
ssize_t | secure_write (Port *port, void *ptr, size_t len) |
ssize_t | secure_raw_write (Port *port, const void *ptr, size_t len) |
Variables | |
char * | ssl_library |
char * | ssl_cert_file |
char * | ssl_key_file |
char * | ssl_ca_file |
char * | ssl_crl_file |
char * | ssl_crl_dir |
char * | ssl_dh_params_file |
char * | ssl_passphrase_command |
bool | ssl_passphrase_command_supports_reload |
char * | SSLCipherSuites = NULL |
char * | SSLECDHCurve |
bool | SSLPreferServerCiphers |
int | ssl_min_protocol_version = PG_TLS1_2_VERSION |
int | ssl_max_protocol_version = PG_TLS_ANY |
void secure_close | ( | Port * | port | ) |
Definition at line 166 of file be-secure.c.
References be_tls_close(), and port.
Referenced by socket_close().
void secure_destroy | ( | void | ) |
Definition at line 87 of file be-secure.c.
References be_tls_destroy().
Referenced by process_pm_reload_request().
int secure_initialize | ( | bool | isServerStart | ) |
Definition at line 74 of file be-secure.c.
References be_tls_init().
Referenced by BackendMain(), PostmasterMain(), and process_pm_reload_request().
bool secure_loaded_verify_locations | ( | void | ) |
int secure_open_server | ( | Port * | port | ) |
Definition at line 111 of file be-secure.c.
References Assert, be_tls_open_server(), buf, DEBUG2, elog, ereport, errmsg_internal(), INJECTION_POINT, len, LOG, palloc(), pfree(), port, pq_buffer_remaining_data(), pq_endmsgread(), pq_getbytes(), pq_startmsgread(), and STATUS_ERROR.
Referenced by ProcessSSLStartup(), and ProcessStartupPacket().
ssize_t secure_raw_read | ( | Port * | port, |
void * | ptr, | ||
size_t | len | ||
) |
Definition at line 267 of file be-secure.c.
References Assert, len, pgwin32_noblock, port, and recv.
Referenced by be_gssapi_read(), my_sock_read(), read_or_wait(), and secure_read().
ssize_t secure_raw_write | ( | Port * | port, |
const void * | ptr, | ||
size_t | len | ||
) |
Definition at line 376 of file be-secure.c.
References len, pgwin32_noblock, port, and send.
Referenced by be_gssapi_write(), my_sock_write(), secure_open_gssapi(), and secure_write().
ssize_t secure_read | ( | Port * | port, |
void * | ptr, | ||
size_t | len | ||
) |
Definition at line 178 of file be-secure.c.
References Assert, be_gssapi_read(), be_tls_read(), EAGAIN, ereport, errcode(), errmsg(), WaitEvent::events, EWOULDBLOCK, FATAL, FeBeWaitSet, FeBeWaitSetSocketPos, len, ModifyWaitEvent(), MyLatch, port, ProcessClientReadInterrupt(), ResetLatch(), secure_raw_read(), WaitEventSetWait(), WL_LATCH_SET, WL_POSTMASTER_DEATH, and WL_SOCKET_READABLE.
Referenced by pq_getbyte_if_available(), and pq_recvbuf().
ssize_t secure_write | ( | Port * | port, |
void * | ptr, | ||
size_t | len | ||
) |
Definition at line 304 of file be-secure.c.
References Assert, be_gssapi_write(), be_tls_write(), EAGAIN, ereport, errcode(), errmsg(), WaitEvent::events, EWOULDBLOCK, FATAL, FeBeWaitSet, FeBeWaitSetSocketPos, len, ModifyWaitEvent(), MyLatch, port, ProcessClientWriteInterrupt(), ResetLatch(), secure_raw_write(), WaitEventSetWait(), WL_LATCH_SET, WL_POSTMASTER_DEATH, and WL_SOCKET_WRITEABLE.
Referenced by internal_flush_buffer(), and ProcessStartupPacket().
char* ssl_ca_file |
Definition at line 39 of file be-secure.c.
Referenced by be_tls_init().
char* ssl_cert_file |
Definition at line 37 of file be-secure.c.
Referenced by be_tls_init().
char* ssl_crl_dir |
Definition at line 41 of file be-secure.c.
Referenced by be_tls_init().
char* ssl_crl_file |
Definition at line 40 of file be-secure.c.
Referenced by be_tls_init().
char* ssl_dh_params_file |
Definition at line 42 of file be-secure.c.
Referenced by initialize_dh().
char* ssl_key_file |
Definition at line 38 of file be-secure.c.
Referenced by be_tls_init(), and check_ssl_key_file_permissions().
char* ssl_library |
Definition at line 36 of file be-secure.c.
int ssl_max_protocol_version = PG_TLS_ANY |
Definition at line 60 of file be-secure.c.
Referenced by be_tls_init(), and be_tls_open_server().
int ssl_min_protocol_version = PG_TLS1_2_VERSION |
Definition at line 59 of file be-secure.c.
Referenced by be_tls_init(), and be_tls_open_server().
char* ssl_passphrase_command |
Definition at line 43 of file be-secure.c.
Referenced by default_openssl_tls_init(), run_ssl_passphrase_command(), and set_rot13().
bool ssl_passphrase_command_supports_reload |
Definition at line 44 of file be-secure.c.
Referenced by default_openssl_tls_init().
char* SSLCipherSuites = NULL |
Definition at line 51 of file be-secure.c.
Referenced by be_tls_init().
char* SSLECDHCurve |
Definition at line 54 of file be-secure.c.
Referenced by initialize_ecdh().
bool SSLPreferServerCiphers |
Definition at line 57 of file be-secure.c.
Referenced by be_tls_init().