[openssl/openssl] 1ae467: Avoid exporting bogus (empty) data if empty select...

Tomáš Mráz noreply at github.com
Fri Aug 4 14:14:17 UTC 2023


  Branch: refs/heads/master
  Home:   https://github.com/openssl/openssl
  Commit: 1ae4678cebaa13604c0f31bdf2c64cd28bdaf287
      https://github.com/openssl/openssl/commit/1ae4678cebaa13604c0f31bdf2c64cd28bdaf287
  Author: Tomas Mraz <tomas at openssl.org>
  Date:   2023-08-04 (Fri, 04 Aug 2023)

  Changed paths:
    M providers/implementations/keymgmt/dh_kmgmt.c
    M providers/implementations/keymgmt/dsa_kmgmt.c
    M providers/implementations/keymgmt/ecx_kmgmt.c
    M providers/implementations/keymgmt/mac_legacy_kmgmt.c

  Log Message:
  -----------
  Avoid exporting bogus (empty) data if empty selection is used

This is already correct in the rsa_kmgmt.c but other
implementations are wrong.

Reviewed-by: Matt Caswell <matt at openssl.org>
Reviewed-by: Paul Dale <pauli at openssl.org>
Reviewed-by: Todd Short <todd.short at me.com>
(Merged from https://github.com/openssl/openssl/pull/21519)


  Commit: 2acb0d363c0032b5b97c4f6596609f40bd7d842f
      https://github.com/openssl/openssl/commit/2acb0d363c0032b5b97c4f6596609f40bd7d842f
  Author: Tomas Mraz <tomas at openssl.org>
  Date:   2023-08-04 (Fri, 04 Aug 2023)

  Changed paths:
    M crypto/encode_decode/decoder_pkey.c
    M providers/implementations/encode_decode/decode_der2key.c
    M providers/implementations/encode_decode/decode_msblob2key.c
    M providers/implementations/encode_decode/decode_pvk2key.c

  Log Message:
  -----------
  When exporting/importing decoded keys do not use 0 as selection

When decoding 0 as the selection means to decode anything
you get.

However when exporting and then importing the key data 0 as
selection is not meaningful.
So we set it to OSSL_KEYMGMT_SELECT_ALL to make the export/import
function export/import everything that we have decoded.

Fixes #21493

Reviewed-by: Matt Caswell <matt at openssl.org>
Reviewed-by: Paul Dale <pauli at openssl.org>
Reviewed-by: Todd Short <todd.short at me.com>
(Merged from https://github.com/openssl/openssl/pull/21519)


  Commit: 4c50610bdadbcf7aa6bbd968df67b8874234677b
      https://github.com/openssl/openssl/commit/4c50610bdadbcf7aa6bbd968df67b8874234677b
  Author: Tomas Mraz <tomas at openssl.org>
  Date:   2023-08-04 (Fri, 04 Aug 2023)

  Changed paths:
    M test/endecode_test.c

  Log Message:
  -----------
  endecode_test.c: Add tests for decoding with 0 selection

Reviewed-by: Matt Caswell <matt at openssl.org>
Reviewed-by: Paul Dale <pauli at openssl.org>
Reviewed-by: Todd Short <todd.short at me.com>
(Merged from https://github.com/openssl/openssl/pull/21519)


Compare: https://github.com/openssl/openssl/compare/cb8e64131e7c...4c50610bdadb


More information about the openssl-commits mailing list