aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPConnectionHandler.m
diff options
context:
space:
mode:
authorMax <post@wickenrode.com>2015-03-21 02:25:59 +0100
committerMax <post@wickenrode.com>2015-03-21 02:25:59 +0100
commit1b6248d6a256ad774d092151227fdd5f40247c02 (patch)
tree759228a7a45cd7a0258bdc24159b69cfab9cbccb /Source/SPConnectionHandler.m
parent6b32b225106245755e9fe4543e9eb4883cbb9c2b (diff)
downloadsequelpro-1b6248d6a256ad774d092151227fdd5f40247c02.tar.gz
sequelpro-1b6248d6a256ad774d092151227fdd5f40247c02.tar.bz2
sequelpro-1b6248d6a256ad774d092151227fdd5f40247c02.zip
Add code for using custom SSL cipher list in SP
Diffstat (limited to 'Source/SPConnectionHandler.m')
-rw-r--r--Source/SPConnectionHandler.m10
1 files changed, 10 insertions, 0 deletions
diff --git a/Source/SPConnectionHandler.m b/Source/SPConnectionHandler.m
index bac0c680..80e9c3f5 100644
--- a/Source/SPConnectionHandler.m
+++ b/Source/SPConnectionHandler.m
@@ -145,6 +145,16 @@ static NSString *SPLocalhostAddress = @"127.0.0.1";
if ([self sslCACertFileLocationEnabled]) {
[mySQLConnection setSslCACertificatePath:[self sslCACertFileLocation]];
}
+
+ NSString *userSSLCipherList = [prefs stringForKey:SPSSLCipherListKey];
+ if(userSSLCipherList) {
+ //strip out disabled ciphers (e.g. in "foo:bar:--:baz")
+ NSRange markerPos = [userSSLCipherList rangeOfRegex:@":?--"];
+ if(markerPos.location != NSNotFound) {
+ userSSLCipherList = [userSSLCipherList substringToIndex:markerPos.location];
+ }
+ [mySQLConnection setSslCipherList:userSSLCipherList];
+ }
}
// Connection delegate must be set before actual connection attempt is made