PROVIDER-STOREMGMT(7ossl)
π NAME π
okay so PROVIDER-STOREMGMT(7ossl) is the manual name, and this page is provider-storemgmt β The OSSL_STORE library <-> provider functions. literally the lore drop for how the store side talks to providers, bestie.
β¨ SYNOPSIS β¨
first up, the include and the whole βthese are not real functionsβ disclaimer:
#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);
void *OSSL_FUNC_store_open_ex(void *provctx, const char *uri,
const OSSL_PARAM params[],
OSSL_PASSPHRASE_CALLBACK *pw_cb,
void *pw_cbarg);
int OSSL_FUNC_store_delete(void *provctx, const char *uri,
const OSSL_PARAM params[],
OSSL_PASSPHRASE_CALLBACK *pw_cb, void *pw_cbarg);
those OSSL_FUNC_* names are function-pointer signatures, not callable functions in your regular C code. periodt π
π¦ DESCRIPTION π¦
okay so the STORE operation is literally the provider side of the ossl_store(7) API.
its main character job? loading all sorts of objects from a container indicated by URI. those objects get handed to the OpenSSL library in provider-native object abstraction form (see provider-object(7)). then the OpenSSL library is responsible for passing that abstraction on to suitable provided functions.
examples of functions the OpenSSL library can pass the abstraction to include OSSL_FUNC_keymgmt_load() (provider-keymgmt(7)), and OSSL_FUNC_store_export_object() (which exports the object in parameterized form).
all the βfunctionsβ we're talking about here are passed as function pointers between libcrypto and the provider in OSSL_DISPATCH(3) arrays via OSSL_ALGORITHM(3) arrays that are returned by the provider's provider_query_operation() function (see "Provider Functions" in provider-base(7)).
all these βfunctionsβ have a corresponding function type definition named OSSL_FUNC_{name}_fn, and a helper function to retrieve the function pointer from an OSSL_DISPATCH(3) element named OSSL_get_{name}. for example, the βfunctionβ OSSL_FUNC_store_attach() has these:
typedef void *(OSSL_FUNC_store_attach_fn)(void *provctx,
OSSL_CORE_BIO * bio);
static ossl_inline OSSL_FUNC_store_attach_fn
OSSL_FUNC_store_attach(const OSSL_DISPATCH *opf);
OSSL_DISPATCH(3) arrays are indexed by numbers that are provided as macros in openssl-core_dispatch.h(7), 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
OSSL_FUNC_store_delete OSSL_FUNC_STORE_DELETE
OSSL_FUNC_store_open_ex OSSL_FUNC_STORE_OPEN_EX
π Functions π
OSSL_FUNC_store_open()β should create a provider side context with data based on the inputuri. the implementation is entirely responsible for the interpretation of the URI. no pressure lol.OSSL_FUNC_store_attach()β should create a provider side context with the core BIObioattached. this is an alternative to using a URI to find storage, supportingOSSL_STORE_attach(3).OSSL_FUNC_store_settable_ctx_params()β should return a constant array of descriptorOSSL_PARAM(3), for parameters thatOSSL_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. passingNULLforparamsshould return true.OSSL_FUNC_store_load()β loads the next object from the URI opened byOSSL_FUNC_store_open(), creates an object abstraction for it (seeprovider-object(7)), and callsobject_cbwith it as well asobject_cbarg.object_cbwill 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_cbshould 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 contextctx.
when a provider-native object is created by a store manager it would be unsuitable for direct use with a foreign provider. the export function allows for exporting the object to that foreign provider if the foreign provider supports the type of the object and provides an import function.
OSSL_FUNC_store_export_object()β should export the object of sizeobjref_szreferenced byobjrefas anOSSL_PARAM(3)array and pass that to theexport_cbas well as the givenexport_cbarg.OSSL_FUNC_store_delete()β deletes the object identified by theuri. the implementation is entirely responsible for the interpretation of the URI. in case a passphrase needs to be prompted to remove an object,pw_cbshould be called.OSSL_FUNC_store_open_ex()β is an extended variant ofOSSL_FUNC_store_open(). if the provider does not implement this function the code internally falls back to use the originalOSSL_FUNC_store_open(). this variant additionally accepts anOSSL_PARAM(3)object and apw_cbcallback that can be used to request a passphrase in cases where the whole store needs to be unlocked before performing any load operation.
π Load Parameters π
these are the params the store can vibe with, bestie:
"expect"(OSSL_STORE_PARAM_EXPECT) β<integer>β 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" inOSSL_STORE_INFO(3)."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>β same energy but for issuer: 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>β says the caller wants to search for an object with the given fingerprint, computed with the given digest; this is the digest half of the combo."fingerprint"(OSSL_STORE_PARAM_FINGERPRINT) β<octet string>β the fingerprint half of that same search, 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 theOSSL_DECODERdecoder 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) β that's it, that's the list. iconic minimalism.
β HISTORY β
- the STORE interface was introduced in OpenSSL 3.0.
OSSL_FUNC_store_delete()callback was added in OpenSSL 3.2
π COPYRIGHT π
Copyright 2020-2023 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>.
okay that's the whole page, bestie π
β this one's from OpenSSL 3.5.0, dated 2026-09-25, and its manual name is PROVIDER-STOREMGMT(7ossl). mwah π«Ά
π¦ where this page comes from
- opensuse-leap 16.0: openssl-3 3.5.0-160000.11.1 Β· Apache-2.0
- opensuse-leap 16.0: openssl-3 3.5.0-160000.11.1 Β· Apache-2.0
- opensuse-leap 16.0: openssl-3 3.5.0-160000.11.1 Β· Apache-2.0
- opensuse-leap 16.0: openssl-3 3.5.0-160000.11.1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms