@@ -37,6 +37,8 @@ var_dump(openssl_x509_checkpurpose($sert, X509_PURPOSE_SMIME_SIGN));
3737var_dump (openssl_x509_checkpurpose ($ sert , X509_PURPOSE_SMIME_ENCRYPT ));
3838var_dump (openssl_x509_checkpurpose ($ sert , X509_PURPOSE_CRL_SIGN ));
3939var_dump (openssl_x509_checkpurpose ($ sert , X509_PURPOSE_ANY ));
40+ var_dump (openssl_x509_checkpurpose ($ sert , X509_PURPOSE_OCSP_HELPER ));
41+ var_dump (openssl_x509_checkpurpose ($ sert , X509_PURPOSE_TIMESTAMP_SIGN ));
4042
4143/* int openssl_x509_checkpurpose ( mixed $x509cert , int $purpose [, array $cainfo = array() ] ); */
4244var_dump (openssl_x509_checkpurpose ($ cert , X509_PURPOSE_SSL_CLIENT , array ($ cpca )));
@@ -60,6 +62,8 @@ var_dump(openssl_x509_checkpurpose($sert, X509_PURPOSE_SMIME_SIGN, array($cpca))
6062var_dump (openssl_x509_checkpurpose ($ sert , X509_PURPOSE_SMIME_ENCRYPT , array ($ cpca )));
6163var_dump (openssl_x509_checkpurpose ($ sert , X509_PURPOSE_CRL_SIGN , array ($ cpca )));
6264var_dump (openssl_x509_checkpurpose ($ sert , X509_PURPOSE_ANY , array ($ cpca )));
65+ var_dump (openssl_x509_checkpurpose ($ sert , X509_PURPOSE_OCSP_HELPER , array ($ cpca )));
66+ var_dump (openssl_x509_checkpurpose ($ sert , X509_PURPOSE_TIMESTAMP_SIGN , array ($ cpca )));
6367
6468/* int openssl_x509_checkpurpose ( mixed $x509cert , int $purpose [, array $cainfo = array() [, string $untrustedfile ]] ); function */
6569var_dump (openssl_x509_checkpurpose ($ cert , X509_PURPOSE_SSL_CLIENT , array ($ cpca ), $ utfl ));
@@ -83,6 +87,8 @@ var_dump(openssl_x509_checkpurpose($sert, X509_PURPOSE_SMIME_SIGN, array($cpca),
8387var_dump (openssl_x509_checkpurpose ($ sert , X509_PURPOSE_SMIME_ENCRYPT , array ($ cpca ), $ utfl ));
8488var_dump (openssl_x509_checkpurpose ($ sert , X509_PURPOSE_CRL_SIGN , array ($ cpca ), $ utfl ));
8589var_dump (openssl_x509_checkpurpose ($ sert , X509_PURPOSE_ANY , array ($ cpca ), $ utfl ));
90+ var_dump (openssl_x509_checkpurpose ($ sert , X509_PURPOSE_OCSP_HELPER , array ($ cpca ), $ utfl ));
91+ var_dump (openssl_x509_checkpurpose ($ sert , X509_PURPOSE_TIMESTAMP_SIGN , array ($ cpca ), $ utfl ));
8692?>
8793--EXPECT--
8894bool(false)
@@ -113,6 +119,8 @@ bool(false)
113119bool(false)
114120bool(false)
115121bool(false)
122+ bool(false)
123+ bool(false)
116124int(-1)
117125int(-1)
118126int(-1)
@@ -127,6 +135,8 @@ bool(true)
127135bool(true)
128136bool(true)
129137bool(true)
138+ bool(true)
139+ bool(false)
130140bool(false)
131141bool(false)
132142bool(false)
@@ -148,3 +158,5 @@ bool(true)
148158bool(true)
149159bool(true)
150160bool(true)
161+ bool(true)
162+ bool(false)
0 commit comments