diff options
author | Max <post@wickenrode.com> | 2018-02-23 22:33:00 +0100 |
---|---|---|
committer | Max <post@wickenrode.com> | 2018-02-23 22:33:00 +0100 |
commit | 586312b0c33ce751d7524ccb810c3b486fc7984e (patch) | |
tree | 61b871440f19e5ce0ac24c48d1ce4d9362db6bf7 | |
parent | ca864a1f887feaf7ac6d35eeb55b265f3e630a09 (diff) | |
download | sequelpro-586312b0c33ce751d7524ccb810c3b486fc7984e.tar.gz sequelpro-586312b0c33ce751d7524ccb810c3b486fc7984e.tar.bz2 sequelpro-586312b0c33ce751d7524ccb810c3b486fc7984e.zip |
#2979: Rename a method, because it is no longer limited to keychain
-rw-r--r-- | Frameworks/SPMySQLFramework/Source/SPMySQLConnection.m | 4 | ||||
-rw-r--r-- | Frameworks/SPMySQLFramework/Source/SPMySQLConnectionDelegate.h | 6 | ||||
-rw-r--r-- | Source/SPDatabaseDocument.m | 4 | ||||
-rw-r--r-- | Source/SPDatabaseStructure.m | 6 |
4 files changed, 10 insertions, 10 deletions
diff --git a/Frameworks/SPMySQLFramework/Source/SPMySQLConnection.m b/Frameworks/SPMySQLFramework/Source/SPMySQLConnection.m index 7d4c5a30..828b2478 100644 --- a/Frameworks/SPMySQLFramework/Source/SPMySQLConnection.m +++ b/Frameworks/SPMySQLFramework/Source/SPMySQLConnection.m @@ -729,7 +729,7 @@ asm(".desc ___crashreporter_info__, 0x10"); if (password) { passwd = password; } - else if ([delegate respondsToSelector:@selector(keychainPasswordForConnection:authPlugin:)]) { + else if ([delegate respondsToSelector:@selector(passwordForConnection:authPlugin:)]) { // It's not clear what charset the plugin name is in: // In the 5.5 libmysqlclient: // * For the compiled-in plugins this will simply be the byte sequence as it was in the source code @@ -743,7 +743,7 @@ asm(".desc ___crashreporter_info__, 0x10"); // * The plugin name in the client response will be encoded in the client's initial charset // TODO We will just use latin1 for now, as it is the safest fallback NSString *plugin = [NSString stringWithCString:pluginName encoding:NSISOLatin1StringEncoding]; - passwd = [delegate keychainPasswordForConnection:self authPlugin:plugin]; + passwd = [delegate passwordForConnection:self authPlugin:plugin]; } // shortcut for empty/nil password diff --git a/Frameworks/SPMySQLFramework/Source/SPMySQLConnectionDelegate.h b/Frameworks/SPMySQLFramework/Source/SPMySQLConnectionDelegate.h index 69a6ebac..0963e168 100644 --- a/Frameworks/SPMySQLFramework/Source/SPMySQLConnectionDelegate.h +++ b/Frameworks/SPMySQLFramework/Source/SPMySQLConnectionDelegate.h @@ -62,16 +62,16 @@ - (void)showErrorWithTitle:(NSString *)title message:(NSString *)message; /** - * Requests the keychain password for the connection. + * Requests the password for the connection. * When a connection is being made to a server, it is best not to * set the password on the class; instead, it should be kept within - * the secure store, and the other connection details (user, host) + * the secure store (Keychain), and the other connection details (user, host) * can be used to look it up and supplied on demand. * * @param connection The connection instance to supply the password for * @param pluginName The auth plugin libmysqlclients wants to use the password with */ -- (NSString *)keychainPasswordForConnection:(id)connection authPlugin:(NSString *)pluginName; +- (NSString *)passwordForConnection:(id)connection authPlugin:(NSString *)pluginName; /** * Notifies the delegate that no underlying connection is available, diff --git a/Source/SPDatabaseDocument.m b/Source/SPDatabaseDocument.m index db404eb1..d907efb3 100644 --- a/Source/SPDatabaseDocument.m +++ b/Source/SPDatabaseDocument.m @@ -7133,9 +7133,9 @@ static int64_t SPDatabaseDocumentInstanceCounter = 0; } /** - * Invoked when the current connection needs a password from the Keychain. + * Invoked when the current connection needs a password. */ -- (NSString *)keychainPasswordForConnection:(SPMySQLConnection *)connection authPlugin:(NSString *)pluginName +- (NSString *)passwordForConnection:(SPMySQLConnection *)connection authPlugin:(NSString *)pluginName { //TODO check plugin name to see whether we want to fetch it from keychain return [connectionController keychainPassword]; diff --git a/Source/SPDatabaseStructure.m b/Source/SPDatabaseStructure.m index 1eb4352a..99a274b0 100644 --- a/Source/SPDatabaseStructure.m +++ b/Source/SPDatabaseStructure.m @@ -444,11 +444,11 @@ cleanup_thread_and_pool: #pragma mark SPMySQLConnection delegate methods /** - * Forward keychain password requests to the database object. + * Forward password requests to the database object. */ -- (NSString *)keychainPasswordForConnection:(id)connection authPlugin:(NSString *)pluginName +- (NSString *)passwordForConnection:(id)connection authPlugin:(NSString *)pluginName { - return [delegate keychainPasswordForConnection:connection authPlugin:pluginName]; + return [delegate passwordForConnection:connection authPlugin:pluginName]; } #pragma mark - |