Add missing 'cert' authentication method, and allow an option to be set for any hosts...
authordpage <dpage@a7884b65-44f6-0310-8a51-81a127f17b15>
Wed, 1 Apr 2009 11:55:01 +0000 (11:55 +0000)
committerdpage <dpage@a7884b65-44f6-0310-8a51-81a127f17b15>
Wed, 1 Apr 2009 11:55:01 +0000 (11:55 +0000)
git-svn-id: svn://svn.pgadmin.org/trunk/pgadmin3@7786 a7884b65-44f6-0310-8a51-81a127f17b15

CHANGELOG
pgadmin/dlg/dlgHbaConfig.cpp
pgadmin/include/utils/pgconfig.h

index 8be6cd989a779cbce153c49a73a61d5ed05706d2..df5c74f251fddd8c131692139c88dc064df0da2c 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -36,8 +36,8 @@ Changes
 \r
 Date       Dev Ver     Change details\r
 ---------- --- ------  --------------\r
-2009-03-31 DP  1.10.0  Support ldap, gss and sspi authentication methods in the\r
-                       pg_hba.conf editor.\r
+2009-03-31 DP  1.10.0  Support ldap, gss, sspi & cert authentication methods in\r
+                       the pg_hba.conf editor.\r
 2009-03-27 DP  1.10.0  Remove the 'use tab key for autocomplete' option as it\r
                        breaks other editor features for little gain.\r
 2009-03-19 DP  1.10.0  Ensure that dependencies between tables and sequences\r
index 6b889fb85fa09b28c8f6835e05fbb921457f3919..09c4b7c2ac91bf6502ae46c26da24615892ed5b5 100644 (file)
@@ -102,6 +102,12 @@ DialogWithHelp((frmMain*)parent)
             cbMethod->Append(wxT("gss"));
             cbMethod->Append(wxT("sspi"));
         }
+
+        // CERT is supported from 8.4
+        if (conn->BackendMinimumVersion(8, 4))
+        {
+            cbMethod->Append(wxT("cert"));
+        }
     }
     else
     {
@@ -109,6 +115,7 @@ DialogWithHelp((frmMain*)parent)
         cbMethod->Append(wxT("ldap"));
         cbMethod->Append(wxT("gss"));
         cbMethod->Append(wxT("sspi"));
+        cbMethod->Append(wxT("cert"));
     }
 
     if (conn)
@@ -315,9 +322,12 @@ void dlgHbaConfig::OnChange(wxCommandEvent& ev)
         needOption = true;
     }
     else if (cbMethod->GetCurrentSelection() == pgHbaConfigLine::PGC_GSS ||
-             cbMethod->GetCurrentSelection() == pgHbaConfigLine::PGC_SSPI)
+             cbMethod->GetCurrentSelection() == pgHbaConfigLine::PGC_SSPI ||
+             cbMethod->GetCurrentSelection() == pgHbaConfigLine::PGC_KRB5 ||
+             cbMethod->GetCurrentSelection() == pgHbaConfigLine::PGC_PAM ||
+             cbMethod->GetCurrentSelection() == pgHbaConfigLine::PGC_CERT)
     {
-        // GSS/SSPI take options from 8.4 onwards. If we don't know the version
+        // GSS/SSPI/KRB5/PAM/CERT take options from 8.4 onwards. If we don't know the version
         // then allow the option to be specified.
         if (conn)
         {
@@ -328,6 +338,18 @@ void dlgHbaConfig::OnChange(wxCommandEvent& ev)
             needOption = true;
     }
 
+    // On 8.4 and above, any hostssl lines can take an option
+    if (cbType->GetCurrentSelection() == pgHbaConfigLine::PGC_HOSTSSL)
+    {
+        if (conn)
+        {
+            if (conn->BackendMinimumVersion(8, 4))
+                needOption = true;
+        }
+        else
+            needOption = true;
+    }
+
     stOption->Enable(needOption);
     txtOption->Enable(needOption);
 
index 9b075632bb21e55af632c41cba2c9d69a9f67314..a41445c37bde418340b7405bc1184f5605134671 100644 (file)
@@ -79,6 +79,7 @@ public:
         PGC_LDAP,
         PGC_GSS,
         PGC_SSPI,
+        PGC_CERT,
         PGC_INVALIDMETHOD
     };