Keychain is the life blood of many applications. If you save a password in Safari it will go into your keychain. It is a secure way of ensuring that you passwords are safe. If you are particularly unlucky this may become damaged or corrupted. This can be a problem and you may be returned with error messages. However, keychain has the ability to repair itself, so if you are having problems you can at least try and solve them.
Repairing Keychain Problems
To repair keychain it first needs to be opened. Within Applications > Utilities select the Keychain Access app.
Within this app go to Keychain Access > Keychain First Aid from the menu bar.
Within the little box that is opened enter your password and press the start button. This will verify that you keychain is correct.
If there are errors the window will tell you.
You can then use the Repair option to force keychain to repair itself. Once that is complete you will have a repaired keychain.
It is a simple built in option for repairing keychain, and is very useful if you have a damaged keychain which is causing you errors.