File tree Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -3632,11 +3632,20 @@ - (BOOL)usingCFStreamForTLS
3632
3632
3633
3633
- (BOOL )usingSecureTransportForTLS
3634
3634
{
3635
+ // Invoking this method is equivalent to ![self usingCFStreamForTLS] (just more readable)
3636
+
3635
3637
#if TARGET_OS_IPHONE
3636
- return ![self usingCFStreamForTLS ];
3637
- #else
3638
- return YES ;
3638
+
3639
+ if ((flags & kSocketSecure ) && (flags & kUsingCFStreamForTLS ))
3640
+ {
3641
+ // The startTLS method was given the GCDAsyncSocketUseCFStreamForTLS flag.
3642
+
3643
+ return NO ;
3644
+ }
3645
+
3639
3646
#endif
3647
+
3648
+ return YES ;
3640
3649
}
3641
3650
3642
3651
- (void )suspendReadSource
@@ -4139,7 +4148,7 @@ - (void)doReadData
4139
4148
{
4140
4149
#if TARGET_OS_IPHONE
4141
4150
4142
- // Relegated to using CFStream... :( Boo! Give us a full SecureTransport stack Apple!
4151
+ // Requested CFStream, rather than SecureTransport, for TLS (via GCDAsyncSocketUseCFStreamForTLS)
4143
4152
4144
4153
estimatedBytesAvailable = 0 ;
4145
4154
if ((flags & kSecureSocketHasBytesAvailable ) && CFReadStreamHasBytesAvailable (readStream))
You can’t perform that action at this time.
0 commit comments