From 2a9b65456e732ffa691bfe9a7320ffc42d3d2c6a Mon Sep 17 00:00:00 2001 From: moonsn Date: Wed, 1 Nov 2023 10:42:31 +0800 Subject: [PATCH] support gss environments When Kerberos authentication is supported, we should enable those gss environments. --- conn.go | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/conn.go b/conn.go index bc098360..32fd535c 100644 --- a/conn.go +++ b/conn.go @@ -2061,8 +2061,18 @@ func parseEnviron(env []string) (out map[string]string) { unsupported() case "PGREQUIREPEER": unsupported() - case "PGKRBSRVNAME", "PGGSSLIB": - unsupported() + case "PGGSSLIB": + if newGss != nil { + accrue("gsslib") + } else { + unsupported() + } + case "PGKRBSRVNAME": + if newGss != nil { + accrue("krbsrvname") + } else { + unsupported() + } case "PGCONNECT_TIMEOUT": accrue("connect_timeout") case "PGCLIENTENCODING":