#include "postgres.h"
#include <sys/stat.h>
#include <signal.h>
#include <fcntl.h>
#include <ctype.h>
#include <sys/socket.h>
#include <unistd.h>
#include <netdb.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <arpa/inet.h>
#include "common/string.h"
#include "libpq/libpq.h"
#include "miscadmin.h"
#include "pgstat.h"
#include "storage/fd.h"
#include "storage/latch.h"
#include "utils/guc.h"
#include "utils/memutils.h"
#include "common/openssl.h"
#include <openssl/bn.h>
#include <openssl/conf.h>
#include <openssl/dh.h>
#include <openssl/ec.h>
#include <openssl/x509v3.h>
Go to the source code of this file.
Definition at line 1335 of file be-secure-openssl.c.
References alpn_protos, and Assert().
Referenced by be_tls_open_server().
Definition at line 735 of file be-secure-openssl.c.
Referenced by secure_close().
Definition at line 430 of file be-secure-openssl.c.
References SSL_context.
Referenced by secure_destroy().
Definition at line 1582 of file be-secure-openssl.c.
References elog, ERROR, hash(), len, palloc(), and port.
Referenced by read_client_final_message().
Definition at line 1534 of file be-secure-openssl.c.
References port.
Referenced by PerformAuthentication(), pgstat_bestart_security(), and ssl_cipher().
Definition at line 1511 of file be-secure-openssl.c.
References port.
Referenced by PerformAuthentication(), and pgstat_bestart_security().
Definition at line 1552 of file be-secure-openssl.c.
References len, port, strlcpy(), and X509_NAME_to_cstring().
Referenced by pgstat_bestart_security(), and ssl_issuer_dn().
Definition at line 1561 of file be-secure-openssl.c.
References b, len, port, and strlcpy().
Referenced by pgstat_bestart_security(), and ssl_client_serial().
Definition at line 1543 of file be-secure-openssl.c.
References len, port, strlcpy(), and X509_NAME_to_cstring().
Referenced by pgstat_bestart_security(), and ssl_client_dn().
Definition at line 1525 of file be-secure-openssl.c.
References port.
Referenced by PerformAuthentication(), pgstat_bestart_security(), and ssl_version().
Definition at line 98 of file be-secure-openssl.c.
References check_ssl_key_file_permissions(), dummy_ssl_passwd_cb_called, ereport, errcode(), errdetail(), errmsg(), error(), FATAL, GetConfigOption(), initialize_dh(), initialize_ecdh(), LOG, ssl_ca_file, ssl_cert_file, SSL_context, ssl_crl_dir, ssl_crl_file, ssl_is_server_start, ssl_key_file, ssl_max_protocol_version, ssl_min_protocol_version, ssl_protocol_version_to_openssl(), SSLCipherList, SSLCipherSuites, SSLerrmessage(), SSLPreferServerCiphers, and verify_cb().
Referenced by secure_initialize().
Definition at line 439 of file be-secure-openssl.c.
References alpn_cb(), Assert(), cert_errdetail, COMMERROR, ereport, err(), errcode(), errcode_for_socket_access(), errdetail_internal(), errhint(), errmsg(), info_cb(), len, MemoryContextAlloc(), pfree(), PG_ALPN_PROTOCOL, port, SSL_context, ssl_max_protocol_version, ssl_min_protocol_version, ssl_protocol_version_to_string(), ssl_set_port_bio(), SSLerrmessage(), TopMemoryContext, WaitLatchOrSocket(), WL_EXIT_ON_PM_DEATH, WL_SOCKET_READABLE, and WL_SOCKET_WRITEABLE.
Referenced by secure_open_server().
Definition at line 765 of file be-secure-openssl.c.
References COMMERROR, ECONNRESET, ereport, err(), errcode(), errmsg(), EWOULDBLOCK, len, port, SSLerrmessage(), WL_SOCKET_READABLE, and WL_SOCKET_WRITEABLE.
Referenced by secure_read().
Definition at line 824 of file be-secure-openssl.c.
References COMMERROR, ECONNRESET, ereport, err(), errcode(), errmsg(), EWOULDBLOCK, len, port, SSLerrmessage(), WL_SOCKET_READABLE, and WL_SOCKET_WRITEABLE.
Referenced by secure_write().
Definition at line 1774 of file be-secure-openssl.c.
References dummy_ssl_passwd_cb(), ssl_external_passwd_cb(), ssl_passphrase_command, and ssl_passphrase_command_supports_reload.
Definition at line 1148 of file be-secure-openssl.c.
References Assert(), buf, and dummy_ssl_passwd_cb_called.
Referenced by default_openssl_tls_init().
Definition at line 1284 of file be-secure-openssl.c.
References generate_unaccent_rules::args, DEBUG4, ereport, errmsg_internal(), and type.
Referenced by be_tls_open_server().
Definition at line 1387 of file be-secure-openssl.c.
References ereport, errcode(), errmsg(), FATAL, load_dh_buffer(), load_dh_file(), LOG, ssl_dh_params_file, and SSLerrmessage().
Referenced by be_tls_init().
Definition at line 1425 of file be-secure-openssl.c.
References _, ereport, errcode(), errhint(), errmsg(), FATAL, LOG, SSLECDHCurve, and SSLerrmessageExt().
Referenced by be_tls_init().
Definition at line 1106 of file be-secure-openssl.c.
References DEBUG2, ereport, errmsg_internal(), len, and SSLerrmessage().
Referenced by initialize_dh().
Definition at line 1039 of file be-secure-openssl.c.
References AllocateFile(), ereport, errcode(), errcode_for_file_access(), errmsg(), FATAL, filename, FreeFile(), LOG, and SSLerrmessage().
Referenced by initialize_dh().
Definition at line 955 of file be-secure-openssl.c.
References port.
Referenced by port_bio_method().
Definition at line 985 of file be-secure-openssl.c.
References port_bio_ctrl(), port_bio_method_ptr, port_bio_read(), and port_bio_write().
Referenced by ssl_set_port_bio().
Definition at line 912 of file be-secure-openssl.c.
References buf, EAGAIN, EINTR, EWOULDBLOCK, port, and secure_raw_read().
Referenced by port_bio_method().
Definition at line 936 of file be-secure-openssl.c.
References buf, EAGAIN, EINTR, EWOULDBLOCK, and secure_raw_write().
Referenced by port_bio_method().
Definition at line 1165 of file be-secure-openssl.c.
References MAXLEN, name, and pg_clean_ascii().
Referenced by verify_cb().
Definition at line 1128 of file be-secure-openssl.c.
References Assert(), buf, run_ssl_passphrase_command(), and ssl_is_server_start.
Referenced by default_openssl_tls_init().
Definition at line 1718 of file be-secure-openssl.c.
References PG_TLS1_1_VERSION, PG_TLS1_2_VERSION, PG_TLS1_3_VERSION, PG_TLS1_VERSION, and PG_TLS_ANY.
Referenced by be_tls_init().
Definition at line 1753 of file be-secure-openssl.c.
References PG_TLS1_1_VERSION, PG_TLS1_2_VERSION, PG_TLS1_3_VERSION, PG_TLS1_VERSION, and PG_TLS_ANY.
Referenced by be_tls_open_server().
Definition at line 1011 of file be-secure-openssl.c.
References port, and port_bio_method().
Referenced by be_tls_open_server().
Definition at line 1482 of file be-secure-openssl.c.
References _, snprintf, and strerror.
Referenced by be_tls_init(), be_tls_open_server(), be_tls_read(), be_tls_write(), initialize_dh(), load_dh_buffer(), load_dh_file(), and SSLerrmessageExt().
Definition at line 1464 of file be-secure-openssl.c.
References SSLerrmessage().
Referenced by initialize_ecdh().
Definition at line 1205 of file be-secure-openssl.c.
References _, appendStringInfo(), appendStringInfoChar(), b, cert_errdetail, errcode(), initStringInfo(), pfree(), prepare_cert_name(), str, and X509_NAME_to_cstring().
Referenced by be_tls_init().
Definition at line 1645 of file be-secure-openssl.c.
References elog, ereport, errcode(), errmsg(), ERROR, i, name, pfree(), pg_any_to_server(), PG_UTF8, and pstrdup().
Referenced by be_tls_get_peer_issuer_name(), be_tls_get_peer_subject_name(), and verify_cb().
Definition at line 1328 of file be-secure-openssl.c.
Referenced by alpn_cb().
Definition at line 91 of file be-secure-openssl.c.
Referenced by be_tls_open_server(), and verify_cb().
Definition at line 84 of file be-secure-openssl.c.
Referenced by be_tls_init(), and dummy_ssl_passwd_cb().
Definition at line 57 of file be-secure-openssl.c.
Referenced by _PG_init().
Definition at line 909 of file be-secure-openssl.c.
Referenced by port_bio_method().
Definition at line 83 of file be-secure-openssl.c.
Referenced by be_tls_destroy(), be_tls_init(), be_tls_open_server(), and initialize_SSL().
Definition at line 85 of file be-secure-openssl.c.
Referenced by be_tls_init(), and ssl_external_passwd_cb().