Re: [RESEND PATCH v2] sign-file: Fix incorrect return values check

From: Jarkko Sakkinen
Date: Mon Nov 20 2023 - 18:44:13 EST


On Mon Nov 20, 2023 at 3:33 AM EET, Yusong Gao wrote:
> There are some wrong return values check in sign-file when call OpenSSL
> API. For example the CMS_final() return 1 for success or 0 for failure.

Why not make it a closed sentence and list the functions that need to be
changed?

> The ERR() check cond is wrong because of the program only check the
> return value is < 0 instead of <= 0.
>

Lacking Fixes tag(s). See: ttps://www.kernel.org/doc/html/latest/process/submitting-patches.html

> Link:
> https://www.openssl.org/docs/manmaster/man3/CMS_final.html
> https://www.openssl.org/docs/manmaster/man3/i2d_CMS_bio_stream.html
> https://www.openssl.org/docs/manmaster/man3/i2d_PKCS7_bio.html
> https://www.openssl.org/docs/manmaster/man3/BIO_free.html

Replace with

Link: https://www.openssl.org/docs/manmaster/man3/

BR, Jarkko