Fix OSSL_PARAM creation in OSSL_STORE_open_ex
authorPetr Gotthard <petr.gotthard@centrum.cz>
Thu, 17 Dec 2020 19:13:00 +0000 (20:13 +0100)
committerTomas Mraz <tmraz@fedoraproject.org>
Sat, 19 Dec 2020 10:33:21 +0000 (11:33 +0100)
commita5f2782ceca7af2480c86562e8952b2980251e4e
treef03b6f72152bcff1fd2bba062fe6b6b9b4972cca
parent5faec149c6af2e4269bc7e0b381c466619ed19a7
Fix OSSL_PARAM creation in OSSL_STORE_open_ex

The params[0].data is set to a non-NULL value, but params[0].data_size
is always zero. This confuses get_string_internal, which creates 1 byte
string with uninitialized content.

When OSSL_PARAM_construct_utf8_string is used, the data_size is set
correctly.

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/13699)
crypto/store/store_lib.c