mirror of
https://github.com/postgres/postgres.git
synced 2025-07-26 01:22:12 +03:00
Minor code beautification in contrib/sslinfo.
Static-ify some functions that didn't need to be exported, and improve a couple of comments. Gurjeet Singh
This commit is contained in:
@ -31,9 +31,10 @@ Datum ssl_client_dn_field(PG_FUNCTION_ARGS);
|
|||||||
Datum ssl_issuer_field(PG_FUNCTION_ARGS);
|
Datum ssl_issuer_field(PG_FUNCTION_ARGS);
|
||||||
Datum ssl_client_dn(PG_FUNCTION_ARGS);
|
Datum ssl_client_dn(PG_FUNCTION_ARGS);
|
||||||
Datum ssl_issuer_dn(PG_FUNCTION_ARGS);
|
Datum ssl_issuer_dn(PG_FUNCTION_ARGS);
|
||||||
Datum X509_NAME_field_to_text(X509_NAME *name, text *fieldName);
|
|
||||||
Datum X509_NAME_to_text(X509_NAME *name);
|
static Datum X509_NAME_field_to_text(X509_NAME *name, text *fieldName);
|
||||||
Datum ASN1_STRING_to_text(ASN1_STRING *str);
|
static Datum X509_NAME_to_text(X509_NAME *name);
|
||||||
|
static Datum ASN1_STRING_to_text(ASN1_STRING *str);
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -51,7 +52,7 @@ ssl_is_used(PG_FUNCTION_ARGS)
|
|||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Returns SSL cipher currently in use.
|
* Returns SSL version currently in use.
|
||||||
*/
|
*/
|
||||||
PG_FUNCTION_INFO_V1(ssl_version);
|
PG_FUNCTION_INFO_V1(ssl_version);
|
||||||
Datum
|
Datum
|
||||||
@ -77,7 +78,7 @@ ssl_cipher(PG_FUNCTION_ARGS)
|
|||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Indicates whether current client have provided a certificate
|
* Indicates whether current client provided a certificate
|
||||||
*
|
*
|
||||||
* Function has no arguments. Returns bool. True if current session
|
* Function has no arguments. Returns bool. True if current session
|
||||||
* is SSL session and client certificate is verified, otherwise false.
|
* is SSL session and client certificate is verified, otherwise false.
|
||||||
@ -138,7 +139,7 @@ ssl_client_serial(PG_FUNCTION_ARGS)
|
|||||||
* Returns Datum, which can be directly returned from a C language SQL
|
* Returns Datum, which can be directly returned from a C language SQL
|
||||||
* function.
|
* function.
|
||||||
*/
|
*/
|
||||||
Datum
|
static Datum
|
||||||
ASN1_STRING_to_text(ASN1_STRING *str)
|
ASN1_STRING_to_text(ASN1_STRING *str)
|
||||||
{
|
{
|
||||||
BIO *membuf;
|
BIO *membuf;
|
||||||
@ -182,7 +183,7 @@ ASN1_STRING_to_text(ASN1_STRING *str)
|
|||||||
* Returns result of ASN1_STRING_to_text applied to appropriate
|
* Returns result of ASN1_STRING_to_text applied to appropriate
|
||||||
* part of name
|
* part of name
|
||||||
*/
|
*/
|
||||||
Datum
|
static Datum
|
||||||
X509_NAME_field_to_text(X509_NAME *name, text *fieldName)
|
X509_NAME_field_to_text(X509_NAME *name, text *fieldName)
|
||||||
{
|
{
|
||||||
char *string_fieldname;
|
char *string_fieldname;
|
||||||
@ -287,7 +288,7 @@ ssl_issuer_field(PG_FUNCTION_ARGS)
|
|||||||
* Returns: text datum which contains string representation of
|
* Returns: text datum which contains string representation of
|
||||||
* X509_NAME
|
* X509_NAME
|
||||||
*/
|
*/
|
||||||
Datum
|
static Datum
|
||||||
X509_NAME_to_text(X509_NAME *name)
|
X509_NAME_to_text(X509_NAME *name)
|
||||||
{
|
{
|
||||||
BIO *membuf = BIO_new(BIO_s_mem());
|
BIO *membuf = BIO_new(BIO_s_mem());
|
||||||
|
Reference in New Issue
Block a user