Search code examples
iosxcodemacoskeychainprovisioning-profile

Can't create CSR from private certificate. An Error Occurred. The specified item could not be found in the keychain


I've imported a public and private certificate from another Mac and I'm now trying to create a Certificate Signing Request (CSR) with that private certificate. When I right-click on the private certificate and/or use Keychain Access -> Certificate Assistant -> Request a Certificate From a Certificate Authority With "", I get an error at the end of the assistant process that says "The specified item could not be found in the keychain." (see screenshots)

Before anyone naively suggests that I shouldn't have the private cert selected and should instead just create a CSR without that private certificate -- that's not what I want. I'm attempting to create a new certificate that uses the same private cert -- that's the point of the exercise and the reason for the question.

I've tried everything I can think of to make sure the Keychain and certs have permissions, are not corrupt, etc, but I'm stumped.

This works perfectly fine on the Mac that created the certificate, just not on the Mac that imported the certificate. I'm also having problems with my Xcode/iOS apps crashing immediately on launch and I think it is related to this issue as well.

BTW, if it matters, the cert was created on a Mac with macOS Sierra and it was imported on a Mac with El Captain.

Keychain Error


Solution

  • As described in this solution, you can use openssl to generate .csr file.