[openssl/openssl] b7a29b: OSSL_STORE and PKCS#12: Check if there is a MAC to...

Richard Levitte noreply at github.com
Sun Jun 25 22:03:16 UTC 2023


  Branch: refs/heads/openssl-3.0
  Home:   https://github.com/openssl/openssl
  Commit: b7a29bc837e0181e29514b949cb3a0fadff566c0
      https://github.com/openssl/openssl/commit/b7a29bc837e0181e29514b949cb3a0fadff566c0
  Author: Richard Levitte <levitte at openssl.org>
  Date:   2023-06-26 (Mon, 26 Jun 2023)

  Changed paths:
    M crypto/store/store_result.c

  Log Message:
  -----------
  OSSL_STORE and PKCS#12: Check if there is a MAC to verify before prompting

When a DER object with unknown contents comes all the way to
ossl_store_handle_load_result(), and it attempts to decode them as different
objects, the PKCS#12 decoding attempt would (almost) always prompt for a
passphrase, even if there isn't a MAC to verify it against in the PKCS#12
object.

This change checks if there is a MAC to verify against before attempting to
prompt for a passphrase, leading to less surprising behavior.

Reviewed-by: Tomas Mraz <tomas at openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit at gmail.com>
Reviewed-by: Paul Dale <pauli at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21197)

(cherry picked from commit 7a520619c997146639f42ce8595162ac34c2ad41)


  Commit: ffb29de3c7efaf4b087e4180fb92f9ee562e18cf
      https://github.com/openssl/openssl/commit/ffb29de3c7efaf4b087e4180fb92f9ee562e18cf
  Author: Richard Levitte <levitte at openssl.org>
  Date:   2023-06-26 (Mon, 26 Jun 2023)

  Changed paths:
    A test/recipes/90-test_store_cases.t
    A test/recipes/90-test_store_cases_data/garbage-pkcs12.p12

  Log Message:
  -----------
  Add a test case for the password prompt on garbage PKCS#12 file

Reviewed-by: Tomas Mraz <tomas at openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit at gmail.com>
Reviewed-by: Paul Dale <pauli at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21197)

(cherry picked from commit 1a27cc3626bd15f8fd9a26a2dbc59a681d505321)


Compare: https://github.com/openssl/openssl/compare/24479b22b8fc...ffb29de3c7ef


More information about the openssl-commits mailing list