diff options
author | Richard Levitte <levitte@openssl.org> | 2021-07-02 12:38:18 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2021-07-03 19:44:15 +0200 |
commit | f40c5f2c53b9d5eec98993653c3d741b0226b697 (patch) | |
tree | a6e6980fbd950136d578dead2d33b5c36b42bab0 /crypto/store | |
parent | 0550cdeb802a2462c4d59e0fc15a1f773054bc65 (diff) | |
download | openssl-f40c5f2c53b9d5eec98993653c3d741b0226b697.tar.gz |
PROV & STORE: Make the 'file:' store loader understand more binary formats
The 'file:' store loader only understood DER natively. With all the
whatever to key decoders gone, direct support for other binary file
formats are gone, and we need to recreate them for this store loader.
With these changes, it now also understands MSBLOB and PVK files.
As a consequence, any store loader that handles some form of open file
data (such as a PEM object) can now simply pass that data back via
OSSL_FUNC_store_load()'s object callback. As long as libcrypto has
access to a decoder that can understand the data, the appropriate
OpenSSL object will be generated for it, even if the store loader sits
in a different provider than any decoder or keymgmt.
For example, an LDAP store loader, which typically finds diverse PEM
formatted blobs in the database, can simply pass those back via the
object callback, and let libcrypto do the rest of the work.
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15981)
Diffstat (limited to 'crypto/store')
-rw-r--r-- | crypto/store/store_result.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/store/store_result.c b/crypto/store/store_result.c index 91c679718c..3a0dc9dfba 100644 --- a/crypto/store/store_result.c +++ b/crypto/store/store_result.c @@ -268,7 +268,7 @@ static EVP_PKEY *try_key_value(struct extracted_param_data_st *data, } decoderctx = - OSSL_DECODER_CTX_new_for_pkey(&pk, "DER", data->data_structure, + OSSL_DECODER_CTX_new_for_pkey(&pk, NULL, data->data_structure, data->data_type, selection, libctx, propq); (void)OSSL_DECODER_CTX_set_passphrase_cb(decoderctx, cb, cbarg); |