Fix default value for trustAllHosts on iOS (YES->NO)

Project: 
http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/commit/a1d6fc07
Tree: 
http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/tree/a1d6fc07
Diff: 
http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/diff/a1d6fc07

Branch: refs/heads/master
Commit: a1d6fc07e8a40c1b2b16f4103c403b30e1089668
Parents: 35f80e4
Author: Andrew Grieve <[email protected]>
Authored: Tue Feb 18 20:58:31 2014 -0500
Committer: Andrew Grieve <[email protected]>
Committed: Wed Feb 19 10:21:33 2014 -0500

----------------------------------------------------------------------
 src/ios/CDVFileTransfer.m | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/blob/a1d6fc07/src/ios/CDVFileTransfer.m
----------------------------------------------------------------------
diff --git a/src/ios/CDVFileTransfer.m b/src/ios/CDVFileTransfer.m
index e35e2fe..c5c7502 100644
--- a/src/ios/CDVFileTransfer.m
+++ b/src/ios/CDVFileTransfer.m
@@ -255,7 +255,7 @@ static CFIndex WriteDataToStream(NSData* data, 
CFWriteStreamRef stream)
 {
     NSString* source = [command.arguments objectAtIndex:0];
     NSString* server = [command.arguments objectAtIndex:1];
-    BOOL trustAllHosts = [[command.arguments objectAtIndex:6 
withDefault:[NSNumber numberWithBool:YES]] boolValue]; // allow self-signed 
certs
+    BOOL trustAllHosts = [[command.arguments objectAtIndex:6 
withDefault:[NSNumber numberWithBool:NO]] boolValue]; // allow self-signed certs
     NSString* objectId = [command.arguments objectAtIndex:9];
 
     CDVFileTransferDelegate* delegate = [[CDVFileTransferDelegate alloc] init];
@@ -360,7 +360,7 @@ static CFIndex WriteDataToStream(NSData* data, 
CFWriteStreamRef stream)
     DLog(@"File Transfer downloading file...");
     NSString* source = [command.arguments objectAtIndex:0];
     NSString* target = [command.arguments objectAtIndex:1];
-    BOOL trustAllHosts = [[command.arguments objectAtIndex:2 
withDefault:[NSNumber numberWithBool:YES]] boolValue]; // allow self-signed 
certs
+    BOOL trustAllHosts = [[command.arguments objectAtIndex:2 
withDefault:[NSNumber numberWithBool:NO]] boolValue]; // allow self-signed certs
     NSString* objectId = [command.arguments objectAtIndex:3];
     NSDictionary* headers = [command.arguments objectAtIndex:4 
withDefault:nil];
 

Reply via email to