当前位置:   article > 正文

APNS证书制作问题_unable to load client certificate private key file

unable to load client certificate private key file

aps_development.cer(苹果官网制作)

apns-dev-cert.p12(从钥匙串证书Apple Push Services导出)

apns-dev-key.p12(从钥匙串证书下拉的秘钥导出)

三个证书搞好之后,终端CD到以上证书所在文件夹,

  1. openssl pkcs12 -clcerts -nokeys -out apns-dev-cert.pem -in apns-dev-cert.p12
  2. openssl pkcs12 -nocerts -out apns-dev-key.pem -in apns-dev-key.p12
  3. cat apns-dev-cert.pem apns-dev-key.pem > apns-dev.pem

连续执行以上三行代码,期间需要输入密码,和pass phrase,

注意:密码是导出p12时的密码,pass phrase位数尽量多,位数太少制作的key.pem无法使用。6位即可

验证证书:

bogon:~ lcm$ openssl s_client -connect gateway.sandbox.push.apple.com:2195 -cert apns-dev.pemEnter pass phrase for apns-dev.pem:

或者:bogon:~ lcm$ openssl s_client -connect gateway.sandbox.push.apple.com:2195 -cert apns-dev-cert.pem -key apns-dev-key-noenc.pem -debug -showcerts -CAfile “apns-dev.pem”

Error opening client certificate private key file apns-dev-key-noenc.pem

140736230040456:error:02001002:system library:fopen:No such file or directory:/BuildRoot/Library/Caches/com.apple.xbs/Sources/libressl/libressl-22/libressl/crypto/bio/bss_file.c:255:fopen('apns-dev-key-noenc.pem', 'r')

140736230040456:error:20074002:BIO routines:FILE_CTRL:system lib:/BuildRoot/Library/Caches/com.apple.xbs/Sources/libressl/libressl-22/libressl/crypto/bio/bss_file.c:257:

unable to load client certificate private key file

以上问题就是pass phrase位数太少引起。

 

如果能对您有帮助,请帮忙点赞!

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/从前慢现在也慢/article/detail/525928
推荐阅读
相关标签
  

闽ICP备14008679号