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