• 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
NSHost and host aliases
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSHost and host aliases


  • Subject: NSHost and host aliases
  • From: Ryan Homer <email@hidden>
  • Date: Wed, 20 Dec 2006 16:55:14 -0500

I am trying to set up a secure socket stream using NSStream's getStreamsToHost:port:inputStream:outputStream:

Ex:

NSHost *host = [NSHost hostWithName:"someserver.somehost.com"];
[NSStream getStreamsToHost:host port:443 inputStream:&iStream outputStream:&oStream];


The problem is that NSHost looks up the hostname, which is an alias, and replaces it with the actual host name. Then when the SSL connection is attempted, the name doesn't match up with the certificate and the connection fails with an errSSLHostNameMismatch error.

At least, this is what I THINK is happening.

(I'm able to connect to non-SSL port with no problems).

Any suggestions as to what is happening... or any solutions?




_______________________________________________

Cocoa-dev mailing list (email@hidden)

Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Re: passing data to threads
  • Next by Date: Re: Cocoa HTTP Server & threading
  • Previous by thread: Re: Delegates -- WHAT is delegated? (was Re: Cocoa-dev Digest, Vol 3, Issue 1474)
  • Next by thread: NSKeyedUnarchiver incomprehensible archive exception
  • Index(es):
    • Date
    • Thread