summaryrefslogtreecommitdiff
path: root/src/test/ssl/t/002_scram.pl
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ssl/t/002_scram.pl')
-rw-r--r--src/test/ssl/t/002_scram.pl11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/test/ssl/t/002_scram.pl b/src/test/ssl/t/002_scram.pl
index 4354901f53..588f47a39b 100644
--- a/src/test/ssl/t/002_scram.pl
+++ b/src/test/ssl/t/002_scram.pl
@@ -22,10 +22,12 @@ if ($ENV{with_ssl} ne 'openssl')
}
my $ssl_server = SSL::Server->new();
+
sub sslkey
{
return $ssl_server->sslkey(@_);
}
+
sub switch_server_cert
{
$ssl_server->switch_server_cert(@_);
@@ -57,8 +59,11 @@ $ENV{PGPORT} = $node->port;
$node->start;
# Configure server for SSL connections, with password handling.
-$ssl_server->configure_test_server_for_ssl($node, $SERVERHOSTADDR, $SERVERHOSTCIDR,
- "scram-sha-256", 'password' => "pass", 'password_enc' => "scram-sha-256");
+$ssl_server->configure_test_server_for_ssl(
+ $node, $SERVERHOSTADDR, $SERVERHOSTCIDR,
+ "scram-sha-256",
+ 'password' => "pass",
+ 'password_enc' => "scram-sha-256");
switch_server_cert($node, certfile => 'server-cn-only');
$ENV{PGPASSWORD} = "pass";
$common_connstr =
@@ -104,7 +109,7 @@ $node->connect_fails(
# because channel binding is not performed. Note that ssl/client.key may
# be used in a different test, so the name of this temporary client key
# is chosen here to be unique.
-my $cert_tempdir = PostgreSQL::Test::Utils::tempdir();
+my $cert_tempdir = PostgreSQL::Test::Utils::tempdir();
my $client_tmp_key = "$cert_tempdir/client_scram.key";
copy("ssl/client.key", "$cert_tempdir/client_scram.key")
or die