Apple Push Notification in Production Environment : Unable to get local issuer certificate

吃可爱长大的小学妹 提交于 2020-01-15 10:54:27

问题


I applied APNS push notification in my server using Push development certificate for my App. It works fine until I try to change the certificate to Push production certificate.

I try to test the connection with :

openssl s_client -connect gateway.push.apple.com:2195 -cert myCert.pem -key myKey.pem

After I enter a correct password, a summary is displayed :

New, TLSv1/SSLv3, Cipher is AES256-SHA
Server public key is 2048 bit
Secure Renegotiation IS supported
Compression: NONE
Expansion: NONE
SSL-Session:
    Protocol  : TLSv1
    Cipher    : AES256-SHA
    Session-ID:
    Session-ID-ctx:
    Master-Key: FB8BCFEA572E9C75330E15C11945D35F681C9561136FB0FCA42C9FE3E96E1E73E7D4EF255CC1AE94AF947D69D3CEEFC7
    Key-Arg   : None
    Start Time: 1342426207
    Timeout   : 300 (sec)
    Verify return code: 20 (unable to get local issuer certificate)

However, in my local computer, the same command returns :

New, TLSv1/SSLv3, Cipher is AES256-SHA
Server public key is 2048 bit
Secure Renegotiation IS supported
Compression: NONE
Expansion: NONE
SSL-Session:
    Protocol  : TLSv1
    Cipher    : AES256-SHA
    Session-ID: 
    Session-ID-ctx: 
    Master-Key: A08BDD17603F062305F47EBC36B55DC03CED501B6C03CFBDEFFB519E5F1586DF2CCC689816AA0C18C19931D7FE2DF85F
    Key-Arg   : None
    Start Time: 1342422311
    Timeout   : 300 (sec)
    Verify return code: 0 (ok)

What did I miss ? Did I need to config something in my PHP codes ?

I suspect I have to install the intermediate Apple Worldwide Developer Authority Certificate in my Ubuntu server, but not quite sure.

来源:https://stackoverflow.com/questions/11500684/apple-push-notification-in-production-environment-unable-to-get-local-issuer-c

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!