summaryrefslogtreecommitdiff
path: root/contrib/sslinfo/sslinfo.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2014-01-17 20:58:31 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2014-01-17 20:58:31 -0500
commitaf9e3d652358664f2e749be2398428732121e317 (patch)
tree36a0ccf42a6ec3a18868dd78f0af7e0987f5544d /contrib/sslinfo/sslinfo.c
parente6170126fc201052b0ec5fc92177eb181d602d26 (diff)
downloadpostgresql-af9e3d652358664f2e749be2398428732121e317.tar.gz
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
Diffstat (limited to 'contrib/sslinfo/sslinfo.c')
-rw-r--r--contrib/sslinfo/sslinfo.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/contrib/sslinfo/sslinfo.c b/contrib/sslinfo/sslinfo.c
index 7a5847004b..d724fe91ff 100644
--- a/contrib/sslinfo/sslinfo.c
+++ b/contrib/sslinfo/sslinfo.c
@@ -31,9 +31,10 @@ Datum ssl_client_dn_field(PG_FUNCTION_ARGS);
Datum ssl_issuer_field(PG_FUNCTION_ARGS);
Datum ssl_client_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);
-Datum ASN1_STRING_to_text(ASN1_STRING *str);
+
+static Datum X509_NAME_field_to_text(X509_NAME *name, text *fieldName);
+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);
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
* 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
* function.
*/
-Datum
+static Datum
ASN1_STRING_to_text(ASN1_STRING *str)
{
BIO *membuf;
@@ -182,7 +183,7 @@ ASN1_STRING_to_text(ASN1_STRING *str)
* Returns result of ASN1_STRING_to_text applied to appropriate
* part of name
*/
-Datum
+static Datum
X509_NAME_field_to_text(X509_NAME *name, text *fieldName)
{
char *string_fieldname;
@@ -287,7 +288,7 @@ ssl_issuer_field(PG_FUNCTION_ARGS)
* Returns: text datum which contains string representation of
* X509_NAME
*/
-Datum
+static Datum
X509_NAME_to_text(X509_NAME *name)
{
BIO *membuf = BIO_new(BIO_s_mem());