【问题标题】:Creating Apple PEM certificate and RSA private key from .p12 and .cer从 .p12 和 .cer 创建 Apple PEM 证书和 RSA 私钥
【发布时间】:2013-07-05 19:51:07
【问题描述】:

我正在尝试从我拥有的两个文件中检索证书和 RSA 私钥: certificate.cer 和 key.p12

我尝试使用以下命令获取它们:

证书

openssl x509 -in certificate.cer -inform der -out certificate.pem

RSA

openssl pkcs12 -in key.p12 -nocerts -nodes -passin pass:123456 | openssl rsa -out key.pem

我尝试这样测试:

openssl s_client -connect gateway.sandbox.push.apple.com:2195 
-cert certificate.pem -key key.pem

我得到这个错误:

140553388308128:error:0B080074:x509 certificate routines:X509_check_private_key:key values mismatch:x509_cmp.c:331:

我做错了什么?

【问题讨论】:

    标签: openssl certificate rsa pem


    【解决方案1】:

    查看此链接,逐步说明您需要执行的所有操作。本教程是我让推送通知正常工作的唯一方法:

    http://blog.serverdensity.com/how-to-build-an-apple-push-notification-provider-server-tutorial/

    它解释了推送通知的工作原理,甚至向您展示了一些用于发送推送的 php 代码,但我认为证书部分是您正在寻找的。​​p>

    祝你好运!

    【讨论】:

      猜你喜欢
      • 2016-02-29
      • 1970-01-01
      • 1970-01-01
      • 2020-06-30
      • 1970-01-01
      • 2017-07-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多