openssl_x509_checkpurpose
openssl_x509_checkpurpose
Verifies if a certificate can be used for a particular purpose
**openssl_x509_checkpurpose** $certificate int $purpose array $ca_info $untrusted_certificates_file
examines a certificate to
see if it can be used for the specified .
openssl_x509_checkpurpose``purpose
certificateThe examined certificate.
purposeThese options are not bitfields - you may specify one only!
ca_info
should be an array of trusted CA files/dirs
as described in .
ca_infoCertificate
Verification
untrusted_certificates_fileIf specified, this should be the name of a encoded file holding
certificates that can be used to help verify the certificate, although
no trust is placed in the certificates that come from that file.
Returns true if the certificate can be used for the intended purpose, false if it cannot, or -1 on error.