aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorHoward P. Logsdon <howard@hplogsdon.com>2014-03-07 12:14:15 -0700
committerHoward P. Logsdon <howard@hplogsdon.com>2014-03-07 12:14:15 -0700
commit9c6fab1780fc35a0e5fba231ed552034fcbe7471 (patch)
tree86741d1b1111a4d30bc1b9e63bb6416f20df30ca /Source
parentdfa060854cd456593a5ff0c4926d9c6775fabbfc (diff)
downloadsequelpro-9c6fab1780fc35a0e5fba231ed552034fcbe7471.tar.gz
sequelpro-9c6fab1780fc35a0e5fba231ed552034fcbe7471.tar.bz2
sequelpro-9c6fab1780fc35a0e5fba231ed552034fcbe7471.zip
Enable SSL over SSH connection configuration.
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.
Diffstat (limited to 'Source')
-rw-r--r--Source/SPConnectionController.h4
-rw-r--r--Source/SPConnectionController.m13
2 files changed, 11 insertions, 6 deletions
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;
}