datum_t ssl_issuer_field(PG_FUNC_ARGS) { text *fieldname = ARG_TEXT_P(0); datum_t result; if (!(proc_port->peer)) RET_NULL(); result = X509_NAME_field_to_text(X509_get_issuer_name(proc_port->peer), fieldname); if (!result) RET_NULL(); else return result; }
Datum ssl_issuer_field(PG_FUNCTION_ARGS) { text *fieldname = PG_GETARG_TEXT_P(0); Datum result; if (!(MyProcPort->peer)) PG_RETURN_NULL(); result = X509_NAME_field_to_text(X509_get_issuer_name(MyProcPort->peer), fieldname); if (!result) PG_RETURN_NULL(); else return result; }