1OSSL_STORE_EXPECT(3) OpenSSL OSSL_STORE_EXPECT(3)
2
3
4
6 OSSL_STORE_expect, OSSL_STORE_supports_search, OSSL_STORE_find -
7 Specify what object type is expected
8
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
19 OSSL_STORE_expect() helps applications filter what OSSL_STORE_load()
20 returns by specifying a OSSL_STORE_INFO type. For example, if
21 "file:/foo/bar/store.pem" contains several different objects and only
22 the certificates are interesting, the application can simply say that
23 it expects the type OSSL_STORE_INFO_CERT. All known object types (see
24 "SUPPORTED OBJECTS" in OSSL_STORE_INFO(3)) except for
25 OSSL_STORE_INFO_NAME are supported.
26
27 OSSL_STORE_find() helps applications specify a criterion for a more
28 fine grained search of objects.
29
30 OSSL_STORE_supports_search() checks if the loader of the given
31 OSSL_STORE context supports the given search type. See "SUPPORED
32 CRITERION TYPES" in OSSL_STORE_SEARCH for information on the supported
33 search criterion types.
34
35 OSSL_STORE_expect() and OSSL_STORE_find must be called before the first
36 OSSL_STORE_load() of a given session, or they will fail.
37
39 If a more elaborate filter is required by the application, a better
40 choice would be to use a post-processing function. See
41 OSSL_STORE_open(3) for more information.
42
43 However, some loaders may take advantage of the knowledge of an
44 expected type to make object retrieval more efficient, so if a single
45 type is expected, this method is usually preferable.
46
48 OSSL_STORE_expect() returns 1 on success, or 0 on failure.
49
50 OSSL_STORE_supports_search() returns 1 if the criterion is supported,
51 or 0 otherwise.
52
53 OSSL_STORE_find() returns 1 on success, or 0 on failure.
54
56 ossl_store(7), OSSL_STORE_INFO(3), OSSL_STORE_SEARCH(3),
57 OSSL_STORE_load(3)
58
60 OSSL_STORE_expect(), OSSL_STORE_supports_search() and OSSL_STORE_find()
61 were added to OpenSSL 1.1.1.
62
64 Copyright 2018 The OpenSSL Project Authors. All Rights Reserved.
65
66 Licensed under the OpenSSL license (the "License"). You may not use
67 this file except in compliance with the License. You can obtain a copy
68 in the file LICENSE in the source distribution or at
69 <https://www.openssl.org/source/license.html>.
70
71
72
731.1.1 2018-09-11 OSSL_STORE_EXPECT(3)