mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 00:30:53 +00:00
allow cipher list to be set
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34270 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
4538670b25
commit
bbcbe38efb
2 changed files with 17 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2011-12-13 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
|
* SSL/GSSSLHandle.m: Allow cipher list to be set using GSCipherList
|
||||||
|
default.
|
||||||
|
|
||||||
2011-12-08 Wolfgang Lux <wolfgang.lux@gmail.com>
|
2011-12-08 Wolfgang Lux <wolfgang.lux@gmail.com>
|
||||||
|
|
||||||
* configure.ac: Fix pkg-config configuration for libffi to make it
|
* configure.ac: Fix pkg-config configuration for libffi to make it
|
||||||
|
|
|
@ -160,12 +160,15 @@ threadid_function()
|
||||||
@end
|
@end
|
||||||
|
|
||||||
static BOOL permitSSLv2 = NO;
|
static BOOL permitSSLv2 = NO;
|
||||||
|
static NSString *cipherList = nil;
|
||||||
|
|
||||||
@implementation GSSSLHandle
|
@implementation GSSSLHandle
|
||||||
+ (void) _defaultsChanged: (NSNotification*)n
|
+ (void) _defaultsChanged: (NSNotification*)n
|
||||||
{
|
{
|
||||||
permitSSLv2
|
permitSSLv2
|
||||||
= [[NSUserDefaults standardUserDefaults] boolForKey: @"GSPermitSSLv2"];
|
= [[NSUserDefaults standardUserDefaults] boolForKey: @"GSPermitSSLv2"];
|
||||||
|
cipherList
|
||||||
|
= [[NSUserDefaults standardUserDefaults] stringForKey: @"GSCipherList"];
|
||||||
}
|
}
|
||||||
|
|
||||||
+ (void) initialize
|
+ (void) initialize
|
||||||
|
@ -203,6 +206,7 @@ static BOOL permitSSLv2 = NO;
|
||||||
}
|
}
|
||||||
defs = [NSUserDefaults standardUserDefaults];
|
defs = [NSUserDefaults standardUserDefaults];
|
||||||
permitSSLv2 = [defs boolForKey: @"GSPermitSSLv2"];
|
permitSSLv2 = [defs boolForKey: @"GSPermitSSLv2"];
|
||||||
|
cipherList = [defs stringForKey: @"GSCipherList"];
|
||||||
[[NSNotificationCenter defaultCenter]
|
[[NSNotificationCenter defaultCenter]
|
||||||
addObserver: self
|
addObserver: self
|
||||||
selector: @selector(_defaultsChanged:)
|
selector: @selector(_defaultsChanged:)
|
||||||
|
@ -377,6 +381,10 @@ static BOOL permitSSLv2 = NO;
|
||||||
{
|
{
|
||||||
SSL_CTX_set_options(ctx, SSL_OP_NO_SSLv2);
|
SSL_CTX_set_options(ctx, SSL_OP_NO_SSLv2);
|
||||||
}
|
}
|
||||||
|
if (nil != cipherList)
|
||||||
|
{
|
||||||
|
SSL_CTX_set_cipher_list(ctx, [cipherList UTF8String]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (ssl == 0)
|
if (ssl == 0)
|
||||||
{
|
{
|
||||||
|
@ -440,6 +448,10 @@ static BOOL permitSSLv2 = NO;
|
||||||
{
|
{
|
||||||
SSL_CTX_set_options(ctx, SSL_OP_NO_SSLv2);
|
SSL_CTX_set_options(ctx, SSL_OP_NO_SSLv2);
|
||||||
}
|
}
|
||||||
|
if (nil != cipherList)
|
||||||
|
{
|
||||||
|
SSL_CTX_set_cipher_list(ctx, [cipherList UTF8String]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if ([PEMpasswd length] > 0)
|
if ([PEMpasswd length] > 0)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue