(PHP 4 >= 4.0.6, PHP 5, PHP 7)
openssl_x509_checkpurpose — ��֤�Ƿ����Ϊ�ض�Ŀ��ʹ��֤��
$x509cert
, int $purpose
[, array $cainfo = array()
[, string $untrustedfile
]] ) : int
openssl_x509_checkpurpose() ���֤���Բ鿴���Ƿ������ָ��Ŀ�� purpose.
x509cert������֤�顣
purpose
| ������ | ���� |
|---|---|
| X509_PURPOSE_SSL_CLIENT | ֤���Ƿ��������SSL���ӵĿͻ���? |
| X509_PURPOSE_SSL_SERVER | ֤���Ƿ��������SSL���ӵķ�������? |
| X509_PURPOSE_NS_SSL_SERVER | ֤���Ƿ��������Netscape SSL������? |
| X509_PURPOSE_SMIME_SIGN | ֤���Ƿ��������ǩ�� S/MIME �ʼ�? |
| X509_PURPOSE_SMIME_ENCRYPT | ��ʽ�Ƿ������������ S/MIME �ʼ�? |
| X509_PURPOSE_CRL_SIGN | ֤���Ƿ��������ǩ��֤�鳷���б�(CRL)? |
| X509_PURPOSE_ANY | ֤���Ƿ���������κ�Ŀ��? |
cainfo
cainfo Ӧ����һ�������ε� CA �ļ�/�ļ�����ɵ����飬��Certificate
Verification��������һ����
untrustedfile���ָ������Ӧ����PEM�����ļ������ƣ����ļ�����֤�飬��������������֤֤��,���ܴӸ��ļ��л�õ�֤�鲻�����Ρ�
���֤���������Ԥ��Ŀ�ģ����� TRUE,������У��� FALSE �����᷵�� -1��