Skip to content

Commit aa58f5c

Browse files
committed
Fix pg_hba_file_rules for authentication method cert
For authentication method cert, clientcert=verify-full is implied. But the pg_hba_file_rules entry would incorrectly show clientcert=verify-ca. Per bug #17354 Reported-By: Feike Steenbergen Reviewed-By: Jonathan Katz Backpatch-through: 12
1 parent 64b2c65 commit aa58f5c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/backend/libpq/hba.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1632,7 +1632,11 @@ parse_hba_line(TokenizedLine *tok_line, int elevel)
16321632
*/
16331633
if (parsedline->auth_method == uaCert)
16341634
{
1635-
parsedline->clientcert = clientCertCA;
1635+
/*
1636+
* For auth method cert, client certificate validation is mandatory, and it implies
1637+
* the level of verify-full.
1638+
*/
1639+
parsedline->clientcert = clientCertFull;
16361640
}
16371641

16381642
return parsedline;

0 commit comments

Comments
 (0)