# phpman > man > provider-storemgmt(7)

[PROVIDER-STOREMGMT(7SSL)](https://www.chedong.com/phpMan.php/man/PROVIDER-STOREMGMT/7SSL/markdown)                       OpenSSL                      [PROVIDER-STOREMGMT(7SSL)](https://www.chedong.com/phpMan.php/man/PROVIDER-STOREMGMT/7SSL/markdown)



## NAME
       provider-storemgmt - The OSSL_STORE library <-> provider functions

## SYNOPSIS
        #include <openssl/core_dispatch.h>

        /*
         * None of these are actual functions, but are displayed like this for
         * the function signatures for functions that are offered as function
         * pointers in OSSL_DISPATCH arrays.
         */

        void *OSSL_FUNC_store_open(void *provctx, const char *uri);
        void *OSSL_FUNC_store_attach(void *provctx, OSSL_CORE_BIO *bio);
        const OSSL_PARAM *store_settable_ctx_params(void *provctx);
        int OSSL_FUNC_store_set_ctx_params(void *loaderctx, const OSSL_PARAM[]);
        int OSSL_FUNC_store_load(void *loaderctx,
                                 OSSL_CALLBACK *object_cb, void *object_cbarg,
                                 OSSL_PASSPHRASE_CALLBACK *pw_cb, void *pw_cbarg);
        int OSSL_FUNC_store_eof(void *loaderctx);
        int OSSL_FUNC_store_close(void *loaderctx);

        int OSSL_FUNC_store_export_object
            (void *loaderctx, const void *objref, size_t objref_sz,
             OSSL_CALLBACK *export_cb, void *export_cbarg);

## DESCRIPTION
       The STORE operation is the provider side of the **ossl**___**[store**(7)](https://www.chedong.com/phpMan.php/man/store/7/markdown) API.

       The primary responsibility of the STORE operation is to load all sorts of objects from a
       container indicated by URI.  These objects are given to the OpenSSL library in provider-
       native object abstraction form (see [**provider-object**(7)](https://www.chedong.com/phpMan.php/man/provider-object/7/markdown)).  The OpenSSL library is then
       responsible for passing on that abstraction to suitable provided functions.

       Examples of functions that the OpenSSL library can pass the abstraction to include
       **OSSL**___**FUNC**___**keymgmt**___**load()** ([**provider-keymgmt**(7)](https://www.chedong.com/phpMan.php/man/provider-keymgmt/7/markdown)), **OSSL**___**FUNC**___**store**___**export**___**object()** (which
       exports the object in parameterized form).

       All "functions" mentioned here are passed as function pointers between _libcrypto_ and the
       provider in **OSSL**___**DISPATCH** arrays via **OSSL**___**ALGORITHM** arrays that are returned by the
       provider's **provider**___**query**___**operation()** function (see "Provider Functions" in
       [**provider-base**(7)](https://www.chedong.com/phpMan.php/man/provider-base/7/markdown)).

       All these "functions" have a corresponding function type definition named
       **OSSL**___**FUNC**___**{name}**___**fn**, and a helper function to retrieve the function pointer from a
       **OSSL**___**DISPATCH** element named **OSSL**___**get**___**{name}**.  For example, the "function"
       **OSSL**___**FUNC**___**store**___**load()** has these:

        typedef void *(OSSL_OSSL_FUNC_store_load_fn)(void *provctx,
                                                     const OSSL_PARAM params[]);
        static ossl_inline OSSL_OSSL_FUNC_store_load_fn
            OSSL_OSSL_FUNC_store_load(const OSSL_DISPATCH *opf);

       **OSSL**___**DISPATCH** arrays are indexed by numbers that are provided as macros in
       **openssl-core**___**[dispatch.h**(7)](https://www.chedong.com/phpMan.php/man/dispatch.h/7/markdown), as follows:

        OSSL_FUNC_store_open                 OSSL_FUNC_STORE_OPEN
        OSSL_FUNC_store_attach               OSSL_FUNC_STORE_ATTACH
        OSSL_FUNC_store_settable_ctx_params  OSSL_FUNC_STORE_SETTABLE_CTX_PARAMS
        OSSL_FUNC_store_set_ctx_params       OSSL_FUNC_STORE_SET_CTX_PARAMS
        OSSL_FUNC_store_load                 OSSL_FUNC_STORE_LOAD
        OSSL_FUNC_store_eof                  OSSL_FUNC_STORE_EOF
        OSSL_FUNC_store_close                OSSL_FUNC_STORE_CLOSE
        OSSL_FUNC_store_export_object        OSSL_FUNC_STORE_EXPORT_OBJECT

### Functions
       **OSSL**___**FUNC**___**store**___**open()** should create a provider side context with data based on the input
       _uri_.  The implementation is entirely responsible for the interpretation of the URI.

       **OSSL**___**FUNC**___**store**___**attach()** should create a provider side context with the core **BIO** _bio_
       attached.  This is an alternative to using a URI to find storage, supporting
       **OSSL**___**STORE**___**[attach**(3)](https://www.chedong.com/phpMan.php/man/attach/3/markdown).

       **OSSL**___**FUNC**___**store**___**settable**___**ctx**___**params()** should return a constant array of descriptor
       **OSSL**___**PARAM**, for parameters that **OSSL**___**FUNC**___**store**___**set**___**ctx**___**params()** can handle.

       **OSSL**___**FUNC**___**store**___**set**___**ctx**___**params()** should set additional parameters, such as what kind of data
       to expect, search criteria, and so on.  More on those below, in "Load Parameters".  Whether
       unrecognised parameters are an error or simply ignored is at the implementation's discretion.
       Passing NULL for _params_ should return true.

       **OSSL**___**FUNC**___**store**___**load()** loads the next object from the URI opened by **OSSL**___**FUNC**___**store**___**open()**,
       creates an object abstraction for it (see [**provider-object**(7)](https://www.chedong.com/phpMan.php/man/provider-object/7/markdown)), and calls _object_cb_ with it as
       well as _object_cbarg_.  _object_cb_ will then interpret the object abstraction and do what it
       can to wrap it or decode it into an OpenSSL structure.  In case a passphrase needs to be
       prompted to unlock an object, _pw_cb_ should be called.

       **OSSL**___**FUNC**___**store**___**eof()** indicates if the end of the set of objects from the URI has been
       reached.  When that happens, there's no point trying to do any further loading.

       **OSSL**___**FUNC**___**store**___**close()** frees the provider side context _ctx_.

### Load Parameters
       "expect" (**OSSL**___**STORE**___**PARAM**___**EXPECT**) <integer>
           Is a hint of what type of data the OpenSSL library expects to get.  This is only useful
           for optimization, as the library will check that the object types match the expectation
           too.

           The number that can be given through this parameter is found in _<openssl/store.h>_, with
           the macros having names starting with "OSSL_STORE_INFO_".  These are further described in
           "SUPPORTED OBJECTS" in **OSSL**___**STORE**___**[INFO**(3)](https://www.chedong.com/phpMan.php/man/INFO/3/markdown).

       "subject" (**OSSL**___**STORE**___**PARAM**___**SUBJECT**) <octet string>
           Indicates that the caller wants to search for an object with the given subject
           associated.  This can be used to select specific certificates by subject.

           The contents of the octet string is expected to be in DER form.

       "issuer" (**OSSL**___**STORE**___**PARAM**___**ISSUER**) <octet string>
           Indicates that the caller wants to search for an object with the given issuer associated.
           This can be used to select specific certificates by issuer.

           The contents of the octet string is expected to be in DER form.

       "serial" (**OSSL**___**STORE**___**PARAM**___**SERIAL**) <integer>
           Indicates that the caller wants to search for an object with the given serial number
           associated.

       "digest" (**OSSL**___**STORE**___**PARAM**___**DIGEST**) <UTF8 string>
       "fingerprint" (**OSSL**___**STORE**___**PARAM**___**FINGERPRINT**) <octet string>
           Indicates that the caller wants to search for an object with the given fingerprint,
           computed with the given digest.

       "alias" (**OSSL**___**STORE**___**PARAM**___**ALIAS**) <UTF8 string>
           Indicates that the caller wants to search for an object with the given alias (some call
           it a "friendly name").

       "properties" (**OSSL**___**STORE**___**PARAM**___**PROPERTIES)** **<utf8** **string**
           Property string to use when querying for algorithms such as the **OSSL**___**DECODER** decoder
           implementations.

       "input-type" (**OSSL**___**STORE**___**PARAM**___**INPUT**___**TYPE)** **<utf8** **string**
           Type of the input format as a hint to use when decoding the objects in the store.

       Several of these search criteria may be combined.  For example, to search for a certificate
       by issuer+serial, both the "issuer" and the "serial" parameters will be given.

## SEE ALSO
       [**provider**(7)](https://www.chedong.com/phpMan.php/man/provider/7/markdown)

## HISTORY
       The STORE interface was introduced in OpenSSL 3.0.

## COPYRIGHT
       Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved.

       Licensed under the Apache License 2.0 (the "License").  You may not use this file except in
       compliance with the License.  You can obtain a copy in the file LICENSE in the source
       distribution or at <<https://www.openssl.org/source/license.html>>.



3.0.2                                        2026-06-02                     [PROVIDER-STOREMGMT(7SSL)](https://www.chedong.com/phpMan.php/man/PROVIDER-STOREMGMT/7SSL/markdown)
