[openssl/openssl] 0e3872: x509_print_ex:Use correct constant for nmflag comp...

Damian Hobson-Garcia noreply at github.com
Thu Oct 26 14:51:16 UTC 2023


  Branch: refs/heads/openssl-3.1
  Home:   https://github.com/openssl/openssl
  Commit: 0e3872ac7ecfcbec5c37277fb000544ca6c0579a
      https://github.com/openssl/openssl/commit/0e3872ac7ecfcbec5c37277fb000544ca6c0579a
  Author: Damian Hobson-Garcia <dhobsong at igel.co.jp>
  Date:   2023-10-26 (Thu, 26 Oct 2023)

  Changed paths:
    M crypto/x509/t_req.c
    M crypto/x509/t_x509.c

  Log Message:
  -----------
  x509_print_ex:Use correct constant for nmflag comparison

The X509_FLAG_COMPAT constant is defined as a value of the
X509_print_ex() cflags argument, and so it should not be used
to compare against values for use with X509_NAME_print flags.
Use XN_FLAG_COMPAT, which has the same value, instead.

Reviewed-by: Tomas Mraz <tomas at openssl.org>
Reviewed-by: Todd Short <todd.short at me.com>
(Merged from https://github.com/openssl/openssl/pull/19963)

(cherry picked from commit da2dd3b51ddd69aae0fd840c0d23afa954c24ded)


  Commit: b01e6bcdc2e91941ac9d809a0d5e1b519a79ebcf
      https://github.com/openssl/openssl/commit/b01e6bcdc2e91941ac9d809a0d5e1b519a79ebcf
  Author: Damian Hobson-Garcia <dhobsong at igel.co.jp>
  Date:   2023-10-26 (Thu, 26 Oct 2023)

  Changed paths:
    M crypto/x509/t_req.c

  Log Message:
  -----------
  Fix X509_REQ_print_ex bug

Similar to the bug fixed in 02db7354fe7 (Fix bug in X509_print_ex).
The error return value from X509_NAME_print_ex() is different
depending on whether the flags are XN_FLAG_COMPAT or not.
Apply a similar fix to what was done for X509_print_ex here as well.

Reviewed-by: Tomas Mraz <tomas at openssl.org>
Reviewed-by: Todd Short <todd.short at me.com>
(Merged from https://github.com/openssl/openssl/pull/19963)

(cherry picked from commit 2b5e028a2f70de216458a5140bcf4ec3d9236eeb)


  Commit: 436c75b74917b907c9f704caa6e021c3bfb33341
      https://github.com/openssl/openssl/commit/436c75b74917b907c9f704caa6e021c3bfb33341
  Author: Damian Hobson-Garcia <dhobsong at igel.co.jp>
  Date:   2023-10-26 (Thu, 26 Oct 2023)

  Changed paths:
    M crypto/x509/t_req.c
    M crypto/x509/t_x509.c

  Log Message:
  -----------
  x509_print_ex: Remove unused setting when XN_FLAG_COMPAT is set

Calling X509_NAME_print_ex with XN_FLAG_COMPAT falls back to calling
X509_NAME_print().  The obase parameter to X509_NAME_print() is not
used, so setting it to a different value has no effect.

Reviewed-by: Tomas Mraz <tomas at openssl.org>
Reviewed-by: Todd Short <todd.short at me.com>
(Merged from https://github.com/openssl/openssl/pull/19963)

(cherry picked from commit 2126ca3dba3907f49b232442c06db1cae8bee0c3)


Compare: https://github.com/openssl/openssl/compare/f82407a4218e...436c75b74917


More information about the openssl-commits mailing list