ios 将私钥添加到证书,反之亦然

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/5989368/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-30 19:54:28  来源:igfitidea点击:

Add private key to certificate or vice versa

ioscertificatersakeychain

提问by NicTesla

the problem is, that I want to create a new private/public key pair for a new App.

问题是,我想为新应用程序创建一个新的私钥/公钥对。

So i followed the documentation (http://developer.apple.com/ios/manage/certificates/team/howto.action) and it said to first created a new key pair.

所以我遵循了文档(http://developer.apple.com/ios/manage/certificates/team/howto.action),它说首先创建了一个新的密钥对。

Ok, than i got a certificate signing request file, which i had to upload to the developer homepage (Certificate > Developement). There I found out, that (and because) we allready have an app in the appstore, there is allready a certificate. So i downloaded the existing one and doubleclicked it in the finder. The keychain opended, but didn't append the certificate to the newly created private key (as i expacted).

好的,我得到了一个证书签名请求文件,我必须将其上传到开发人员主页(证书 > 开发)。在那里我发现,(并且因为)我们在应用商店中已经有了一个应用,所以已经有了一个证书。所以我下载了现有的并在查找器中双击它。钥匙扣opended,但证书到新创建的私有密钥没有追加(我expacted)。

What did I do wrong? What do i have to do, to activate this key pair?

我做错了什么?我该怎么做才能激活这个密钥对?

Can someone help me in this issue?

有人可以帮助我解决这个问题吗?

Thanks Br Nic

谢谢 Br Nic

回答by Udayakumar Rayala

Every certificate will have a public and private key. And also if you are talking about the developer certificate, every developer account can have only one certificate.

每个证书都有一个公钥和私钥。而且,如果您在谈论开发者证书,则每个开发者帐户只能拥有一个证书。

What you get to download from the apple website is only your public key. You need the private key to sign the apps. Your private key will be in the machine where you generated the CSR.

你从苹果网站下载的只是你的公钥。您需要私钥来签署应用程序。您的私钥将在您生成 CSR 的机器中。

Check the "Saving your Private Key and Transferring to other Systems" section in http://developer.apple.com/ios/manage/certificates/team/howto.actionto find out how to export your private key from that machine and use it in a different machine.

检查http://developer.apple.com/ios/manage/certificates/team/howto.action 中的“保存您的私钥并传输到其他系统”部分,了解如何从该机器导出您的私钥并使用它在不同的机器上。

If you cannt get the machine where you generated the CSR, then you can revoke the existing one and generate a new one. But remember that this will make the existing profiles generated from this certificate invalid.

如果你cannt得到你生成CSR的机器,那么你可以撤销现有的一个,并产生一个新的。但请记住,这将使从此证书生成的现有配置文件无效。

回答by Flea

I was having the same problem and I had to delete all my provisioning profiles and existing certificates and then I followed the step-by-step instructions from this article:

我遇到了同样的问题,我不得不删除我所有的配置文件和现有证书,然后我按照本文中的分步说明进行了操作:

Creating Your Signing Certificatesby Apple and it had me up and running in 5 minutes after hours of banging my head!

由 Apple创建您的签名证书,它让我在 5 分钟内启动并运行了数小时的敲击声!