wordpress-mobile/WordPress-iOS — pull request #342 by koke (2013-11-07 13:43:36+00:00)
Title: Updated SFHFKeychainUtils

I got a crash running the tests when WPAccount passed a nil error.

I updated the code to match the latest pod, then added back our `kSecAttrAccessible` changes.

The getter method is also aware of `kSecAttrAccessible` now, which might fix some problems:

- storeUsername: would call getPasswordForUsername: first to see if it’s a new password or needs update
- if a valid password was found it’ll be returned even if it used anything other than kSecAttrAccessibleAfterFirstUnlock
- storeUsername: specifies kSecAttrAccessibleAfterFirstUnlock in the query for SecItemUpdate, so the password wouldn’t be updated

This shouldn’t really be a problem after the keychain fix on the app delegate, but it’s more correct. And the fix is meant to be temporary anyway.