2

如何在 PHP 中验证 APNS 服务器证书是否有效?

APNS 证书是 APNS 推送证书(来自 Apple)和 PKCS12 格式的私钥的串联。如果我有私钥的密码,我可以从证书中获取信息(例如到期日期)吗?

我尝试过:

// to read the APNS certificate content
$results = array();
$is_success = openssl_pkcs12_read(file_get_contents($cert_path), $results, $password);
// then $results will contain certificate information

但是如何将 APNS 推送证书与私钥分开呢?

4

0 回答 0