• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Anyone got SSL over NSStreams to work?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Anyone got SSL over NSStreams to work?
      • From: Jeremy Wyld <email@hidden>
  • Prev by Date: Re: How to get the information of "force media" in driver ???
  • Next by Date: NSURLConnection Certificate Problem
  • Previous by thread: Using FSMountServerVolumeAsync
  • Next by thread: Re: Anyone got SSL over NSStreams to work?
  • Index(es):
    • Date
    • Thread