PROV & STORE: Make the 'file:' store loader understand more binary formats
authorRichard Levitte <levitte@openssl.org>
Fri, 2 Jul 2021 10:38:18 +0000 (12:38 +0200)
committerRichard Levitte <levitte@openssl.org>
Sat, 3 Jul 2021 17:44:15 +0000 (19:44 +0200)
commitf40c5f2c53b9d5eec98993653c3d741b0226b697
treea6e6980fbd950136d578dead2d33b5c36b42bab0
parent0550cdeb802a2462c4d59e0fc15a1f773054bc65
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)
crypto/store/store_result.c
providers/implementations/storemgmt/build.info
providers/implementations/storemgmt/file_store.c
providers/implementations/storemgmt/file_store_any2obj.c [new file with mode: 0644]
providers/implementations/storemgmt/file_store_der2obj.c [deleted file]
providers/implementations/storemgmt/file_store_local.h