mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
tests/qemu-iotests: validate NBD TLS with hostname mismatch
This validates that connections to an NBD server where the certificate hostname does not match will fail. It further validates that using the new 'tls-hostname' override option can solve the failure. Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20220304193610.3293146-11-berrange@redhat.com> Signed-off-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
parent
ebc0141ba7
commit
3da93d4bc6
3 changed files with 38 additions and 3 deletions
|
@ -118,12 +118,13 @@ tls_x509_create_server()
|
|||
caname=$1
|
||||
name=$2
|
||||
|
||||
# We don't include 'localhost' in the cert, as
|
||||
# we want to keep it unlisted to let tests
|
||||
# validate hostname override
|
||||
mkdir -p "${tls_dir}/$name"
|
||||
cat > "${tls_dir}/cert.info" <<EOF
|
||||
organization = Cthulhu Dark Lord Enterprises $name
|
||||
cn = localhost
|
||||
dns_name = localhost
|
||||
dns_name = localhost.localdomain
|
||||
cn = iotests.qemu.org
|
||||
ip_address = 127.0.0.1
|
||||
ip_address = ::1
|
||||
tls_www_server
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue