Add https support

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@25879 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
rfm 2008-01-06 07:54:08 +00:00
parent d763e93ea3
commit ffb78948a5
2 changed files with 19 additions and 4 deletions

View file

@ -447,6 +447,13 @@ static NSURLProtocol *placeholder = nil;
RETAIN(this->input);
RETAIN(this->output);
[self _didInitializeOutputStream: this->output];
if ([[url scheme] isEqualToString: @"https"] == YES)
{
[this->input setProperty: NSStreamSocketSecurityLevelNegotiatedSSL
forKey: NSStreamSocketSecurityLevelKey];
[this->output setProperty: NSStreamSocketSecurityLevelNegotiatedSSL
forKey: NSStreamSocketSecurityLevelKey];
}
[this->input setDelegate: self];
[this->output setDelegate: self];
[self _schedule];
@ -1124,6 +1131,13 @@ static NSURLProtocol *placeholder = nil;
}
RETAIN(this->input);
RETAIN(this->output);
if ([[url scheme] isEqualToString: @"https"] == YES)
{
[this->input setProperty: NSStreamSocketSecurityLevelNegotiatedSSL
forKey: NSStreamSocketSecurityLevelKey];
[this->output setProperty: NSStreamSocketSecurityLevelNegotiatedSSL
forKey: NSStreamSocketSecurityLevelKey];
}
[this->input setDelegate: self];
[this->output setDelegate: self];
[this->input scheduleInRunLoop: [NSRunLoop currentRunLoop]