Keychain integration is broken in Safari

keychainsafari

My Safari isn't updating passwords anymore. It was working fine until recently. Safari is still populating the username and passwords. In the case where my password for the web app has changed I type my new password. Safari prompts me to update the password (in case it's a domain password it asks to update all).
Even though I confirm, the password change is not reflected. E.g. if I quit Safari and browse to the same website it's again the wrong (old) password and if I look in keychain the password is indeed not updated.

Here is what I see in the logs (Console). I wonder if it has something to do with it?

06/01/15 12:12:12,549 secd[374]:  securityd_xpc_dictionary_handler Safari[35819] copy_matching The operation couldn’t be completed. (com.apple.security.cfder.error error -1 - Invalid date.)
06/01/15 12:12:12,549 Safari[35819]:  SecOSStatusWith error:[-26275] The operation couldn’t be completed. (com.apple.security.cfder.error error -1 - Remote error : The operation couldn‚Äôt be completed. (com.apple.security.cfder.error error -1 - Invalid date.))

What would invalid date indicate here? My system has 'set date and time automatically' checked.

Keychain first aid didn't report any problems

I checked out these similar thread but they don't apply / didn't solve my issue:
Safari stopped using keychain
Broken login.keychain, what now?

Best Answer

The problem is solved. Unfortunately I've done so many things that I don't know what solved it.

Here are some things I did. These steps should be safe but in any case before starting either make sure your time backup is on and/or make a backup of your Keychains folder in ~/Library:

  • Remove / re-add the keychains
  • I disabled iCloud and re-enabled it again (and rebooted in the mean time) (I suspect this was part of the solution)
  • I cleared Safari history data (although I'm pretty sure this didn't have any effect)
  • I toggled the Safari preferences to remember passwords (for sure this was not the solution but might have helped in combination with iCloud reset)

Some things I did but where you should be a bit more cautious about:

  • In ~/Library/Keychains: I deleted a folder called F1090786-29BB-5136-A02B-7266FEF0DD9A (actually moved to tmp location) (found somewhere on the apple community sites)
  • I removed ~/Library/Preferences/com.apple.security.plist (again: I actually moved it away)