1QA output created by 233 2 3== preparing TLS creds == 4Generating a self signed certificate... 5Generating a self signed certificate... 6Generating a signed certificate... 7Generating a signed certificate... 8Generating a signed certificate... 9 10== preparing image == 11Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 12wrote 1048576/1048576 bytes at offset 1048576 131 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 14 15== check TLS client to plain server fails == 16qemu-img: Could not open 'driver=nbd,host=127.0.0.1,port=PORT,tls-creds=tls0': Denied by server for option 5 (starttls) 17server reported: TLS not configured 18qemu-nbd: Denied by server for option 5 (starttls) 19server reported: TLS not configured 20 21== check plain client to TLS server fails == 22qemu-img: Could not open 'nbd://localhost:PORT': TLS negotiation required before option 8 (structured reply) 23server reported: Option 0x8 not permitted before TLS 24qemu-nbd: TLS negotiation required before option 8 (structured reply) 25server reported: Option 0x8 not permitted before TLS 26 27== check TLS works == 28image: nbd://127.0.0.1:PORT 29file format: nbd 30virtual size: 64M (67108864 bytes) 31disk size: unavailable 32exports available: 1 33 export: '' 34 size: 67108864 35 flags: 0x4ed ( flush fua trim zeroes df cache ) 36 min block: 512 37 opt block: 4096 38 max block: 33554432 39 available meta contexts: 1 40 base:allocation 41 42== check TLS with different CA fails == 43qemu-img: Could not open 'driver=nbd,host=127.0.0.1,port=PORT,tls-creds=tls0': The certificate hasn't got a known issuer 44qemu-nbd: The certificate hasn't got a known issuer 45 46== perform I/O over TLS == 47read 1048576/1048576 bytes at offset 1048576 481 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 49wrote 1048576/1048576 bytes at offset 1048576 501 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 51read 1048576/1048576 bytes at offset 1048576 521 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 53 54== final server log == 55qemu-nbd: option negotiation failed: Verify failed: No certificate was found. 56qemu-nbd: option negotiation failed: Verify failed: No certificate was found. 57*** done 58