STORE: Fix OSSL_STORE_attach() to check |ui_method| before use
authorRichard Levitte <levitte@openssl.org>
Wed, 9 Sep 2020 03:29:56 +0000 (05:29 +0200)
committerRichard Levitte <levitte@openssl.org>
Thu, 10 Sep 2020 11:39:30 +0000 (13:39 +0200)
commit9f604ca13ddc99e17ba37fed9281fbd1b71149a9
treee2a1423540d7aa2f02e67406ff52a72bdbd57dce
parent5a0991d0d94b966e0621b8123873b132877dc9d3
STORE: Fix OSSL_STORE_attach() to check |ui_method| before use

ossl_pw_set_ui_method() demands that the passed |ui_method| be
non-NULL, and OSSL_STORE_attach() didn't check it beforehand.

While we're at it, we remove the passphrase caching that's set at the
library level, and trust the implementations to deal with that on
their own as needed.

Fixes #12830

Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/12831)
crypto/store/store_lib.c