summaryrefslogtreecommitdiff
path: root/src/test/ssl/ServerSetup.pm
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ssl/ServerSetup.pm')
-rw-r--r--src/test/ssl/ServerSetup.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/test/ssl/ServerSetup.pm b/src/test/ssl/ServerSetup.pm
index 65575e24f14..cbdb44e67a6 100644
--- a/src/test/ssl/ServerSetup.pm
+++ b/src/test/ssl/ServerSetup.pm
@@ -72,6 +72,7 @@ sub configure_test_server_for_ssl
copy_files("ssl/server-*.key", "$tempdir/pgdata");
chmod(0600, glob "$tempdir/pgdata/server-*.key") or die $!;
copy_files("ssl/root+client_ca.crt", "$tempdir/pgdata");
+ copy_files("ssl/root_ca.crt", "$tempdir/pgdata");
copy_files("ssl/root+client.crl", "$tempdir/pgdata");
# Only accept SSL connections from localhost. Our tests don't depend on this
@@ -98,12 +99,13 @@ sub switch_server_cert
{
my $tempdir = $_[0];
my $certfile = $_[1];
+ my $cafile = $_[2] || "root+client_ca";
- diag "Restarting server with certfile \"$certfile\"...";
+ diag "Restarting server with certfile \"$certfile\" and cafile \"$cafile\"...";
open SSLCONF, ">$tempdir/pgdata/sslconfig.conf";
print SSLCONF "ssl=on\n";
- print SSLCONF "ssl_ca_file='root+client_ca.crt'\n";
+ print SSLCONF "ssl_ca_file='$cafile.crt'\n";
print SSLCONF "ssl_cert_file='$certfile.crt'\n";
print SSLCONF "ssl_key_file='$certfile.key'\n";
print SSLCONF "ssl_crl_file='root+client.crl'\n";