STORE: Modify to support loading with provider based loaders
authorRichard Levitte <levitte@openssl.org>
Wed, 22 Jul 2020 20:55:00 +0000 (22:55 +0200)
committerRichard Levitte <levitte@openssl.org>
Mon, 24 Aug 2020 08:02:26 +0000 (10:02 +0200)
commit34b80d0622924d112b145fd36bfaad18616f2546
treef80e34178246e6114674817080d9dbff149a8a03
parent4fd397821139723fd4e51a03e92df33e9a9fadcc
STORE: Modify to support loading with provider based loaders

This adds the needed code to make the OSSL_STORE API functions handle
provided STORE implementations.

This also modifies OSSL_STORE_attach() for have the URI, the
library context and the properties in the same order as
OSSL_STORE_open_with_libctx().

The most notable change, though, is how this creates a division of
labor between libcrypto and any storemgmt implementation that wants to
pass X.509, X.509 CRL, etc structures back to libcrypto.  Since those
structures aren't directly supported in the libcrypto <-> provider
interface (asymmetric keys being the only exception so far), we resort
to a libcrypto object callback that can handle passed data in DER form
and does its part of figuring out what the DER content actually is.

This also adds the internal x509_crl_set0_libctx(), which works just
like x509_set0_libctx(), but for X509_CRL.

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/12512)
crypto/store/build.info
crypto/store/store_lib.c
crypto/store/store_local.h
crypto/store/store_result.c [new file with mode: 0644]
crypto/x509/x_crl.c
doc/man3/OSSL_STORE_open.pod
include/crypto/x509.h
include/openssl/err.h
include/openssl/store.h