OSSL_STORE_EXPECT(3ossl)
π NAME π
okay bestie, welcome to the OSSL_STORE_EXPECT(3ossl) page from OpenSSL β yes, thatβs the manual name folded in right here π
. This trio is OSSL_STORE_expect, OSSL_STORE_supports_search, and OSSL_STORE_find, and their whole thing is: Specify what object type is expected. slay β¨
β¨ SYNOPSIS β¨
#include <openssl/store.h>
int OSSL_STORE_expect(OSSL_STORE_CTX *ctx, int expected_type);
int OSSL_STORE_supports_search(OSSL_STORE_CTX *ctx, int criterion_type);
int OSSL_STORE_find(OSSL_STORE_CTX *ctx, OSSL_STORE_SEARCH *search);
π DESCRIPTION π
Okay so, OSSL_STORE_expect() is literally the filter bestie. It helps applications filter what OSSL_STORE_load() returns by specifying a OSSL_STORE_INFO type. By default, no expectations on the types of objects to be loaded are made β like, none at all, no cap π«Ά.
expected_type may be 0 to indicate explicitly that no expectation is made, or it may be any of the known object types β see "SUPPORTED OBJECTS" in OSSL_STORE_INFO(3) β except for OSSL_STORE_INFO_NAME. Periodt. π
Example moment: if "file:/foo/bar/store.pem" contains several objects of different type and only certificates are interesting, the application can simply say that it expects the type OSSL_STORE_INFO_CERT. iconic behavior π
OSSL_STORE_find() helps applications specify a criterion for a more fine grained search of objects. iykyk π
OSSL_STORE_supports_search() checks if the loader of the given OSSL_STORE context supports the given search type. See "SUPPORTED CRITERION TYPES" in OSSL_STORE_SEARCH(3) for information on the supported search criterion types. vibe check complete β
β οΈ timing tea:OSSL_STORE_expect()andOSSL_STORE_findmust be called before the firstOSSL_STORE_load()of a given session, or they will fail. Like, do not wait. fr fr π
π¦ NOTES π¦
If a more elaborate filter is required by the application, a better choice would be to use a post-processing function. See OSSL_STORE_open(3) for more information. big brain move π§
However, some loaders may take advantage of the knowledge of an expected type to make object retrieval more efficient, so if a single type is expected, this method is usually preferable. efficiency slay β‘
πΈ RETURN VALUES πΈ
OSSL_STORE_expect()returns1on success, or0on failure. πOSSL_STORE_supports_search()returns1if the criterion is supported, or0otherwise. πOSSL_STORE_find()returns1on success, or0on failure. β¨
π SEE ALSO π
the whole squad, honestly π«Ά
β HISTORY β
OSSL_STORE_expect(), OSSL_STORE_supports_search() and OSSL_STORE_find() were added in OpenSSL 1.1.1. history lesson, but make it cute π
π COPYRIGHT π
Copyright 2018-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>.
legal tea, but make it respectful π
mwah π β this cutie is from version 3.5.0, dated 2026-09-25, and the manual page is OSSL_STORE_EXPECT(3ossl). bye bestie, go filter those objects π¦β¨
π¦ where this page comes from
- opensuse-leap 16.0: openssl-3-doc 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