Blame doc/man3/OSSL_STORE_expect.pod

Packit c4476c
=pod
Packit c4476c
Packit c4476c
=head1 NAME
Packit c4476c
Packit c4476c
OSSL_STORE_expect,
Packit c4476c
OSSL_STORE_supports_search,
Packit c4476c
OSSL_STORE_find
Packit c4476c
- Specify what object type is expected
Packit c4476c
Packit c4476c
=head1 SYNOPSIS
Packit c4476c
Packit c4476c
 #include <openssl/store.h>
Packit c4476c
Packit c4476c
 int OSSL_STORE_expect(OSSL_STORE_CTX *ctx, int expected_type);
Packit c4476c
Packit c4476c
 int OSSL_STORE_supports_search(OSSL_STORE_CTX *ctx, int criterion_type);
Packit c4476c
Packit c4476c
 int OSSL_STORE_find(OSSL_STORE_CTX *ctx, OSSL_STORE_SEARCH *search);
Packit c4476c
Packit c4476c
=head1 DESCRIPTION
Packit c4476c
Packit c4476c
OSSL_STORE_expect() helps applications filter what OSSL_STORE_load() returns
Packit c4476c
by specifying a B<OSSL_STORE_INFO> type.
Packit c4476c
For example, if C<file:/foo/bar/store.pem> contains several different objects
Packit c4476c
and only the certificates are interesting, the application can simply say
Packit c4476c
that it expects the type B<OSSL_STORE_INFO_CERT>.
Packit c4476c
All known object types (see L<OSSL_STORE_INFO(3)/SUPPORTED OBJECTS>)
Packit c4476c
except for B<OSSL_STORE_INFO_NAME> are supported.
Packit c4476c
Packit c4476c
OSSL_STORE_find() helps applications specify a criterion for a more fine
Packit c4476c
grained search of objects.
Packit c4476c
Packit c4476c
OSSL_STORE_supports_search() checks if the loader of the given OSSL_STORE
Packit c4476c
context supports the given search type.
Packit c4476c
See L<OSSL_STORE_SEARCH/SUPPORTED CRITERION TYPES> for information on the
Packit c4476c
supported search criterion types.
Packit c4476c
Packit c4476c
OSSL_STORE_expect() and OSSL_STORE_find I<must> be called before the first
Packit c4476c
OSSL_STORE_load() of a given session, or they will fail.
Packit c4476c
Packit c4476c
=head1 NOTES
Packit c4476c
Packit c4476c
If a more elaborate filter is required by the application, a better choice
Packit c4476c
would be to use a post-processing function.
Packit c4476c
See L<OSSL_STORE_open(3)> for more information.
Packit c4476c
Packit c4476c
However, some loaders may take advantage of the knowledge of an expected type
Packit c4476c
to make object retrieval more efficient, so if a single type is expected, this
Packit c4476c
method is usually preferable.
Packit c4476c
Packit c4476c
=head1 RETURN VALUES
Packit c4476c
Packit c4476c
OSSL_STORE_expect() returns 1 on success, or 0 on failure.
Packit c4476c
Packit c4476c
OSSL_STORE_supports_search() returns 1 if the criterion is supported, or 0
Packit c4476c
otherwise.
Packit c4476c
Packit c4476c
OSSL_STORE_find() returns 1 on success, or 0 on failure.
Packit c4476c
Packit c4476c
=head1 SEE ALSO
Packit c4476c
Packit c4476c
L<ossl_store(7)>, L<OSSL_STORE_INFO(3)>, L<OSSL_STORE_SEARCH(3)>,
Packit c4476c
L<OSSL_STORE_load(3)>
Packit c4476c
Packit c4476c
=head1 HISTORY
Packit c4476c
Packit c4476c
OSSL_STORE_expect(), OSSL_STORE_supports_search() and OSSL_STORE_find()
Packit c4476c
were added in OpenSSL 1.1.1.
Packit c4476c
Packit c4476c
=head1 COPYRIGHT
Packit c4476c
Packit c4476c
Copyright 2018-2019 The OpenSSL Project Authors. All Rights Reserved.
Packit c4476c
Packit c4476c
Licensed under the OpenSSL license (the "License").  You may not use
Packit c4476c
this file except in compliance with the License.  You can obtain a copy
Packit c4476c
in the file LICENSE in the source distribution or at
Packit c4476c
L<https://www.openssl.org/source/license.html>.
Packit c4476c
Packit c4476c
=cut