@@ -73,7 +73,7 @@ sub test_connect_fails
7373
7474# ### Part 0. Set up the server.
7575
76- diag " setting up data directory... " ;
76+ note " setting up data directory" ;
7777my $node = get_new_node(' master' );
7878$node -> init;
7979
@@ -91,36 +91,36 @@ sub test_connect_fails
9191# ## on sslmode and whether the server's certificate looks correct. No
9292# ## client certificate is used in these tests.
9393
94- diag " running client tests... " ;
94+ note " running client tests" ;
9595
9696$common_connstr =
9797" user=ssltestuser dbname=trustdb sslcert=invalid hostaddr=$SERVERHOSTADDR host=common-name.pg-ssltest.test" ;
9898
9999# The server should not accept non-SSL connections
100- diag " test that the server doesn't accept non-SSL connections" ;
100+ note " test that the server doesn't accept non-SSL connections" ;
101101test_connect_fails(" sslmode=disable" );
102102
103103# Try without a root cert. In sslmode=require, this should work. In verify-ca
104104# or verify-full mode it should fail
105- diag " connect without server root cert" ;
105+ note " connect without server root cert" ;
106106test_connect_ok(" sslrootcert=invalid sslmode=require" );
107107test_connect_fails(" sslrootcert=invalid sslmode=verify-ca" );
108108test_connect_fails(" sslrootcert=invalid sslmode=verify-full" );
109109
110110# Try with wrong root cert, should fail. (we're using the client CA as the
111111# root, but the server's key is signed by the server CA)
112- diag " connect without wrong server root cert" ;
112+ note " connect without wrong server root cert" ;
113113test_connect_fails(" sslrootcert=ssl/client_ca.crt sslmode=require" );
114114test_connect_fails(" sslrootcert=ssl/client_ca.crt sslmode=verify-ca" );
115115test_connect_fails(" sslrootcert=ssl/client_ca.crt sslmode=verify-full" );
116116
117117# Try with just the server CA's cert. This fails because the root file
118118# must contain the whole chain up to the root CA.
119- diag " connect with server CA cert, without root CA" ;
119+ note " connect with server CA cert, without root CA" ;
120120test_connect_fails(" sslrootcert=ssl/server_ca.crt sslmode=verify-ca" );
121121
122122# And finally, with the correct root cert.
123- diag " connect with correct server CA cert file" ;
123+ note " connect with correct server CA cert file" ;
124124test_connect_ok(" sslrootcert=ssl/root+server_ca.crt sslmode=require" );
125125test_connect_ok(" sslrootcert=ssl/root+server_ca.crt sslmode=verify-ca" );
126126test_connect_ok(" sslrootcert=ssl/root+server_ca.crt sslmode=verify-full" );
@@ -130,7 +130,7 @@ sub test_connect_fails
130130test_connect_ok(" sslrootcert=ssl/both-cas-1.crt sslmode=verify-ca" );
131131test_connect_ok(" sslrootcert=ssl/both-cas-2.crt sslmode=verify-ca" );
132132
133- diag " testing sslcrl option with a non-revoked cert" ;
133+ note " testing sslcrl option with a non-revoked cert" ;
134134
135135# Invalid CRL filename is the same as no CRL, succeeds
136136test_connect_ok(
@@ -147,7 +147,7 @@ sub test_connect_fails
147147
148148# Check that connecting with verify-full fails, when the hostname doesn't
149149# match the hostname in the server's certificate.
150- diag " test mismatch between hostname and server certificate" ;
150+ note " test mismatch between hostname and server certificate" ;
151151$common_connstr =
152152" user=ssltestuser dbname=trustdb sslcert=invalid sslrootcert=ssl/root+server_ca.crt hostaddr=$SERVERHOSTADDR sslmode=verify-full" ;
153153
@@ -158,7 +158,7 @@ sub test_connect_fails
158158# Test Subject Alternative Names.
159159switch_server_cert($node , ' server-multiple-alt-names' );
160160
161- diag " test hostname matching with X509 Subject Alternative Names" ;
161+ note " test hostname matching with X.509 Subject Alternative Names" ;
162162$common_connstr =
163163" user=ssltestuser dbname=trustdb sslcert=invalid sslrootcert=ssl/root+server_ca.crt hostaddr=$SERVERHOSTADDR sslmode=verify-full" ;
164164
@@ -173,7 +173,7 @@ sub test_connect_fails
173173# slightly different error message, that's all)
174174switch_server_cert($node , ' server-single-alt-name' );
175175
176- diag " test hostname matching with a single X509 Subject Alternative Name" ;
176+ note " test hostname matching with a single X.509 Subject Alternative Name" ;
177177$common_connstr =
178178" user=ssltestuser dbname=trustdb sslcert=invalid sslrootcert=ssl/root+server_ca.crt hostaddr=$SERVERHOSTADDR sslmode=verify-full" ;
179179
@@ -186,7 +186,7 @@ sub test_connect_fails
186186# should be ignored when the certificate has both.
187187switch_server_cert($node , ' server-cn-and-alt-names' );
188188
189- diag " test certificate with both a CN and SANs" ;
189+ note " test certificate with both a CN and SANs" ;
190190$common_connstr =
191191" user=ssltestuser dbname=trustdb sslcert=invalid sslrootcert=ssl/root+server_ca.crt hostaddr=$SERVERHOSTADDR sslmode=verify-full" ;
192192
@@ -204,7 +204,7 @@ sub test_connect_fails
204204test_connect_fails(" sslmode=verify-full host=common-name.pg-ssltest.test" );
205205
206206# Test that the CRL works
207- diag " Testing client-side CRL" ;
207+ note " testing client-side CRL" ;
208208switch_server_cert($node , ' server-revoked' );
209209
210210$common_connstr =
@@ -220,7 +220,7 @@ sub test_connect_fails
220220# ##
221221# ## Test certificate authorization.
222222
223- diag " Testing certificate authorization... " ;
223+ note " testing certificate authorization" ;
224224$common_connstr =
225225" sslrootcert=ssl/root+server_ca.crt sslmode=require dbname=certdb hostaddr=$SERVERHOSTADDR " ;
226226
0 commit comments