PostgreSQL Source Code
git master
|
#include "postgres.h"
#include <openssl/x509.h>
#include <openssl/x509v3.h>
#include <openssl/asn1.h>
#include "access/htup_details.h"
#include "funcapi.h"
#include "libpq/libpq-be.h"
#include "miscadmin.h"
#include "utils/builtins.h"
Go to the source code of this file.
Data Structures | |
struct | SSLExtensionInfoContext |
Variables | |
PG_MODULE_MAGIC | |
|
static |
Definition at line 159 of file sslinfo.c.
References cstring_to_text(), elog, ereport, errcode(), errmsg(), ERROR, pfree(), pg_any_to_server(), PG_RETURN_TEXT_P, PG_UTF8, size, and str.
Referenced by X509_NAME_field_to_text().
PG_FUNCTION_INFO_V1 | ( | ssl_cipher | ) |
PG_FUNCTION_INFO_V1 | ( | ssl_client_cert_present | ) |
PG_FUNCTION_INFO_V1 | ( | ssl_client_dn | ) |
PG_FUNCTION_INFO_V1 | ( | ssl_client_dn_field | ) |
PG_FUNCTION_INFO_V1 | ( | ssl_client_serial | ) |
PG_FUNCTION_INFO_V1 | ( | ssl_extension_info | ) |
PG_FUNCTION_INFO_V1 | ( | ssl_is_used | ) |
PG_FUNCTION_INFO_V1 | ( | ssl_issuer_dn | ) |
PG_FUNCTION_INFO_V1 | ( | ssl_issuer_field | ) |
PG_FUNCTION_INFO_V1 | ( | ssl_version | ) |
Datum ssl_cipher | ( | PG_FUNCTION_ARGS | ) |
Definition at line 85 of file sslinfo.c.
References be_tls_get_cipher(), cstring_to_text(), MyProcPort, PG_RETURN_NULL, PG_RETURN_TEXT_P, and Port::ssl_in_use.
Datum ssl_client_cert_present | ( | PG_FUNCTION_ARGS | ) |
Definition at line 108 of file sslinfo.c.
References MyProcPort, Port::peer_cert_valid, and PG_RETURN_BOOL.
Datum ssl_client_dn | ( | PG_FUNCTION_ARGS | ) |
Definition at line 309 of file sslinfo.c.
References be_tls_get_peer_subject_name(), cstring_to_text(), MyProcPort, NAMEDATALEN, Port::peer_cert_valid, PG_RETURN_NULL, PG_RETURN_TEXT_P, and Port::ssl_in_use.
Datum ssl_client_dn_field | ( | PG_FUNCTION_ARGS | ) |
Definition at line 246 of file sslinfo.c.
References MyProcPort, Port::peer, Port::peer_cert_valid, PG_GETARG_TEXT_PP, PG_RETURN_NULL, Port::ssl_in_use, and X509_NAME_field_to_text().
Datum ssl_client_serial | ( | PG_FUNCTION_ARGS | ) |
Definition at line 124 of file sslinfo.c.
References be_tls_get_peer_serial(), CStringGetDatum(), DirectFunctionCall3, Int32GetDatum(), MyProcPort, NAMEDATALEN, numeric_in(), ObjectIdGetDatum(), Port::peer_cert_valid, PG_RETURN_NULL, and Port::ssl_in_use.
Datum ssl_extension_info | ( | PG_FUNCTION_ARGS | ) |
Definition at line 362 of file sslinfo.c.
References BlessTupleDesc(), BoolGetDatum(), buf, FuncCallContext::call_cntr, cstring_to_text_with_len(), CStringGetTextDatum, elog, ereport, errcode(), errmsg(), ERROR, get_call_result_type(), heap_form_tuple(), HeapTupleGetDatum(), len, FuncCallContext::max_calls, MemoryContextSwitchTo(), FuncCallContext::multi_call_memory_ctx, MyProcPort, palloc(), Port::peer, PointerGetDatum(), SRF_FIRSTCALL_INIT, SRF_IS_FIRSTCALL, SRF_PERCALL_SETUP, SRF_RETURN_DONE, SRF_RETURN_NEXT, SSLExtensionInfoContext::tupdesc, TYPEFUNC_COMPOSITE, FuncCallContext::user_fctx, and values.
Datum ssl_is_used | ( | PG_FUNCTION_ARGS | ) |
Definition at line 54 of file sslinfo.c.
References MyProcPort, PG_RETURN_BOOL, and Port::ssl_in_use.
Datum ssl_issuer_dn | ( | PG_FUNCTION_ARGS | ) |
Definition at line 336 of file sslinfo.c.
References be_tls_get_peer_issuer_name(), cstring_to_text(), MyProcPort, NAMEDATALEN, Port::peer_cert_valid, PG_RETURN_NULL, PG_RETURN_TEXT_P, and Port::ssl_in_use.
Datum ssl_issuer_field | ( | PG_FUNCTION_ARGS | ) |
Definition at line 281 of file sslinfo.c.
References MyProcPort, Port::peer, PG_GETARG_TEXT_PP, PG_RETURN_NULL, and X509_NAME_field_to_text().
Datum ssl_version | ( | PG_FUNCTION_ARGS | ) |
Definition at line 65 of file sslinfo.c.
References be_tls_get_version(), cstring_to_text(), MyProcPort, PG_RETURN_NULL, PG_RETURN_TEXT_P, and Port::ssl_in_use.
Definition at line 205 of file sslinfo.c.
References ASN1_STRING_to_text(), data, ereport, errcode(), errmsg(), ERROR, name, pfree(), and text_to_cstring().
Referenced by ssl_client_dn_field(), and ssl_issuer_field().