openssl_x509_checkpurpose

Supported Versions: PHP 4 >= 4.0.6, PHP 5, PHP 7, PHP 8
Verifies if a certificate can be used for a particular purpose
openssl_x509_checkpurpose(¬†¬†¬†¬†OpenSSLCertificate|string $certificate,¬†¬†¬†¬†int $purpose,¬†¬†¬†¬†array $ca_info = [],¬†¬†¬†¬†?string $untrusted_certificates_file null): bool|int