|
11 | 11 | # This is the hostname used to connect to the server.
|
12 | 12 | my $SERVERHOSTADDR = '127.0.0.1';
|
13 | 13 |
|
| 14 | +# Determine whether build supports tls-server-end-point. |
| 15 | +my $supports_tls_server_end_point = |
| 16 | + check_pg_config("#define HAVE_X509_GET_SIGNATURE_NID 1"); |
| 17 | + |
14 | 18 | # Allocation of base connection string shared among multiple tests.
|
15 | 19 | my $common_connstr;
|
16 | 20 |
|
|
44 | 48 | "SCRAM authentication with tls-unique as channel binding");
|
45 | 49 | test_connect_ok($common_connstr,
|
46 | 50 | "scram_channel_binding=''",
|
47 |
| - "SCRAM authentication without channel binding"); |
48 |
| -test_connect_ok($common_connstr, |
49 |
| - "scram_channel_binding=tls-server-end-point", |
50 |
| - "SCRAM authentication with tls-server-end-point as channel binding"); |
| 51 | + "SCRAM authentication without channel binding"); |
| 52 | +if ($supports_tls_server_end_point) |
| 53 | +{ |
| 54 | + test_connect_ok($common_connstr, |
| 55 | + "scram_channel_binding=tls-server-end-point", |
| 56 | + "SCRAM authentication with tls-server-end-point as channel binding"); |
| 57 | +} |
| 58 | +else |
| 59 | +{ |
| 60 | + test_connect_fails($common_connstr, |
| 61 | + "scram_channel_binding=tls-server-end-point", |
| 62 | + "SCRAM authentication with tls-server-end-point as channel binding"); |
| 63 | +} |
51 | 64 | test_connect_fails($common_connstr,
|
52 | 65 | "scram_channel_binding=not-exists",
|
53 | 66 | "SCRAM authentication with invalid channel binding");
|
0 commit comments