|
NAMEX509_policy_check ,
X509_policy_tree_free —
construct X.509 valid policy tree
SYNOPSIS#include <openssl/x509_vfy.h>
int
void
DESCRIPTIONX509_policy_check () performs those parts of Basic
Certification Path Validation described in RFC 5280 section 6.1 that are
related to the construction of the valid policy tree.
The certs input argument contains the prospective certification path according to RFC 5280 paragraph 6.1.1(a), starting with the target certificate and ending with the trust anchor. The policy_oids input argument contains the user-initial-policy-set according to RFC 5280 section 6.1.1(c). It specifies a set of certificate policies acceptable to the certificate user. The flags argument can contain zero or more of the following constants, OR'ed together:
Upon success and in some cases of failure, the storage location
pointed to by pexplicit_policy is set to 1 if
In many cases of success and in a few cases of failure, a pointer to the valid_policy_tree output value mentioned in RFC 5280 section 6.1.6 is returned in *ptree. It contains one level for each of the certs, in reverse order: level 0 corresponds to the trust anchor, the last level corresponds to the target certificate. Level 0 is initialized to contain a single node with a valid_policy of anyPolicy and an empty qualifier_set. If a policy tree is returned, the reference count of each of the
certs is incremented by 1. In that case, the caller is
responsible for calling RETURN VALUESX509_policy_check () returns these values:
SEE ALSOASN1_OBJECT_new(3), OBJ_nid2obj(3), STACK_OF(3), X509_check_purpose(3), X509_check_trust(3), X509_new(3), X509_policy_tree_get0_policies(3), X509_policy_tree_level_count(3), X509_verify_cert(3)STANDARDSRFC 5280: Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile, section 6.1: Basic Path ValidationHISTORYX509_policy_check () and
X509_policy_tree_free () first appeared in OpenSSL
0.9.8 and have been available since OpenBSD 4.5.
Visit the GSP FreeBSD Man Page Interface. |