• 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
Re: SSL host name checking doesn't understand wildcard subdomains?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SSL host name checking doesn't understand wildcard subdomains?


  • Subject: Re: SSL host name checking doesn't understand wildcard subdomains?
  • From: "Quinn \"The Eskimo!\"" <email@hidden>
  • Date: Tue, 15 May 2012 10:01:12 +0100

On 14 May 2012, at 18:18, Jens Alfke wrote:

> I’m not using this API to open the socket; rather, I use CFStreamCreatePairWithSocketToHost (on iOS) or +[NSStream getStreamsToHost…] (Mac OS).

I didn't test the NSHost approach because NSHost is just not safe [1].  I did however test the CFStreamCreatePairWithSocketToHost code path, although it's a bit hidden in the snippet I posted.  In the NO branch of the if, I call +[NSStream qNetworkAdditions_getStreamsToHostNamed:port:inputStream:outputStream:], the code for which you can find in QA1652 "Using NSStreams For A TCP Connection Without NSHost".

<https://developer.apple.com/library/ios/#qa/qa1652/_index.html>

I'm not sure why you're not seeing the host get passed down to Secure Transport in that case.  Regardless, setting kCFStreamSSLPeerName is a perfectly reasonable workaround.

Share and Enjoy
--
Quinn "The Eskimo!"                    <http://www.apple.com/developer/>
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

[1] Simply constructing an NSHost will trigger a synchronous DNS lookup, thus making it unsuitable to use on the main thread <rdar://problem/3410097>.


 _______________________________________________
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: SSL host name checking doesn't understand wildcard subdomains?
      • From: Jens Alfke <email@hidden>
References: 
 >SSL host name checking doesn't understand wildcard subdomains? (From: Jens Alfke <email@hidden>)
 >Re: SSL host name checking doesn't understand wildcard subdomains? (From: "Quinn \"The Eskimo!\"" <email@hidden>)
 >Re: SSL host name checking doesn't understand wildcard subdomains? (From: Jens Alfke <email@hidden>)

  • Prev by Date: Re: Using CFHTTPMessage to parse response header but not body?
  • Next by Date: Re: SSL host name checking doesn't understand wildcard subdomains?
  • Previous by thread: Re: SSL host name checking doesn't understand wildcard subdomains?
  • Next by thread: Re: SSL host name checking doesn't understand wildcard subdomains?
  • Index(es):
    • Date
    • Thread