I have listed a few steps that can cause this exact same type of issue you are referring to.
Invalid or incorrect Certificates
Use the following steps to reset the cache of accepted certificates.
1. Open the Finder.
2. Choose Go to Folder from the Go menu.
3. Type /var/db/crls/ in the Go window then click Go.
4. Delete crlcache.db and ocspcache.db by dragging these files to the Trash.
- Enter an administrator password if you are prompted.
5. Restart the system and test for the issue.
Keychain Certificate settings
Confirm that Keychain Access has the proper settings for the user.
Part 1:
- Launch Keychain Access
- Open Keychain Access > Preferences
- Select the ‘Certificates' tab
- Set 'Online Certificate Status Protocol' to (Best Attempt)
- Set 'Certificate Revocation List' to (Best Attempt)
- Set ‘Priority' to (OCSP)
- Close the Preferences
- Continue to part 2 below
Part 2:
- Select Certificates from the left hand column under Category back in Keychain Access
- Type Class into the search field in the top right corner of the Keychain Access window and press return.
- Look through the list of results for any certificates that have a blue + over the icon.
- Double-click on a certificate that has the blue + over the icon to ‘Get info’ on the certificate.
- Click the disclosure triangle to the left of the word Trust to reveal the certificates permissions.
- Change Secure Sockets Layer (SSL): to ‘No Value Specified’ then close the window.
- Confirm the Administrator password in the window that will appear.
- Double-click on the same certificate that was opened in step 5.
- Again Click the disclosure triangle to the left of the word Trust to reveal the certificates permissions.
- Change When using this certificate: to ‘Use System Defaults’ then close the window.
- Again confirm the Administrator password in the window that will appear.
- Repeat steps 5 through 12 for any certificates that have a blue + over the icon. (Generally there are only one or two that will need to be edited.)
- Restart the system and test for the issue.
Potential bad data with user Keychains
If the issue has been isolated to a single user, and a brand new test user account can sign in just fine we might have bad data in the affected user's keychain file, and that's keeping you at that point from being able to use the service. To correct the issue, we're going to need to try manually removing the bad keys.
We're going to need to try manually removing the bad keys. Let's try the following:
1. Open Keychain Access, located in the Utilities folder.
2. Select the Login keychain from the Keychains list in the upper-left corner of the Keychain Access window.
3. Select All Items in the bottom left corner of the Keychain Access window.
4. Search for any "Application Password" entries that contain "IDS:" and remove them.
5. Search for any "Application Password" entries that contain FaceTime and remove them.
6. Search for the term "iMessage"; there should be an iMessage signing key and an iMessage encryption key. Remove both.
7. Restart the computer.
8. Sign back in to iMessage or FaceTime and be sure the app is working normally.
If we're still seeing the same issue even after deleting these individual keys, we may be looking at a bigger issue with the keychain file itself, and will need to try resetting it. Note that resetting the keychain file means the computer is going to forget about any previously saved passwords, and they will need to be entered again. So you may want to run Keychain Access ahead of time and recover any passwords you don't remember.
1. Launch Keychain Access
2. Go to Keychain Access > Preferences > General
3. Click 'Reset my Default Keychain'.
4. Restart the computer,
5. Make sure iMessage / FaceTime are working correctly at this point.
OS X 10.8.5 or earlier
If the issue continues and the Mac is using OS X 10.8.5 or earlier, there might be an issue with one of the following related preference files. Move either of the two following files to the desktop, then restart the computer and try signing in again:
/Library/Preferences/com.apple.applepushserviced.plist
/Library/Preferences/com.apple.apsd.plist
If the issue persists, other software may be running on the Mac that is affecting the connection. Try temporarily disabling any security, firewall, or networking software they may be running and then try again.
**If no one yet mentioned it, you can also reset the jabber service as well. See below:
Reset the jabberd service:
Type in Terminal, pressing 'Return' after each line:
sudo serveradmin stop jabber
sudo rm /private/var/run/jabberd/*.pid /Library/Preferences/com.apple.messageserver.plist
sudo rm -rf /Library/Server/Messages/*
sudo /Applications/Server.app/Contents/ServerRoot/usr/libexec/copy_message_server_co nfig_files.sh
sudo launchctl load -w /Applications/Server.app/Contents/ServerRoot/System/Library/LaunchDaemons/org.j abber.jabberd.plist
sudo serveradmin start jabber
Reset your Messages app, including your keychain entries:
remove ~/Library/Preferences/com.apple.iChat.*
Keychain Access>Search for and delete all jabber accounts.