Root Certificate Authority to Sign Server SSL

I'd like to use Keychain Access>Certificate Assistant to create my own private root CA that I can use to sign OS X Lion Server's SSL Certificate (rather than using a commercial CA). It's easy to use the Server app to generate a CSR, but I've been unsuccessful prodding Keychain access to create a root CA that will accept this CSR and create a signed certificate.


Does anyone know how to (or a link to) the correct steps to use Keychain Access>Certificate Assistant to:


  1. Create a root CA
  2. Sign the .csr created by the Server app
  3. Export the newly signed cert from Kerchain Access and import using the Server app
  4. Set up another computer/iOS device to trust the root CA created in step 1.


Right now, I'm failing on step 2 with Keychain Access>Certificate Assistant>Create a Certificate for Someone Else as a Certificate Authority... and get the error message


> Could not find the issuer for the Certificate Authority configuration file “MyServer root CA”.

Mac mini, Mac OS X (10.7.1), 8 GB

Posted on Nov 27, 2011 4:34 AM

Reply
6 replies

Mar 26, 2012 8:00 PM in response to realzcubed

I am not sure if this will help anyone here, but I wanted to reply to a similar thread that had been archived, where a user wanted to export the Open Directory Certificate Authority and use it on another Mac.


Anyways, I was having the exact same issue creating a Certificate Authority as everyone here is. How I ultimately was able to create a Certificate Authority was by using the Certificate Authorities created by the Open Directory Master configuration process. That process creates a self-signed CA and an intermediate CA. The files that contain the certificate authorities are located in the root user's home directory at this exact location (given that you have not changed the location of the root user's home directory):

/var/root/Library/Application Support/Certificate Authority/


There will be two directories within this directory, those two directories should contain a .pem file which contains the public certificate for the Root CA, and a .certAuthorityConfig file. If you open the Keychain Access application, unlock the System keychain, then goto Keychain Access -> Certificate Assistant -> Set the default certificate authority.... Most likely the list in the Certificate Assistant will be blank, so click Add a Certificate Authority, choose the .certAuthorityConfig file (choose the Root CA cert config file), it will add that certificate authority to the list, and click Continue, it should say it successfully set the default CA, and then click done.


If you have already created a Certificate Authority and you want to export it and import it onto another Mac OS X machine, login as the User that created the Certificate Authority, open Finder, click on the Go Menu while holding down the alt (option) key. This will bring up the Library directory. Open the User's Library, and navigate to (keep in mind you're current relative directory is ~/Library/):


~/Library/Application Support/Certificate Authority/


Copy the two files that are contained in the folder inside the Certificate Authority folder, the inner folder will be named after the Certificate Authority's CN (Common Name). Put those two files on the machine you wish to import the certificate authority, and repeat the process above for setting the default certificate authority.


There are a few other ways to import the Certifcate Authority, but this is just the easiest way.

Feb 9, 2012 4:01 AM in response to Xenolith

I was able to solve the specific problem of getting a CA to trust for my server's SSL cert, but not the general problem outlined above. See the discussion "How To Install A (Almost) Working Lion Server With Profile Management/SSL/OD/Mail/iCal/Address Book/VNC/Web/etc." for the gory details.


  • C. Get Apple Push Notification Services CA via Server.app>Hardware>Settings><Click toggle, Edit... get a new cert ...>
  • D. Server.app>Profile Manager>Configure... [Magic script should create OD Master, signed SSL cert]
  • E. Server.app>Hardware>Settings>SSL Certificate> [Check to make sure it's set to the one just created]
  • F. Using Server.app, turn on the web, then Server.app>Profile Manager> [Click on hyperlink to get to web page, e.g. server.domain.com/profilemanager] Upper RHS pull-down, install Trust Profile
  • G. Keychain Access>System>Certificates [Find the automatically generated cert "Domain", the one that is a "Root certificate authority", Highlight and Export as .cer, email to all iOS devices, and click on the authority on the device. It should be entered as a trusted CA on all iOS devices. While you're at it, highlight and Export... as a .cer the certificate "IntermediateCA_SERVER.DOMAIN.COM_1", which is listed an an "Intermediate CA" -- you will use this to establish secure SSL connections with remote browsers hitting your server.]


In general, I'm still bump up against how OS X handles certificates, especially with S/MIME and Mail -- everything is done under the hood, and there is no way to troubleshoot when it fails. I principle, there's some equivalent openssl command line for every Keychain GUI operation -- it would be very helpful to know what these openssl commands are to fix problems that arise with SSL on OS X.

Nov 27, 2011 10:11 AM in response to realzcubed

Another error in step 2:


  • Keychain Access>Certificate Assistant>Create a Certificate for Someone Else as a Certificate Authority...
  • Drag the CSR here.. <Do it>... Continue
  • Error: Could not find the issuer for the Certificate Authority configuration file “MyServer root CA”. <OK>
  • Issuing CA: Let me choose, Continue. <Choose the automatically generated Intermediate CA created by Server app in System.keychain> Continue.
  • Finishing up... “An error occurred”

    Unknown error -2147416032


Any pointers on the correct steps and/or settings to create the root CA and sign Server's SSL csr would be greatly appreciated. Keychain Access isn't just working with the default settings.

Jan 8, 2012 10:55 PM in response to realzcubed

I too am having this problem, I do not understand PKI well enough to know what the correct order of steps to take and what options I want to use. I have been doing a lot of trial and error because I can't seem to find a good resource that describes the technology in terms of my use cases. I understand it to a certain extent but there are a lot of gaps in my knowledge that create fail points, and I can't find a good comperehensive resource that is able to bring all everything together. Would love it if someone could point me to one.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Root Certificate Authority to Sign Server SSL

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.