Permalink
Browse files

+ck2_credentialWithUser:keychainItem:

  • Loading branch information...
1 parent a1e65e3 commit d96fca41ac131a0b1cbaaf9c429a33151b74607c @mikeabdullah mikeabdullah committed Sep 20, 2012
Showing with 9 additions and 0 deletions.
  1. +4 −0 CK2SSHCredential.h
  2. +5 −0 CK2SSHCredential.m
View
@@ -23,6 +23,10 @@
+ (NSURLCredential *)ck2_credentialWithUser:(NSString *)user service:(NSString *)service;
+// For general use, creates a credential backed by a keychain item
+// When first requested, -password is cached. It's backing store is carefully managed to use keychain's cleanup routines when no longer in use
++ (NSURLCredential *)ck2_credentialWithUser:(NSString *)user keychainItem:(SecKeychainItemRef)item;
+
- (BOOL)ck2_isPublicKeyCredential;
// These will be nil when using ssh-agent
View
@@ -203,6 +203,11 @@ + (NSURLCredential *)ck2_credentialWithUser:(NSString *)user service:(NSString *
return [[[CK2GenericPasswordCredential alloc] initWithUser:user service:service] autorelease];
}
++ (NSURLCredential *)ck2_credentialWithUser:(NSString *)user keychainItem:(SecKeychainItemRef)item;
+{
+ return [[[CK2SSHCredential alloc] initWithUser:user keychainItem:item] autorelease];
+}
+
- (BOOL)ck2_isPublicKeyCredential; { return NO; }
- (NSURL *)ck2_publicKeyURL; { return nil; }
- (NSURL *)ck2_privateKeyURL; { return nil; }

0 comments on commit d96fca4

Please sign in to comment.