summaryrefslogtreecommitdiff
path: root/src/interfaces/libpq/fe-connect.c
diff options
context:
space:
mode:
authorAlvaro Herrera <alvherre@alvh.no-ip.org>2024-08-14 14:53:55 -0400
committerAlvaro Herrera <alvherre@alvh.no-ip.org>2024-08-14 14:53:55 -0400
commita5c6b8f22c206aaa22fc9a826f858a262a023cd5 (patch)
tree44e0aa32f274b2cbcc53a7655746a148d9a6098b /src/interfaces/libpq/fe-connect.c
parent5304fec4d8a141abe6f8f6f2a6862822ec1f3598 (diff)
libpq: Trace responses to SSLRequest and GSSENCRequest
Since these are single bytes instead of v2 or v3 messages they need custom tracing logic. These "messages" don't even have official names in the protocol specification, so I (Jelte) called them SSLResponse and GSSENCResponse here. Author: Jelte Fennema-Nio <postgres@jeltef.nl> Discussion: https://postgr.es/m/CAGECzQSoPHtZ4xe0raJ6FYSEiPPS+YWXBhOGo+Y1YecLgknF3g@mail.gmail.com
Diffstat (limited to 'src/interfaces/libpq/fe-connect.c')
-rw-r--r--src/interfaces/libpq/fe-connect.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/interfaces/libpq/fe-connect.c b/src/interfaces/libpq/fe-connect.c
index 360d9a45476..a5055271ae3 100644
--- a/src/interfaces/libpq/fe-connect.c
+++ b/src/interfaces/libpq/fe-connect.c
@@ -3493,11 +3493,17 @@ keep_going: /* We will come back to here until there is
}
if (SSLok == 'S')
{
+ if (conn->Pfdebug)
+ pqTraceOutputCharResponse(conn, "SSLResponse",
+ SSLok);
/* mark byte consumed */
conn->inStart = conn->inCursor;
}
else if (SSLok == 'N')
{
+ if (conn->Pfdebug)
+ pqTraceOutputCharResponse(conn, "SSLResponse",
+ SSLok);
/* mark byte consumed */
conn->inStart = conn->inCursor;
@@ -3635,6 +3641,10 @@ keep_going: /* We will come back to here until there is
if (gss_ok == 'N')
{
+ if (conn->Pfdebug)
+ pqTraceOutputCharResponse(conn, "GSSENCResponse",
+ gss_ok);
+
/*
* The connection is still valid, so if it's OK to
* continue without GSS, we can proceed using this
@@ -3648,6 +3658,10 @@ keep_going: /* We will come back to here until there is
gss_ok);
goto error_return;
}
+
+ if (conn->Pfdebug)
+ pqTraceOutputCharResponse(conn, "GSSENCResponse",
+ gss_ok);
}
/* Begin or continue GSSAPI negotiation */