mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
genprotimg: add missing return
This should be no problem (if OpenSSL works correctly), because
`crls_download_cb` is only called out of the verification context of
OpenSSL. It's used to look up a CRL and therefore
X509_STORE_CTX_get_current_cert should always return a certificate
since X509_STORE_CTX_get_current_cert returns NULL only if an error
has occurred during the verification (see
https://www.openssl.org/docs/man1.1.0/man3/X509_STORE_CTX_get_current_cert.html).
Fixes: 074de1e14e ("genprotimg: add host-key document verification support")
Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
committed by
Jan Höppner
parent
074de1e14e
commit
7827a791c9
@@ -1475,7 +1475,7 @@ static STACK_OF_X509_CRL *crls_download_cb(X509_STORE_CTX *ctx, X509_NAME *nm)
|
||||
g_abort();
|
||||
cert = X509_STORE_CTX_get_current_cert(ctx);
|
||||
if (!cert)
|
||||
g_steal_pointer(&crls);
|
||||
return g_steal_pointer(&crls);
|
||||
g_assert(X509_NAME_cmp(X509_get_issuer_name(cert), nm) == 0);
|
||||
crl = lookup_crl(nm);
|
||||
if (!crl) {
|
||||
|
||||
Reference in New Issue
Block a user