How to obtain Certificate Signing Request

157,276

Solution 1

Since you installed a new OS you probably don't have any more of your private and public keys that you used to sign your app in to XCode before. You need to regenerate those keys on your machine by revoking your previous certificate and asking for a new one on the iOS development portal. As part of the process you will be asked to generate a Certificate Signing Request which is where you seem to have a problem.

You will find all you need there which consists of (from the official doc):

1.Open Keychain Access on your Mac (located in Applications/Utilities).

2.Open Preferences and click Certificates. Make sure both Online Certificate Status Protocol and Certificate Revocation List are set to Off.

3.Choose Keychain Access > Certificate Assistant > Request a Certificate From a Certificate Authority.

Note: If you have a private key selected when you do this, the CSR won’t be accepted. Make sure no private key is selected. Enter your user email address and common name. Use the same address and name as you used to register in the iOS Developer Program. No CA Email Address is required.

4.Select the options “Saved to disk” and “Let me specify key pair information” and click Continue.

5.Specify a filename and click Save. (make sure to replace .certSigningRequest with .csr)

For the Key Size choose 2048 bits and for Algorithm choose RSA. Click Continue and the Certificate Assistant creates a CSR and saves the file to your specified location.

Solution 2

Follow these steps to create CSR (Code Signing Identity):

  1. On your Mac, go to the folder 'Applications' ► 'Utilities' and open 'Keychain Access.'

    enter image description here

  2. Go to 'Keychain Access' ► Certificate Assistant ► Request a Certificate from a Certificate Authority. 

    enter image description here

  3. Fill out the information in the Certificate Information window as specified below and click "Continue."
    • In the User Email Address field, enter the email address to identify with this certificate
    • In the Common Name field, enter your name
    • In the Request group, click the "Saved to disk" option 

    enter image description here

  4. Save the file to your hard drive.

    enter image description here


Use this CSR (.certSigningRequest) file to create project/application certificates and profiles, in Apple developer account.

Solution 3

To manually generate a Certificate, you need a Certificate Signing Request (CSR) file from your Mac. To create a CSR file, follow the instructions below to create one using Keychain Access.

Create a CSR file. In the Applications folder on your Mac, open the Utilities folder and launch Keychain Access.

Within the Keychain Access drop down menu, select Keychain Access > Certificate Assistant > Request a Certificate from a Certificate Authority.

In the Certificate Information window, enter the following information: In the User Email Address field, enter your email address. In the Common Name field, create a name for your private key (e.g., John Doe Dev Key). The CA Email Address field should be left empty. In the "Request is" group, select the "Saved to disk" option. Click Continue within Keychain Access to complete the CSR generating process.

Share:
157,276

Related videos on Youtube

John Bowlinger
Author by

John Bowlinger

Updated on September 14, 2020

Comments

  • John Bowlinger
    John Bowlinger over 3 years

    How do I obtain a Certificate Signing Request? All I'm trying to do is get my app running on my ipod touch. This was easy as I could just go to the IOS development portal and just download one, no muss no fuss. But now they want me to create a CSR to create a provisioning profile and I don't know how. I've been derping around in Keychain Access and the online documents for the better part of two hours and I'm still completely lost.

    I'm not even sure why I need one now when I didn't before. I had a provisioning profile before I recently switched from Snow Leopard to Mountain Lion, but now it won't take it. Yes, I'm still on the same computer.

  • NoBugs
    NoBugs over 9 years
    This answer doesn't really say how to generate a cert signing request. It says Mac keychain does it for you.
  • Owen Beresford
    Owen Beresford over 8 years
    The "there" is dead, apple seem to have killed off alot of docs recently.
  • tiguero
    tiguero over 6 years
    @KenanKarakecili this is part of this doc: developer.apple.com/library/content/documentation/IDEs/…
  • Siempay
    Siempay over 6 years
    I get an error about not valid username or secret phrase
  • AlejandroDG
    AlejandroDG about 6 years
    Thanks mate, this saved certificate is the one apple/developer ask for generate a CSR file right?
  • Giorgio Tempesta
    Giorgio Tempesta over 5 years
    In Keychain Access v.10 (on High Sierra) there is not a "Certificates" tab in the Preferences
  • Major MacGregor
    Major MacGregor over 5 years
    Getting an error: The specified item could not be found in the keychain
  • Cassio Seffrin
    Cassio Seffrin almost 4 years
    @Krunal Do you know if it's possible to specify a long expiration time instead the default one year?