Anyone got SSL over NSStreams to work?
Anyone got SSL over NSStreams to work?
- Subject: Anyone got SSL over NSStreams to work?
- From: Jay Koutavas <email@hidden>
- Date: Wed, 19 Jan 2005 15:05:25 -0500
Title: Anyone got SSL over NSStreams to
work?
Hi. I'm doing the following in an attempt to establish an SSL
connection over NSStreams, per the NSStream documentation:
{ ...
[NSStream getStreamsToHost:@"blah.blah.com"
port:1234
inputStream:&mInStream
outputStream:&mOutStream];
[mInStream retain];
[mOutStream retain];
[mInStream setDelegate:self];
[mOutStream setDelegate:self];
[mInStream scheduleInRunLoop:[NSRunLoop currentRunLoop]
forMode:NSDefaultRunLoopMode];
[mOutStream scheduleInRunLoop:[NSRunLoop currentRunLoop]
forMode:NSDefaultRunLoopMode];
assert([mInStream
setProperty:NSStreamSocketSecurityLevelNegotiatedSSL
forKey:NSStreamSocketSecurityLevelKey]);
assert([mOutStream
setProperty:NSStreamSocketSecurityLevelNegotiatedSSL
forKey:NSStreamSocketSecurityLevelKey]);
[mInStream open];
[mOutStream open];
}
In my stream:handleEvent: delegate method, I always get
back an NSStreamEventErrorOccurred event with an NSUnknownErrorDomain
(-9812) error. It doesn't matter which SSL property I set the
socket to. Always the same error. Turning off SSL on the output stream
doesn't change things either. On the server side, the machine's log is
indicating that an SSL connection is being made. I'm running this on
Mac OS X 10.3.7
Has anyone gotten this stuff to work? A search of the Net shows
very few mentions of using SSL with NSStreams, and there are
unanswered NSStreams+SSL questions in the cocoa-dev archive. I sure
hope someone could shed so light on what I may be missing.
--
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Jay
Koutavas
mailto:email@hidden
Heynow
Software
http://www.heynow.com
Windham, New Hampshire, USA
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden