简体   繁体   English

苹果证书签署请求

[英]apple certificate signing request

I've built a dummy app and I'll like to test it on my iPhone. 我已经构建了一个虚拟应用程序,我想在我的iPhone上测试它。 I know that I need to be enrolled in apple developer program and I'm in. I don't have a MAC, so I had to rent one from macincloud[dot]com. 我知道我需要注册苹果开发者计划而且我在。我没有MAC,所以我不得不从macincloud [dot] com租用一个。

At this moment, I need to generate a signing certificate request, but I don't have access to Keychain Access utility. 此时,我需要生成签名证书请求,但我无权访问Keychain Access实用程序。 The guys from macincloud offer access to the terminal, but not to Keychain Utility. 来自macincloud的人可以访问终端,但不能访问Keychain Utility。 I know that I need to use security tool from command line, but that's all. 我知道我需要从命令行使用安全工具,但这就是全部。

After 6 hours on two different days, I didn't find any tutorial/description about how to use the security tool in order to generate the signing certificate request. 在两天不同的6小时后,我没有找到任何关于如何使用安全工具来生成签名证书请求的教程/说明。

Do you have any idea about what do I need to do in command line to generate a signing certificate request? 您是否知道在命令行中我需要做什么来生成签名证书请求?

Run the following in the terminal: 在终端中运行以下命令:

openssl genrsa -out mykey.key 2048

Save this private key file as you will use it later. 保存此私钥文件,稍后您将使用它。

Run the following command, replacing the e-mail address, CN (certificate name), and C (country) values with your own: 运行以下命令,将您自己的电子邮件地址,CN(证书名称)和C(国家/地区)值替换为:

openssl req -new -key mykey.key -out CertificateSigningRequest.certSigningRequest -subj "/emailAddress=yourAddress@example.com, CN=John Doe, C=US"

Now in iOS Dev Portal, just use the generated CertificateSigningRequest.certSigningRequest 现在在iOS开发门户中,只需使用生成的CertificateSigningRequest.certSigningRequest

If you are doing this for Apple Push / APNS, you will also want to know about these 2 additional commands to generate the needed .p12 file: 如果您正在为Apple Push / APNS执行此操作,您还需要了解这两个附加命令以生成所需的.p12文件:

openssl x509 -in XXXXX.cer -inform DER -out XXXXX.pem -outform PEM
openssl pkcs12 -export -inkey XXXXX.key -in XXXXX.pem -out XXXXX.p12 

where XXXXX is your "mykey" value and the xxxxx.cer file is what you download from the Apple portal. 其中XXXXX是您的“mykey”值,xxxxx.cer文件是您从Apple门户网站下载的文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM