Branch: refs/heads/master
  Home:   https://github.com/openssl/openssl
  Commit: 98642df4ba886818900ab7e6b23703544e6addd4
      
https://github.com/openssl/openssl/commit/98642df4ba886818900ab7e6b23703544e6addd4
  Author: Simo Sorce <[email protected]>
  Date:   2022-11-15 (Tue, 15 Nov 2022)

  Changed paths:
    M crypto/evp/keymgmt_lib.c
    M crypto/evp/p_lib.c
    M include/crypto/evp.h

  Log Message:
  -----------
  Propagate selection all the way on key export

EVP_PKEY_eq() is used to check, among other things, if a certificate
public key corresponds to a private key. When the private key belongs to
a provider that does not allow to export private keys this currently
fails as the internal functions used to import/export keys ignored the
selection given (which specifies that only the public key needs to be
considered) and instead tries to export everything.

This patch allows to propagate the selection all the way down including
adding it in the cache so that a following operation actually looking
for other selection parameters does not mistakenly pick up an export
containing only partial information.

Signed-off-by: Simo Sorce <[email protected]>

Reviewed-by: Dmitry Belyavskiy <[email protected]>
Reviewed-by: Tomas Mraz <[email protected]>
(Merged from https://github.com/openssl/openssl/pull/19648)


  Commit: 504427eb5f32108dd64ff7858012863fe47b369b
      
https://github.com/openssl/openssl/commit/504427eb5f32108dd64ff7858012863fe47b369b
  Author: Simo Sorce <[email protected]>
  Date:   2022-11-15 (Tue, 15 Nov 2022)

  Changed paths:
    M doc/internal/man3/evp_keymgmt_util_export_to_provider.pod

  Log Message:
  -----------
  Update documentation for keymgmt export utils

Change function prototypes and explain how to use the selection
argument.

Signed-off-by: Simo Sorce <[email protected]>

Reviewed-by: Dmitry Belyavskiy <[email protected]>
Reviewed-by: Tomas Mraz <[email protected]>
(Merged from https://github.com/openssl/openssl/pull/19648)


  Commit: e5202fbd461cb6c067874987998e91c6093e5267
      
https://github.com/openssl/openssl/commit/e5202fbd461cb6c067874987998e91c6093e5267
  Author: Simo Sorce <[email protected]>
  Date:   2022-11-15 (Tue, 15 Nov 2022)

  Changed paths:
    M test/fake_rsaprov.c
    M test/fake_rsaprov.h
    M test/provider_pkey_test.c

  Log Message:
  -----------
  Add test for EVP_PKEY_eq

This tests that the comparison work even if a provider can only return
a public key.

Signed-off-by: Simo Sorce <[email protected]>

Reviewed-by: Dmitry Belyavskiy <[email protected]>
Reviewed-by: Tomas Mraz <[email protected]>
(Merged from https://github.com/openssl/openssl/pull/19648)


Compare: https://github.com/openssl/openssl/compare/93e1271eedfe...e5202fbd461c

Reply via email to