这是生成 PRODUCTION 证书的正确过程吗?
openssl x509 -in aps_development.cer -inform der -out myCert.pem
openssl pkcs12 -nocerts -out myKey.pem -in myCert.p12
cat myCert.pem myKey.pem > my.pem
.. 进而:
$ctx = stream_context_create();
stream_context_set_option($ctx, 'ssl', 'local_cert', 'certificati/my.pem');
stream_context_set_option($ctx, 'ssl', 'passphrase', $passphrase);
// Open a connection to the APNS server
$fp = stream_socket_client(
'ssl://gateway.push.apple.com:2195', $err,
$errstr, 60, STREAM_CLIENT_CONNECT|STREAM_CLIENT_PERSISTENT, $ctx);