Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to associate private key with a certificate in keychain

I just downloaded iphone sdk 4. when I try to install on the device I get

"Code Sign error: The identity 'iPhone Developer' doesn't match any valid certificate/private key pair in the default keychain"

I have gone through the process of creating a provisioning profile and cert through iphone Development Provisioning Assistant. However, after installing the profile and cert the assistant asks to check whether public and private key are paired (surprisingly, it shows a pic of what seems to be a private key and cert being paired, i.e. the cert is 'under' private key in hierarchical terms. This is not the case in my keychain. Public key, private key and cert are there but there doesn't seem to be any associations.

Does anyone know how to pair a private key and certificate in keychain please this please?

ps. I have checked this thread but I'm hoping there's an easier way.

iPhone app signing: A valid signing identity matching this profile could not be found in your keychain

like image 657
Remover Avatar asked Jun 28 '10 17:06

Remover


People also ask

How do I add a private key to my Mac?

Click on "Certificates" under the "iOS Apps" section. Expand the Certificates section on the left, select Distribution, and click on your distribution certificate. Click Revoke and follow the instructions. Click on the plus sign to add a new certificate.

How do I trust certificates in keychain on Mac?

In the Keychain Access app on your Mac, select a keychain from one of the keychains lists, then double-click a certificate. Next to Trust, click the arrow to display the trust policies for the certificate. To override the trust policies, choose new trust settings from the pop-up menus.

How do I add a trusted certificate on a Mac?

Trusting a SSL Certificate on Mac OSDrag and Drop the certificate icon and place the certificate on your desktop. You should see a new icon on your desktop after you release your mouse. Double Click the certificate on your desktop to add the certificate to the System keychain.


1 Answers

I wrote a wiki page (here) that describes how to export your certificate and private key pair. It's intended for my iOS development clients to send me their ad-hoc, but I believe it will solve your problem, too. The key is to make sure that you export the certificate and private-key PAIR all in one go -- not as two separate exports.

Hopefully, the screenshot near the bottom of that page will help out.

like image 126
Olie Avatar answered Oct 07 '22 00:10

Olie