]> git.ipfire.org Git - thirdparty/qemu.git/commit
crypto/x509-utils: Check for error from gnutls_x509_crt_init()
authorPeter Maydell <peter.maydell@linaro.org>
Thu, 10 Jul 2025 14:44:17 +0000 (15:44 +0100)
committerDaniel P. Berrangé <berrange@redhat.com>
Wed, 16 Jul 2025 10:27:30 +0000 (11:27 +0100)
commit2183ab62512c6253293e83cce3970b0b42e65630
treec698894533d23fc6747f4ac3b1dde974e3f8b7c0
parent8fc3d63d685751734fb9c8c0284dc44a36a8e053
crypto/x509-utils: Check for error from gnutls_x509_crt_init()

Coverity notes that in qcrypto_get_x509_cert_fingerprint() we
call gnutls_x509_crt_init() but don't check for an error return.
Add the missing check.

Coverity: CID 1593155
Fixes: 10a1d34fc0d ("crypto: Introduce x509 utils")
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
crypto/x509-utils.c