无法加载客户端证书私钥文件 [英] Unable to load client certificate private key file

查看:64
本文介绍了无法加载客户端证书私钥文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法创建 Apple 推送通知证书文件.当我测试 .pem 文件时出现错误.

I am unable to create Apple Push Notification cert files. When I test .pem files I get an error.

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

会报错:

无法加载客户端证书私钥文件140735327015760:error:0906D06C:PEMroutines:PEM_read_bio:no start line:pem_lib.c:703:Expecting: ANY PRIVATE KEY

我正在遵循以下说明:https://github.com/raix/push/wiki/iOS-Micro-Walkthrough

pushapp_cert_dev.pem

-----BEGIN CERTIFICATE-----
MIIFiTCCBHGgAw...ff6eVQDZV4=
-----END CERTIFICATE-----

pushapp_key_dev.pem

Bag Attributes
    friendlyName: pushApp
    localKeyID: EB 91 B3 CD A0 F5 9A 56 46 96 43 24 C8 B0 A7 56 62 01 9E 2C 
Key Attributes: <No Attributes>

两个文件都在同一个位置.

Both files are in the same location.

推荐答案

当我创建 .pem 文件时,我只需要在出现提示时输入密码(最少 4 个字符).首先,我只是跳过它,因为我不想创建密码.它不会给出任何错误或以其他方式通知需要密码短语,它实际上会创建一个无效的 .pem 文件.

When I created the .pem file, I simply needed to enter passphrase (min 4 char) when prompted. First, I just skipped it because I didn't want to create passphrase. It doesn't give any error or otherwise inform that passphrase is required and it actually creates a non working .pem file.

这篇关于无法加载客户端证书私钥文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆