openssl_x509_checkpurpose

Example

 int openssl_x509_checkpurpose ( mixed $x509cert , int $purpose [, array $cainfo = array() [, string $untrustedfile ]] ) 

Description

openssl_x509_checkpurpose() examines a certificate to see if it can be used for the specified purpose.

Return Values

Returns TRUE if the certificate can be used for the intended purpose, FALSE if it cannot, or -1 on error.