mirror of
https://github.com/postgres/postgres.git
synced 2025-09-02 04:21:28 +03:00
Add libpq parameter 'channel_binding'.
Allow clients to require channel binding to enhance security against untrusted servers. Author: Jeff Davis Reviewed-by: Michael Paquier Discussion: https://postgr.es/m/227015d8417f2b4fef03f8966dbfa5cbcc4f44da.camel%40j-davis.com
This commit is contained in:
@@ -17,7 +17,7 @@ if ($windows_os)
|
||||
}
|
||||
else
|
||||
{
|
||||
plan tests => 8;
|
||||
plan tests => 10;
|
||||
}
|
||||
|
||||
|
||||
@@ -86,3 +86,13 @@ test_role($node, 'md5_role', 'scram-sha-256', 2);
|
||||
reset_pg_hba($node, 'md5');
|
||||
test_role($node, 'scram_role', 'md5', 0);
|
||||
test_role($node, 'md5_role', 'md5', 0);
|
||||
|
||||
# Tests for channel binding without SSL.
|
||||
# Using the password authentication method; channel binding can't work
|
||||
reset_pg_hba($node, 'password');
|
||||
$ENV{"PGCHANNELBINDING"} = 'require';
|
||||
test_role($node, 'scram_role', 'scram-sha-256', 2);
|
||||
# SSL not in use; channel binding still can't work
|
||||
reset_pg_hba($node, 'scram-sha-256');
|
||||
$ENV{"PGCHANNELBINDING"} = 'require';
|
||||
test_role($node, 'scram_role', 'scram-sha-256', 2);
|
||||
|
Reference in New Issue
Block a user