12#include <openssl/x509.h>
13#include <openssl/x509v3.h>
14#include <openssl/asn1.h>
164 errmsg(
"could not create OpenSSL BIO structure")));
178 elog(
ERROR,
"could not free OpenSSL BIO structure");
209 errmsg(
"invalid X.509 field name: \"%s\"",
383 errmsg(
"function returning record called in context that cannot accept type record")));
392 funcctx->max_calls = max_calls;
411 call_cntr =
funcctx->call_cntr;
412 max_calls =
funcctx->max_calls;
416 if (call_cntr < max_calls)
434 errmsg(
"could not create OpenSSL BIO structure")));
445 errmsg(
"unknown OpenSSL extension in certificate at position %d",
454 errmsg(
"could not print extension value in certificate at position %d",
469 elog(
ERROR,
"could not free OpenSSL BIO structure");
Datum numeric_in(PG_FUNCTION_ARGS)
const char * be_tls_get_version(Port *port)
const char * be_tls_get_cipher(Port *port)
void be_tls_get_peer_serial(Port *port, char *ptr, size_t len)
void be_tls_get_peer_issuer_name(Port *port, char *ptr, size_t len)
void be_tls_get_peer_subject_name(Port *port, char *ptr, size_t len)
static Datum values[MAXATTR]
#define CStringGetTextDatum(s)
int errcode(int sqlerrcode)
int errmsg(const char *fmt,...)
#define ereport(elevel,...)
TupleDesc BlessTupleDesc(TupleDesc tupdesc)
#define palloc_object(type)
#define PG_GETARG_TEXT_PP(n)
#define PG_MODULE_MAGIC_EXT(...)
#define PG_FUNCTION_INFO_V1(funcname)
#define PG_RETURN_TEXT_P(x)
#define DirectFunctionCall3(func, arg1, arg2, arg3)
#define PG_RETURN_BOOL(x)
TypeFuncClass get_call_result_type(FunctionCallInfo fcinfo, Oid *resultTypeId, TupleDesc *resultTupleDesc)
#define SRF_IS_FIRSTCALL()
#define SRF_PERCALL_SETUP()
#define SRF_RETURN_NEXT(_funcctx, _result)
#define SRF_FIRSTCALL_INIT()
static Datum HeapTupleGetDatum(const HeapTupleData *tuple)
#define SRF_RETURN_DONE(_funcctx)
HeapTuple heap_form_tuple(TupleDesc tupleDescriptor, const Datum *values, const bool *isnull)
char * pg_any_to_server(const char *s, int len, int encoding)
void pfree(void *pointer)
static MemoryContext MemoryContextSwitchTo(MemoryContext context)
static char buf[DEFAULT_XLOG_SEG_SIZE]
static Datum PointerGetDatum(const void *X)
static Datum BoolGetDatum(bool X)
static Datum ObjectIdGetDatum(Oid X)
static Datum CStringGetDatum(const char *X)
static Datum Int32GetDatum(int32 X)
static Datum X509_NAME_field_to_text(X509_NAME *name, text *fieldName)
Datum ssl_version(PG_FUNCTION_ARGS)
Datum ssl_client_serial(PG_FUNCTION_ARGS)
Datum ssl_issuer_field(PG_FUNCTION_ARGS)
static Datum ASN1_STRING_to_text(ASN1_STRING *str)
Datum ssl_issuer_dn(PG_FUNCTION_ARGS)
Datum ssl_client_dn(PG_FUNCTION_ARGS)
Datum ssl_extension_info(PG_FUNCTION_ARGS)
Datum ssl_cipher(PG_FUNCTION_ARGS)
Datum ssl_client_dn_field(PG_FUNCTION_ARGS)
Datum ssl_client_cert_present(PG_FUNCTION_ARGS)
Datum ssl_is_used(PG_FUNCTION_ARGS)
text * cstring_to_text_with_len(const char *s, int len)
text * cstring_to_text(const char *s)
char * text_to_cstring(const text *t)