|
89 | 89 | qr/channel binding required but not supported by server's authentication request/,
|
90 | 90 | "MD5 with SSL and channel_binding=require");
|
91 | 91 |
|
92 |
| -# Now test with auth method 'cert' by connecting to 'certdb'. Should |
93 |
| -# fail, because channel binding is not performed. |
94 |
| -copy("ssl/client.key", "ssl/client_tmp.key"); |
95 |
| -chmod 0600, "ssl/client_tmp.key"; |
| 92 | +# Now test with auth method 'cert' by connecting to 'certdb'. Should fail, |
| 93 | +# because channel binding is not performed. Note that ssl/client.key may |
| 94 | +# be used in a different test, so the name of this temporary client key |
| 95 | +# is chosen here to be unique. |
| 96 | +my $client_tmp_key = "ssl/client_scram_tmp.key"; |
| 97 | +copy("ssl/client.key", $client_tmp_key); |
| 98 | +chmod 0600, $client_tmp_key; |
96 | 99 | test_connect_fails(
|
97 |
| - "sslcert=ssl/client.crt sslkey=ssl/client_tmp.key hostaddr=$SERVERHOSTADDR", |
| 100 | + "sslcert=ssl/client.crt sslkey=$client_tmp_key hostaddr=$SERVERHOSTADDR", |
98 | 101 | "dbname=certdb user=ssltestuser channel_binding=require",
|
99 | 102 | qr/channel binding required, but server authenticated client without channel binding/,
|
100 | 103 | "Cert authentication and channel_binding=require");
|
101 | 104 |
|
| 105 | +# clean up |
| 106 | +unlink($client_tmp_key); |
| 107 | + |
102 | 108 | done_testing($number_of_tests);
|
0 commit comments