Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit af9e3d6

Browse filesBrowse files
committed
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
1 parent e617012 commit af9e3d6
Copy full SHA for af9e3d6

File tree

Expand file treeCollapse file tree

1 file changed

+9
-8
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+9
-8
lines changed

‎contrib/sslinfo/sslinfo.c

Copy file name to clipboardExpand all lines: contrib/sslinfo/sslinfo.c
+9-8Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,10 @@ Datum ssl_client_dn_field(PG_FUNCTION_ARGS);
3131
Datum ssl_issuer_field(PG_FUNCTION_ARGS);
3232
Datum ssl_client_dn(PG_FUNCTION_ARGS);
3333
Datum ssl_issuer_dn(PG_FUNCTION_ARGS);
34-
Datum X509_NAME_field_to_text(X509_NAME *name, text *fieldName);
35-
Datum X509_NAME_to_text(X509_NAME *name);
36-
Datum ASN1_STRING_to_text(ASN1_STRING *str);
34+
35+
static Datum X509_NAME_field_to_text(X509_NAME *name, text *fieldName);
36+
static Datum X509_NAME_to_text(X509_NAME *name);
37+
static Datum ASN1_STRING_to_text(ASN1_STRING *str);
3738

3839

3940
/*
@@ -51,7 +52,7 @@ ssl_is_used(PG_FUNCTION_ARGS)
5152

5253

5354
/*
54-
* Returns SSL cipher currently in use.
55+
* Returns SSL version currently in use.
5556
*/
5657
PG_FUNCTION_INFO_V1(ssl_version);
5758
Datum
@@ -77,7 +78,7 @@ ssl_cipher(PG_FUNCTION_ARGS)
7778

7879

7980
/*
80-
* Indicates whether current client have provided a certificate
81+
* Indicates whether current client provided a certificate
8182
*
8283
* Function has no arguments. Returns bool. True if current session
8384
* is SSL session and client certificate is verified, otherwise false.
@@ -138,7 +139,7 @@ ssl_client_serial(PG_FUNCTION_ARGS)
138139
* Returns Datum, which can be directly returned from a C language SQL
139140
* function.
140141
*/
141-
Datum
142+
static Datum
142143
ASN1_STRING_to_text(ASN1_STRING *str)
143144
{
144145
BIO *membuf;
@@ -182,7 +183,7 @@ ASN1_STRING_to_text(ASN1_STRING *str)
182183
* Returns result of ASN1_STRING_to_text applied to appropriate
183184
* part of name
184185
*/
185-
Datum
186+
static Datum
186187
X509_NAME_field_to_text(X509_NAME *name, text *fieldName)
187188
{
188189
char *string_fieldname;
@@ -287,7 +288,7 @@ ssl_issuer_field(PG_FUNCTION_ARGS)
287288
* Returns: text datum which contains string representation of
288289
* X509_NAME
289290
*/
290-
Datum
291+
static Datum
291292
X509_NAME_to_text(X509_NAME *name)
292293
{
293294
BIO *membuf = BIO_new(BIO_s_mem());

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.