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

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


  Branch: refs/heads/openssl-3.2
  Home:   https://github.com/openssl/openssl
  Commit: d7f20c79920ba0e74a775bb145bfa9d4a3606492
      https://github.com/openssl/openssl/commit/d7f20c79920ba0e74a775bb145bfa9d4a3606492
  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: e17656948663adb14b9030aeae70171da5588179
      https://github.com/openssl/openssl/commit/e17656948663adb14b9030aeae70171da5588179
  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: 6c6e9d4a18954f9aa4e7e153a4430cc935c18a90
      https://github.com/openssl/openssl/commit/6c6e9d4a18954f9aa4e7e153a4430cc935c18a90
  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/4230172a0556...6c6e9d4a1895


More information about the openssl-commits mailing list