mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-29 16:01:38 +00:00
Add comments to avoid confusion.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@28390 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
f9e8e9c0b8
commit
2e2d640c4d
5 changed files with 84 additions and 27 deletions
|
@ -409,6 +409,14 @@ static gnutls_anon_client_credentials_t anoncred;
|
|||
output: (GSSocketOutputStream*)o
|
||||
{
|
||||
NSString *proto = [i propertyForKey: NSStreamSocketSecurityLevelKey];
|
||||
BOOL server = NO;
|
||||
|
||||
/* FIXME
|
||||
if ([[o propertyForKey: NSStreamSocketCertificateServerKey] boolValue] == YES)
|
||||
{
|
||||
server = YES;
|
||||
}
|
||||
*/
|
||||
|
||||
if (GSDebugSet(@"NSStream") == YES)
|
||||
{
|
||||
|
@ -421,6 +429,7 @@ static gnutls_anon_client_credentials_t anoncred;
|
|||
|
||||
if ([[o propertyForKey: NSStreamSocketSecurityLevelKey] isEqual: proto] == NO)
|
||||
{
|
||||
NSLog(@"NSStreamSocketSecurityLevel on input stream does not match output stream");
|
||||
DESTROY(self);
|
||||
return nil;
|
||||
}
|
||||
|
@ -470,7 +479,15 @@ static gnutls_anon_client_credentials_t anoncred;
|
|||
|
||||
/* Initialise session and set default priorities foir key exchange.
|
||||
*/
|
||||
gnutls_init (&session, GNUTLS_CLIENT);
|
||||
if (server)
|
||||
{
|
||||
gnutls_init (&session, GNUTLS_SERVER);
|
||||
/* FIXME ... need to set up DH information and key/certificate. */
|
||||
}
|
||||
else
|
||||
{
|
||||
gnutls_init (&session, GNUTLS_CLIENT);
|
||||
}
|
||||
gnutls_set_default_priority (session);
|
||||
|
||||
if ([proto isEqualToString: NSStreamSocketSecurityLevelTLSv1] == YES)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue