soffes/sskeychain — pull request #54 by eahrold (2013-12-16 22:37:25+00:00)
Title: Added Methods for Changing The Keychain Password.

Added two new methods to SSKeychain
```objective-c
+ (BOOL)changeDefaultKeychainPassword:(NSString*)currentPassword to:(NSString*)newPassword;
+ (BOOL)changePasswordForKeychain:(NSString*)keychain from:(NSString*)currentPassword to:(NSString*)newPassword;
```

Added four properties SSKeychainQuery
```objective-c
@property (nonatomic, copy) NSString *keychain;
@property (nonatomic, copy) NSString *keychainPassword;
@property (nonatomic, copy) NSString *keychainPasswordNew;
@property int keychainPreferenceDomain;
```

I also wired up the SSKeyChainQuery method to allow for setting a specific keychain
So now if you want to modify keychains other than the default one you could something like this

```objective-c
SSKeychainQuery *query = [[SSKeychainQuery alloc]init];
query.account = @"myacct";
query.password = @"mypass";
query.service = @"myservice";
query.keychain = @"altKeychain";
/* or */
query.keychain = @"/User/username/Library/Keychains/altKeychain.keychain";
[query save:&error];
```
This would be easy enough to add to the SSHKeychain Class, but I debated wether it would start to make it cluttered, so I leave it up to you as the architect. Let me know and I'll do another pull request with that code.

I also built out the SSKeychainQuery's Private query method with an error pointer in order to catch any Sec failures that happened when determining the keychain. The query now returns NULL if a keychain was specified but cannot be found, so other methods now do a check immediately after the query and return NO on failure

Also included is an Target.app with simple example code, as well as XCTests for os X.