xref: /freebsd/crypto/openssl/doc/internal/man3/x509v3_cache_extensions.pod (revision 2e3507c25e42292b45a5482e116d278f5515d04d)
1=pod
2
3=head1 NAME
4
5x509v3_cache_extensions
6- cache info on various X.509v3 extensions and further derived certificate data
7
8=head1 SYNOPSIS
9
10 #include <openssl/x509v3.h>
11
12 int x509v3_cache_extensions(X509 *x, OSSL_LIB_CTX *libctx, const char *propq);
13
14=head1 DESCRIPTION
15
16This function processes any X509v3 extensions present in an X509 object I<x>
17and caches the result of that processing as well as further derived info,
18for instance whether the certificate is self-issued or has version X.509v1.
19It computes the SHA1 digest of the certificate using the default library context
20and property query string and stores the result in x->sha1_hash,
21or on failure sets B<EXFLAG_NO_FINGERPRINT> in x->flags.
22It sets B<X509_SIG_INFO_VALID> in x->flags if x->siginf was filled successfully,
23which may not be possible if a referenced algorithm is unknown or not available.
24Many OpenSSL functions that use an X509 object call this function implicitly.
25
26=head1 RETURN VALUES
27
28This function returns 0 if the extensions or other portions of the certificate
29are invalid or an error occurred.
30Otherwise it returns 1.
31
32=head1 COPYRIGHT
33
34Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved.
35
36Licensed under the Apache License 2.0 (the "License").  You may not use
37this file except in compliance with the License.  You can obtain a copy
38in the file LICENSE in the source distribution or at
39L<https://www.openssl.org/source/license.html>.
40
41=cut
42