]> git.ipfire.org Git - thirdparty/qemu.git/commit
crypto: reduce duplication in handling TLS priority strings
authorDaniel P. Berrangé <berrange@redhat.com>
Wed, 29 Oct 2025 10:06:12 +0000 (10:06 +0000)
committerDaniel P. Berrangé <berrange@redhat.com>
Mon, 3 Nov 2025 10:45:55 +0000 (10:45 +0000)
commite82fccb4a37d84d75ebdbd78d15578a2321870d2
tree59e737b4c5e4eacf47a6518050fa6a624d442056
parentfb8a0b0bfc816fd26ba62d7cae22db890fdb5203
crypto: reduce duplication in handling TLS priority strings

The logic for setting the TLS priority string on a session object has a
significant amount of logic duplication across the different credential
types. By recording the extra priority string suffix against the
credential class, we can introduce a common method for building the
priority string. The TLS session can now set the priority string without
caring about the credential type.

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/tlssession.c
include/crypto/tlscreds.h