Apple 10.6 Server User Manual


 
Chapter 3 Mail Service Advanced Conguration 71
Importing an SSL Certicate into the Keychain from the Command Line
You can import your SSL certicate into the Keychain using Keychain Access or from
the command line with certtool. To import an SSL certicate using certtool:
1 Log in to the server as root.
2 Open the Terminal application.
3 Go to the folder where the saved certicate le is located.
For example, if the certicate le is saved on the desktop of the root user, enter
cd /private/var/root/Desktop and press Return.
4 Enter the following command, and then press Return:
$ certtool i sslcert.txt k=certkc
Using certtool this way imports a certicate from the le named sslcert.txt into
the keychain named certkc.
A message conrms that the certicate was imported.
...certificate successfully imported.
5 Log out from the server.
After generating a CSR and a keychain, you continue conguring Mail service for
automatic SSL connections by purchasing an SSL certicate from a certicate authority
such as Verisign or Thawte. You can do this by completing a form on the certicate
authority’s website.
When prompted for your CSR, open the csr.txt le using a text editor, such as TextEdit.
Then, copy and paste the contents of the le into the appropriate eld on the
certicate authority’s website. The websites for these certicate authorities are at:
 www.verisign.com
 www.thawte.com
When you receive your certicate, save it in a text le named sslcert.txt. You can save
this le with the TextEdit application. Make sure that the le is plain text, not rich text,
and that it contains only the certicate text.
Accessing Server Certicates from the Command Line
Server Admin keeps a centralized store of your server’s certicates for ease of use
and management. Use certadmin to access this information from the command line.
certadmin directly manipulates the list of certicates stored in the System keychain.
To view the certicates in the System keychain: Â
$ sudo certadmin list
By default, certadmin prints the Common Name eld of each certicate separated
by newlines. Adding the option -x or --xml prints the certicate list to screen as an
XML property list (plist).