]> git.ipfire.org Git - thirdparty/qemu.git/commit
crypto: move check for TLS creds 'dir' property
authorDaniel P. Berrangé <berrange@redhat.com>
Thu, 16 Oct 2025 18:00:29 +0000 (19:00 +0100)
committerDaniel P. Berrangé <berrange@redhat.com>
Mon, 3 Nov 2025 10:45:55 +0000 (10:45 +0000)
commit9d3343b00bee063f3cc7f5bee35c953fd4e7b6ee
tree71a1a5c404b738bb2177f43ddb0e33b128a9f384
parent9fe991d0a490e18c64b02540b141ad8c3e2a477e
crypto: move check for TLS creds 'dir' property

The check for the 'dir' property is being repeated for every
credential file to be loaded, but this results in incorrect
logic for optional credentials. The 'dir' property is mandatory
for PSK and x509 creds, even if some individual files are
optional. Address this by separating the check for the 'dir'
property.

Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
crypto/tlscreds.c
crypto/tlscredsanon.c
crypto/tlscredspsk.c
crypto/tlscredsx509.c