[openssl/openssl] b03756: REGRESSION: CMS_final: do not ignore CMS_dataFinal...

Hugo Landau noreply at reply.github.openssl.org
Thu Jul 28 09:07:18 UTC 2022


  Branch: refs/heads/master
  Home:   https://github.openssl.org/openssl/openssl
  Commit: b03756130dadb3732b460a6efd930f1b226acdad
      https://github.openssl.org/openssl/openssl/commit/b03756130dadb3732b460a6efd930f1b226acdad
  Author: Alon Bar-Lev <alon.barlev at gmail.com>
  Date:   2022-07-28 (Thu, 28 Jul 2022)

  Changed paths:
    M crypto/cms/cms_smime.c

  Log Message:
  -----------
  REGRESSION: CMS_final: do not ignore CMS_dataFinal result

The CMS_dataFinal result is important as signature may fail, however, it
is ignored while returning success from CMS_final.

The SMIME_crlf_copy result is returned while it is ignored in the rest
of the openssl code.

Prefer the CMS_dataFinal result.

This is regression from openssl-1.

Blame finds c1669f41ei as root cause of regression.

Signed-off-by: Alon Bar-Lev <alon.barlev at gmail.com>

Reviewed-by: Tomas Mraz <tomas at openssl.org>
Reviewed-by: Paul Dale <pauli at openssl.org>
Reviewed-by: Hugo Landau <hlandau at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18876)


  Commit: 67c0460b89cc1b0644a1a59af78284dfd8d720af
      https://github.openssl.org/openssl/openssl/commit/67c0460b89cc1b0644a1a59af78284dfd8d720af
  Author: Alon Bar-Lev <alon.barlev at gmail.com>
  Date:   2022-07-28 (Thu, 28 Jul 2022)

  Changed paths:
    M crypto/asn1/asn_mime.c
    M crypto/cms/cms_smime.c
    M crypto/pkcs7/pk7_smime.c

  Log Message:
  -----------
  Handle SMIME_crlf_copy return code

Currently the SMIME_crlf_copy result is ignored in all usages. It does
return failure when memory allocation fails.

This patch handles the SMIME_crlf_copy return code in all occurrences.

Signed-off-by: Alon Bar-Lev <alon.barlev at gmail.com>

Reviewed-by: Tomas Mraz <tomas at openssl.org>
Reviewed-by: Paul Dale <pauli at openssl.org>
Reviewed-by: Hugo Landau <hlandau at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18876)


Compare: https://github.openssl.org/openssl/openssl/compare/38b051a1fedc...67c0460b89cc


More information about the openssl-commits mailing list