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 139 of file sslinfo.c.
References cstring_to_text(), elog, ereport, errcode(), errmsg(), ERROR, pfree(), pg_any_to_server(), PG_RETURN_TEXT_P, and PG_UTF8.
Referenced by X509_NAME_field_to_text().
PG_FUNCTION_INFO_V1 | ( | ssl_is_used | ) |
PG_FUNCTION_INFO_V1 | ( | ssl_version | ) |
PG_FUNCTION_INFO_V1 | ( | ssl_cipher | ) |
PG_FUNCTION_INFO_V1 | ( | ssl_client_cert_present | ) |
PG_FUNCTION_INFO_V1 | ( | ssl_client_serial | ) |
PG_FUNCTION_INFO_V1 | ( | ssl_client_dn_field | ) |
PG_FUNCTION_INFO_V1 | ( | ssl_issuer_field | ) |
PG_FUNCTION_INFO_V1 | ( | ssl_client_dn | ) |
PG_FUNCTION_INFO_V1 | ( | ssl_issuer_dn | ) |
PG_FUNCTION_INFO_V1 | ( | ssl_extension_info | ) |
Datum ssl_cipher | ( | PG_FUNCTION_ARGS | ) |
Definition at line 68 of file sslinfo.c.
References cstring_to_text(), MyProcPort, PG_FUNCTION_INFO_V1(), PG_RETURN_NULL, PG_RETURN_TEXT_P, and ssl_client_cert_present().
Referenced by ssl_version().
Datum ssl_client_cert_present | ( | PG_FUNCTION_ARGS | ) |
Definition at line 84 of file sslinfo.c.
References MyProcPort, PG_FUNCTION_INFO_V1(), PG_RETURN_BOOL, and ssl_client_serial().
Referenced by ssl_cipher().
Datum ssl_client_dn | ( | PG_FUNCTION_ARGS | ) |
Definition at line 359 of file sslinfo.c.
References MyProcPort, PG_FUNCTION_INFO_V1(), PG_RETURN_NULL, ssl_issuer_dn(), and X509_NAME_to_text().
Referenced by X509_NAME_to_text().
Datum ssl_client_dn_field | ( | PG_FUNCTION_ARGS | ) |
Definition at line 226 of file sslinfo.c.
References MyProcPort, PG_FUNCTION_INFO_V1(), PG_GETARG_TEXT_PP, PG_RETURN_NULL, ssl_issuer_field(), and X509_NAME_field_to_text().
Referenced by X509_NAME_field_to_text().
Datum ssl_client_serial | ( | PG_FUNCTION_ARGS | ) |
Definition at line 100 of file sslinfo.c.
References CStringGetDatum, DirectFunctionCall3, Int32GetDatum, MyProcPort, numeric_in(), ObjectIdGetDatum, PG_RETURN_NULL, and port.
Referenced by ssl_client_cert_present().
Datum ssl_extension_info | ( | PG_FUNCTION_ARGS | ) |
Definition at line 396 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, FuncCallContext::max_calls, MemoryContextSwitchTo(), FuncCallContext::multi_call_memory_ctx, MyProcPort, palloc(), 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.
Referenced by ssl_issuer_dn().
Datum ssl_is_used | ( | PG_FUNCTION_ARGS | ) |
Definition at line 44 of file sslinfo.c.
References MyProcPort, PG_FUNCTION_INFO_V1(), PG_RETURN_BOOL, Port::ssl_in_use, and ssl_version().
Datum ssl_issuer_dn | ( | PG_FUNCTION_ARGS | ) |
Definition at line 378 of file sslinfo.c.
References MyProcPort, PG_FUNCTION_INFO_V1(), PG_RETURN_NULL, ssl_extension_info(), and X509_NAME_to_text().
Referenced by ssl_client_dn().
Datum ssl_issuer_field | ( | PG_FUNCTION_ARGS | ) |
Definition at line 261 of file sslinfo.c.
References MyProcPort, PG_GETARG_TEXT_PP, PG_RETURN_NULL, and X509_NAME_field_to_text().
Referenced by ssl_client_dn_field().
Datum ssl_version | ( | PG_FUNCTION_ARGS | ) |
Definition at line 55 of file sslinfo.c.
References cstring_to_text(), MyProcPort, PG_FUNCTION_INFO_V1(), PG_RETURN_NULL, PG_RETURN_TEXT_P, and ssl_cipher().
Referenced by ssl_is_used().
Definition at line 185 of file sslinfo.c.
References ASN1_STRING_to_text(), ereport, errcode(), errmsg(), ERROR, pfree(), PG_FUNCTION_INFO_V1(), ssl_client_dn_field(), and text_to_cstring().
Referenced by ssl_client_dn_field(), and ssl_issuer_field().
|
static |
Definition at line 290 of file sslinfo.c.
References cstring_to_text(), elog, ereport, errcode(), errmsg(), ERROR, i, pfree(), pg_any_to_server(), PG_FUNCTION_INFO_V1(), PG_RETURN_TEXT_P, PG_UTF8, and ssl_client_dn().
Referenced by ssl_client_dn(), and ssl_issuer_dn().