The certificate CN should match the hostname/IP address you're using to access the server (If its self-signed).
Two ways to get the certificate onto the phone a) email the certificate to the phone or b) download a copy of iPhone enterprise configuration utility and import the certificate that way.
After installation a service is installed.
To acesss this service goto http://localhost:3000 and create a configuration file and email it to the phone.
iPhone 2.1 software: Exchange ActiveSync Account Quick Setup Guide
* Last Modified: September 13, 2008
* Article: HT2480 Summary
This article explains how to quickly create an Exchange ActiveSync account on your iPhone or iPod touch. Products Affected iPhone, iPod touch, iPhone 3G, iPod touch (2nd generation)
1. To add an Exchange account to your iPhone or iPod touch, tap Settings, then Mail, Contacts, Calendars, then Add Account, then Microsoft Exchange. Note, you can configure only one Exchange account per device..
2. On the next screen, enter your complete email address, domain, username, password, and a description (which may be anything you like). Ask your Exchange server administrator if you are unsure of the domain. If you are unable to view your folder list, or unable to send or receive email, leave the domain field blank.
3. Your iPhone (or iPod touch) will now try to locate your Exchange server using Microsoft's Autodiscovery service. If the server cannot be located, the screen below is shown. Enter your front-end Exchange server's complete address in the Server field. Contact your Exchange server administrator if you are unsure of the address.
Your iPhone or iPod touch will try to create a secure (SSL) connection to your Exchange server. If it cannot do this, it will try a non-SSL connection. To override the SSL setting, go into Settings, then Mail, Contacts, Calendars, select your Exchange account, tap Account Info, then toggle the Use SSL slider.
After successfully making a connection to the Exchange server, you may be prompted to change your device passcode to match whatever policies may have been set on your server.
4. Choose which type(s) of data you would like to synchronize: Mail, Contacts, and Calendars. Note that by default, only 3 days' worth of email is synchronized. To synchronize more, go into Settings, then Mail, Contacts, Calendars, select your Exchange account, and tap on Mail days to sync.
Note that after configuring an Exchange ActiveSync account, all existing contact and calendar information on the iPhone or iPod touch is overwritten. Additionally, iTunes no longer syncs contacts and calendars with your desktop computer. You can still sync your iPhone or iPod touch wirelessly with MobileMe services.