1OSSL_STORE_EXPECT(3ossl)            OpenSSL           OSSL_STORE_EXPECT(3ossl)
2
3
4

NAME

6       OSSL_STORE_expect, OSSL_STORE_supports_search, OSSL_STORE_find -
7       Specify what object type is expected
8

SYNOPSIS

10        #include <openssl/store.h>
11
12        int OSSL_STORE_expect(OSSL_STORE_CTX *ctx, int expected_type);
13
14        int OSSL_STORE_supports_search(OSSL_STORE_CTX *ctx, int criterion_type);
15
16        int OSSL_STORE_find(OSSL_STORE_CTX *ctx, OSSL_STORE_SEARCH *search);
17

DESCRIPTION

19       OSSL_STORE_expect() helps applications filter what OSSL_STORE_load()
20       returns by specifying a OSSL_STORE_INFO type.  By default, no
21       expectations on the types of objects to be loaded are made.
22       expected_type may be 0 to indicate explicitly that no expectation is
23       made, or it may be any of the known object types (see "SUPPORTED
24       OBJECTS" in OSSL_STORE_INFO(3)) except for OSSL_STORE_INFO_NAME.  For
25       example, if "file:/foo/bar/store.pem" contains several objects of
26       different type and only certificates are interesting, the application
27       can simply say that it expects the type OSSL_STORE_INFO_CERT.
28
29       OSSL_STORE_find() helps applications specify a criterion for a more
30       fine grained search of objects.
31
32       OSSL_STORE_supports_search() checks if the loader of the given
33       OSSL_STORE context supports the given search type.  See "SUPPORTED
34       CRITERION TYPES" in OSSL_STORE_SEARCH(3) for information on the
35       supported search criterion types.
36
37       OSSL_STORE_expect() and OSSL_STORE_find must be called before the first
38       OSSL_STORE_load() of a given session, or they will fail.
39

NOTES

41       If a more elaborate filter is required by the application, a better
42       choice would be to use a post-processing function.  See
43       OSSL_STORE_open(3) for more information.
44
45       However, some loaders may take advantage of the knowledge of an
46       expected type to make object retrieval more efficient, so if a single
47       type is expected, this method is usually preferable.
48

RETURN VALUES

50       OSSL_STORE_expect() returns 1 on success, or 0 on failure.
51
52       OSSL_STORE_supports_search() returns 1 if the criterion is supported,
53       or 0 otherwise.
54
55       OSSL_STORE_find() returns 1 on success, or 0 on failure.
56

SEE ALSO

58       ossl_store(7), OSSL_STORE_INFO(3), OSSL_STORE_SEARCH(3),
59       OSSL_STORE_load(3)
60

HISTORY

62       OSSL_STORE_expect(), OSSL_STORE_supports_search() and OSSL_STORE_find()
63       were added in OpenSSL 1.1.1.
64
66       Copyright 2018-2021 The OpenSSL Project Authors. All Rights Reserved.
67
68       Licensed under the Apache License 2.0 (the "License").  You may not use
69       this file except in compliance with the License.  You can obtain a copy
70       in the file LICENSE in the source distribution or at
71       <https://www.openssl.org/source/license.html>.
72
73
74
753.0.5                             2022-11-01          OSSL_STORE_EXPECT(3ossl)
Impressum