OpenSSL.vip

Cryptography and SSL/TLS Toolkit

NAME

OSSL_STORE_expect, OSSL_STORE_supports_search, OSSL_STORE_find - Specify what object type is expected

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

OSSL_STORE_expect() helps applications filter what OSSL_STORE_load() returns by specifying a OSSL_STORE_INFO type. For example, if file:/foo/bar/store.pem contains several different objects and only the certificates are interesting, the application can simply say that it expects the type OSSL_STORE_INFO_CERT. All known object types (see "SUPPORTED CRITERION TYPES" in OSSL_STORE_SEARCH(3) for information on the supported search criterion types.

OSSL_STORE_expect() and OSSL_STORE_find must be called before the first OSSL_STORE_load() of a given session, or they will fail.

NOTES

If a more elaborate filter is required by the application, a better choice would be to use a post-processing function. See RETURN VALUES

OSSL_STORE_expect() returns 1 on success, or 0 on failure.

OSSL_STORE_supports_search() returns 1 if the criterion is supported, or 0 otherwise.

OSSL_STORE_find() returns 1 on success, or 0 on failure.

SEE ALSO

OSSL_STORE_INFO(3), OSSL_STORE_load(3)

HISTORY

OSSL_STORE_expect(), OSSL_STORE_supports_search() and OSSL_STORE_find() were added in OpenSSL 1.1.1.

COPYRIGHT

Copyright 2018 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.

关闭