Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitbdd6e9b

Browse files
committed
Make SSL tests more robust
Someone running these test could have key or certificate files intheir ~/.postgresql/, which would interfere with the tests. The wayto override that is to specify sslcert=invalid and/orsslrootcert=invalid if no actual certificate is used for a particulartest. Document that and fix up one test that had a risk of failing inthese circumstances.Discussion:https://www.postgresql.org/message-id/flat/398754d8-6bb5-c5cf-e7b8-22e5f0983caf@2ndquadrant.com/
1 parent9745b52 commitbdd6e9b

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

‎src/test/ssl/ServerSetup.pm

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,16 @@
1414
# The server is configured to only accept connections from localhost. If you
1515
# want to run the client from another host, you'll have to configure that
1616
# manually.
17+
#
18+
# Note: Someone running these test could have key or certificate files
19+
# in their ~/.postgresql/, which would interfere with the tests. The
20+
# way to override that is to specify sslcert=invalid and/or
21+
# sslrootcert=invalid if no actual certificate is used for a
22+
# particular test. libpq will ignore specifications that name
23+
# nonexisting files. (sslkey and sslcrl do not need to specified
24+
# explicitly because an invalid sslcert or sslrootcert, respectively,
25+
# causes those to be ignored.)
26+
1727
packageServerSetup;
1828

1929
use strict;

‎src/test/ssl/t/002_scram.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
switch_server_cert($node,'server-cn-only');
4040
$ENV{PGPASSWORD} ="pass";
4141
$common_connstr =
42-
"user=ssltestuser dbname=trustdb sslmode=require hostaddr=$SERVERHOSTADDR";
42+
"user=ssltestuser dbname=trustdb sslmode=requiresslcert=invalid sslrootcert=invalidhostaddr=$SERVERHOSTADDR";
4343

4444
# Default settings
4545
test_connect_ok($common_connstr,'',

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp