Skip to content

Commit a6d2bb2

Browse files
berrangeXanClic
authored andcommitted
tests: filter out TLS distinguished name in certificate checks
The version of GNUTLS in Fedora 34 has changed the order in which encodes fields when generating new TLS certificates. This in turn changes the order seen when querying the distinguished name. This ultimately breaks the expected output in the NBD TLS iotests. We don't need to be comparing the exact distinguished name text for the purpose of the test though, so it is fine to filter it out. Reported-by: Eric Blake <[email protected]> Signed-off-by: Daniel P. Berrangé <[email protected]> Message-Id: <[email protected]> Reviewed-by: Eric Blake <[email protected]> Tested-by: Eric Blake <[email protected]> Signed-off-by: Hanna Reitz <[email protected]>
1 parent 50482fd commit a6d2bb2

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

tests/qemu-iotests/233

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ $QEMU_IMG info --image-opts \
148148

149149
echo
150150
echo "== final server log =="
151-
cat "$TEST_DIR/server.log"
151+
cat "$TEST_DIR/server.log" | _filter_authz_check_tls
152152
rm -f "$TEST_DIR/server.log"
153153

154154
# success, all done

tests/qemu-iotests/233.out

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,6 @@ qemu-img: Could not open 'driver=nbd,host=127.0.0.1,port=PORT,tls-creds=tls0': F
6565
== final server log ==
6666
qemu-nbd: option negotiation failed: Verify failed: No certificate was found.
6767
qemu-nbd: option negotiation failed: Verify failed: No certificate was found.
68-
qemu-nbd: option negotiation failed: TLS x509 authz check for CN=localhost,O=Cthulhu Dark Lord Enterprises client1,L=R'lyeh,C=South Pacific is denied
69-
qemu-nbd: option negotiation failed: TLS x509 authz check for CN=localhost,O=Cthulhu Dark Lord Enterprises client3,L=R'lyeh,C=South Pacific is denied
68+
qemu-nbd: option negotiation failed: TLS x509 authz check for DISTINGUISHED-NAME is denied
69+
qemu-nbd: option negotiation failed: TLS x509 authz check for DISTINGUISHED-NAME is denied
7070
*** done

tests/qemu-iotests/common.filter

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,5 +332,10 @@ for fname in fnames:
332332
sys.stdout.write(result)'
333333
}
334334

335+
_filter_authz_check_tls()
336+
{
337+
$SED -e 's/TLS x509 authz check for .* is denied/TLS x509 authz check for DISTINGUISHED-NAME is denied/'
338+
}
339+
335340
# make sure this script returns success
336341
true

0 commit comments

Comments
 (0)