From 9c6fab1780fc35a0e5fba231ed552034fcbe7471 Mon Sep 17 00:00:00 2001 From: "Howard P. Logsdon" Date: Fri, 7 Mar 2014 12:14:15 -0700 Subject: Enable SSL over SSH connection configuration. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This appears to work, as I’m able to connect to mysql instances through an ssh tunnel, with ssl configuration, but I probably should wireshark the connection to determine actual network traffic. --- Source/SPConnectionController.h | 4 ++++ Source/SPConnectionController.m | 13 +++++++------ 2 files changed, 11 insertions(+), 6 deletions(-) (limited to 'Source') diff --git a/Source/SPConnectionController.h b/Source/SPConnectionController.h index 19c7eee3..6c52d4b0 100644 --- a/Source/SPConnectionController.h +++ b/Source/SPConnectionController.h @@ -120,6 +120,7 @@ IBOutlet NSView *socketConnectionFormContainer; IBOutlet NSView *socketConnectionSSLDetailsContainer; IBOutlet NSView *sshConnectionFormContainer; + IBOutlet NSView *sshConnectionSSLDetailsContainer; IBOutlet NSView *sshKeyLocationHelp; IBOutlet NSView *sslKeyFileLocationHelp; IBOutlet NSView *sslCertificateLocationHelp; @@ -147,6 +148,9 @@ IBOutlet NSButton *socketSSLKeyFileButton; IBOutlet NSButton *socketSSLCertificateButton; IBOutlet NSButton *socketSSLCACertButton; + IBOutlet NSButton *sslOverSSHKeyFileButton; + IBOutlet NSButton *sslOverSSHCertificateButton; + IBOutlet NSButton *sslOverSSHCACertButton; IBOutlet NSButton *connectButton; IBOutlet NSButton *testConnectButton; diff --git a/Source/SPConnectionController.m b/Source/SPConnectionController.m index ea34ad16..adccee65 100644 --- a/Source/SPConnectionController.m +++ b/Source/SPConnectionController.m @@ -399,7 +399,7 @@ static NSComparisonResult _compareFavoritesUsingKey(id favorite1, id favorite2, [keySelectionPanel setAccessoryView:sshKeyLocationHelp]; } // SSL key file location: - else if (sender == standardSSLKeyFileButton || sender == socketSSLKeyFileButton) { + else if (sender == standardSSLKeyFileButton || sender == socketSSLKeyFileButton || sender == sslOverSSHKeyFileButton) { if ([sender state] == NSOffState) { [self setSslKeyFileLocation:nil]; return; @@ -408,7 +408,7 @@ static NSComparisonResult _compareFavoritesUsingKey(id favorite1, id favorite2, [keySelectionPanel setAccessoryView:sslKeyFileLocationHelp]; } // SSL certificate file location: - else if (sender == standardSSLCertificateButton || sender == socketSSLCertificateButton) { + else if (sender == standardSSLCertificateButton || sender == socketSSLCertificateButton || sender == sslOverSSHCertificateButton) { if ([sender state] == NSOffState) { [self setSslCertificateFileLocation:nil]; return; @@ -417,7 +417,7 @@ static NSComparisonResult _compareFavoritesUsingKey(id favorite1, id favorite2, [keySelectionPanel setAccessoryView:sslCertificateLocationHelp]; } // SSL CA certificate file location: - else if (sender == standardSSLCACertButton || sender == socketSSLCACertButton) { + else if (sender == standardSSLCACertButton || sender == socketSSLCACertButton || sender == sslOverSSHCACertButton) { if ([sender state] == NSOffState) { [self setSslCACertFileLocation:nil]; return; @@ -440,7 +440,7 @@ static NSComparisonResult _compareFavoritesUsingKey(id favorite1, id favorite2, [self setSshKeyLocation:abbreviatedFileName]; } // SSL key file selection - else if (sender == standardSSLKeyFileButton || sender == socketSSLKeyFileButton) { + else if (sender == standardSSLKeyFileButton || sender == socketSSLKeyFileButton || sender == sslOverSSHKeyFileButton) { if (returnCode == NSCancelButton) { [self setSslKeyFileLocationEnabled:NSOffState]; [self setSslKeyFileLocation:nil]; @@ -450,7 +450,7 @@ static NSComparisonResult _compareFavoritesUsingKey(id favorite1, id favorite2, [self setSslKeyFileLocation:abbreviatedFileName]; } // SSL certificate file selection - else if (sender == standardSSLCertificateButton || sender == socketSSLCertificateButton) { + else if (sender == standardSSLCertificateButton || sender == socketSSLCertificateButton || sender == sslOverSSHCertificateButton) { if (returnCode == NSCancelButton) { [self setSslCertificateFileLocationEnabled:NSOffState]; [self setSslCertificateFileLocation:nil]; @@ -460,7 +460,7 @@ static NSComparisonResult _compareFavoritesUsingKey(id favorite1, id favorite2, [self setSslCertificateFileLocation:abbreviatedFileName]; } // SSL CA certificate file selection - else if (sender == standardSSLCACertButton || sender == socketSSLCACertButton) { + else if (sender == standardSSLCACertButton || sender == socketSSLCACertButton || sender == sslOverSSHCACertButton) { if (returnCode == NSCancelButton) { [self setSslCACertFileLocationEnabled:NSOffState]; [self setSslCACertFileLocation:nil]; @@ -546,6 +546,7 @@ static NSComparisonResult _compareFavoritesUsingKey(id favorite1, id favorite2, break; case SPSSHTunnelConnection: targetResizeRect = [sshConnectionFormContainer frame]; + if ([self useSSL]) additionalFormHeight += [sshConnectionSSLDetailsContainer frame].size.height; break; } -- cgit v1.2.3