Home | History | Annotate | Line # | Download | only in man3
      1      1.1  christos =pod
      2      1.1  christos 
      3      1.1  christos =head1 NAME
      4      1.1  christos 
      5      1.1  christos OSSL_STORE_expect,
      6      1.1  christos OSSL_STORE_supports_search,
      7      1.1  christos OSSL_STORE_find
      8      1.1  christos - Specify what object type is expected
      9      1.1  christos 
     10      1.1  christos =head1 SYNOPSIS
     11      1.1  christos 
     12      1.1  christos  #include <openssl/store.h>
     13      1.1  christos 
     14      1.1  christos  int OSSL_STORE_expect(OSSL_STORE_CTX *ctx, int expected_type);
     15      1.1  christos 
     16      1.1  christos  int OSSL_STORE_supports_search(OSSL_STORE_CTX *ctx, int criterion_type);
     17      1.1  christos 
     18      1.1  christos  int OSSL_STORE_find(OSSL_STORE_CTX *ctx, OSSL_STORE_SEARCH *search);
     19      1.1  christos 
     20      1.1  christos =head1 DESCRIPTION
     21      1.1  christos 
     22      1.1  christos OSSL_STORE_expect() helps applications filter what OSSL_STORE_load() returns
     23      1.1  christos by specifying a B<OSSL_STORE_INFO> type.
     24  1.1.1.4  christos By default, no expectations on the types of objects to be loaded are made.
     25  1.1.1.4  christos I<expected_type> may be 0 to indicate explicitly that no expectation is made,
     26  1.1.1.4  christos or it may be any of the known object types (see
     27  1.1.1.4  christos L<OSSL_STORE_INFO(3)/SUPPORTED OBJECTS>) except for B<OSSL_STORE_INFO_NAME>.
     28  1.1.1.4  christos For example, if C<file:/foo/bar/store.pem> contains several objects of different
     29  1.1.1.4  christos type and only certificates are interesting, the application can simply say
     30      1.1  christos that it expects the type B<OSSL_STORE_INFO_CERT>.
     31      1.1  christos 
     32      1.1  christos OSSL_STORE_find() helps applications specify a criterion for a more fine
     33      1.1  christos grained search of objects.
     34      1.1  christos 
     35      1.1  christos OSSL_STORE_supports_search() checks if the loader of the given OSSL_STORE
     36      1.1  christos context supports the given search type.
     37  1.1.1.4  christos See L<OSSL_STORE_SEARCH(3)/SUPPORTED CRITERION TYPES> for information on the
     38      1.1  christos supported search criterion types.
     39      1.1  christos 
     40      1.1  christos OSSL_STORE_expect() and OSSL_STORE_find I<must> be called before the first
     41      1.1  christos OSSL_STORE_load() of a given session, or they will fail.
     42      1.1  christos 
     43      1.1  christos =head1 NOTES
     44      1.1  christos 
     45      1.1  christos If a more elaborate filter is required by the application, a better choice
     46      1.1  christos would be to use a post-processing function.
     47      1.1  christos See L<OSSL_STORE_open(3)> for more information.
     48      1.1  christos 
     49      1.1  christos However, some loaders may take advantage of the knowledge of an expected type
     50      1.1  christos to make object retrieval more efficient, so if a single type is expected, this
     51      1.1  christos method is usually preferable.
     52      1.1  christos 
     53      1.1  christos =head1 RETURN VALUES
     54      1.1  christos 
     55      1.1  christos OSSL_STORE_expect() returns 1 on success, or 0 on failure.
     56      1.1  christos 
     57      1.1  christos OSSL_STORE_supports_search() returns 1 if the criterion is supported, or 0
     58      1.1  christos otherwise.
     59      1.1  christos 
     60      1.1  christos OSSL_STORE_find() returns 1 on success, or 0 on failure.
     61      1.1  christos 
     62      1.1  christos =head1 SEE ALSO
     63      1.1  christos 
     64      1.1  christos L<ossl_store(7)>, L<OSSL_STORE_INFO(3)>, L<OSSL_STORE_SEARCH(3)>,
     65      1.1  christos L<OSSL_STORE_load(3)>
     66      1.1  christos 
     67      1.1  christos =head1 HISTORY
     68      1.1  christos 
     69      1.1  christos OSSL_STORE_expect(), OSSL_STORE_supports_search() and OSSL_STORE_find()
     70  1.1.1.2  christos were added in OpenSSL 1.1.1.
     71      1.1  christos 
     72      1.1  christos =head1 COPYRIGHT
     73      1.1  christos 
     74  1.1.1.4  christos Copyright 2018-2021 The OpenSSL Project Authors. All Rights Reserved.
     75      1.1  christos 
     76  1.1.1.4  christos Licensed under the Apache License 2.0 (the "License").  You may not use
     77      1.1  christos this file except in compliance with the License.  You can obtain a copy
     78      1.1  christos in the file LICENSE in the source distribution or at
     79      1.1  christos L<https://www.openssl.org/source/license.html>.
     80      1.1  christos 
     81      1.1  christos =cut
     82