diff --git a/.gitignore b/.gitignore index 902988e..501281c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,22 +1,21 @@ -# We ignore the android/build.properties file becuase the user is +# We ignore the android/build.properties file because the user is # expected copy android/build.properties.example to # android/build.properties and modify it for their development # environment. android/build.properties - # Titanium module build artifacts -iphone/appcelerator.https-iphone-*.zip -iphone/build -iphone/metadata.json +ios/appcelerator.https-iphone-*.zip +ios/build +ios/metadata.json android/dist android/libs # These eight are symlinks -iphone/LICENSE -iphone/assets -iphone/documentation -iphone/example +ios/LICENSE +ios/assets +ios/documentation +ios/example android/LICENSE android/assets android/documentation @@ -25,14 +24,13 @@ android/example example/build/ example/modules/ - - # User-specific Xcode settings. -iphone/appcelerator.https.xcodeproj/xcuserdata -iphone/appcelerator.https.xcodeproj/project.xcworkspace/xcuserdata +ios/appcelerator.https.xcodeproj/xcuserdata/* +ios/appcelerator.https.xcodeproj/project.xcworkspace/xcuserdata/* # Emacs backup files *~ -# OS X +# macOS .DS_Store +/android/java-sources.txt diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..dbfa9ea --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,8 @@ +@Library('pipeline-library') _ + +buildModule { + // defaults: + //nodeVersion = '6.11.4' // Must have version set up on Jenkins master before it can be changed + //sdkVersion = '6.2.2.GA' + //androidAPILevel = '25' // if changed, must install on build nodes +} diff --git a/android/java-sources.txt b/android/java-sources.txt deleted file mode 100644 index 32b8e28..0000000 --- a/android/java-sources.txt +++ /dev/null @@ -1,10 +0,0 @@ -"/Users/hknoechel/Documents/appcelerator_modules/appcelerator.https/android/src/appcelerator/https/HttpsModule.java" -"/Users/hknoechel/Documents/appcelerator_modules/appcelerator.https/android/src/appcelerator/https/PinningSecurityManager.java" -"/Users/hknoechel/Documents/appcelerator_modules/appcelerator.https/android/src/appcelerator/https/PinningTrustManager.java" -"/Users/hknoechel/Documents/appcelerator_modules/appcelerator.https/android/build/generated/java/appcelerator/https/HttpsBootstrap.java" -"/Users/hknoechel/Documents/appcelerator_modules/appcelerator.https/android/build/generated/r/android/support/compat/R.java" -"/Users/hknoechel/Documents/appcelerator_modules/appcelerator.https/android/build/generated/r/android/support/design/R.java" -"/Users/hknoechel/Documents/appcelerator_modules/appcelerator.https/android/build/generated/r/android/support/v7/appcompat/R.java" -"/Users/hknoechel/Documents/appcelerator_modules/appcelerator.https/android/build/generated/r/android/support/v7/cardview/R.java" -"/Users/hknoechel/Documents/appcelerator_modules/appcelerator.https/android/build/generated/r/appcelerator/https/R.java" -"/Users/hknoechel/Documents/appcelerator_modules/appcelerator.https/android/build/generated/r/ti/modules/titanium/ui/R.java" \ No newline at end of file diff --git a/apidoc/Https.yml b/apidoc/Https.yml index a8ea3f6..885dd60 100644 --- a/apidoc/Https.yml +++ b/apidoc/Https.yml @@ -1,7 +1,7 @@ name: Modules.Https summary: Prevents a man-in-the-middle attack when used with the `Titanium.Network.HTTPClient` class. description: | -

Note: This feature requires a Pro, Team, or Enterprise subscription.

+

Note: This feature requires a Pro or Enterprise subscription.

Use the HTTPS module to create a Security Manager for `Titanium.Network.HTTPClient` that authenticates a set of HTTPS servers by pinning an HTTPS server's URL to its @@ -65,12 +65,10 @@ description: | For example: - var securityManager = https.createX509CertificatePinningSecurityManager([ - { - url: 'https://www.yourorg.com', - serverCertificate: 'yourorg.der' - } - ]); + var securityManager = https.createX509CertificatePinningSecurityManager([{ + url: 'https://www.yourorg.com', + serverCertificate: 'yourorg.der' + }]); After the security manager is created, create an `HTTPClient` object and set the [securityManager](Titanium.Network.HTTPClient.securityManager) property to the security manager @@ -93,6 +91,18 @@ description: | httpClient.open('GET', 'https://yourorg.com'); httpClient.send(); + + ### Wildcard Support + + Additionally to the above API, you can also pass wildcard-certificates to your + security-manager. Example: + + var securityManager = https.createX509CertificatePinningSecurityManager([{ + url: '*.example.com', + serverCertificate: 'example.der' + }]); + + ### Error Responses If the authentication fails, a security exception is thrown. The HTTP client's `onerror` callback will be passed an error object with the `code` key set to `-1` and the `message` key @@ -144,28 +154,23 @@ examples: `Resources` directory or `app/assets/` directory for Alloy projects. // Require in the module - var https = require('appcelerator.https'), - securityManager, - httpClient; + var https = require('appcelerator.https'); // Use the module to create a Security Manager that authenticates the specified URLs - securityManager = https.createX509CertificatePinningSecurityManager([ - { - url: 'https://dashboard.appcelerator.com', - serverCertificate: 'dashboard.appcelerator.com.der' - }, - { - url: 'https://www.wellsfargo.com', - serverCertificate: 'wellsfargo.der' - } - ]); + var securityManager = https.createX509CertificatePinningSecurityManager([{ + url: 'https://dashboard.appcelerator.com', + serverCertificate: 'dashboard.appcelerator.com.der' + }, { + url: 'https://www.wellsfargo.com', + serverCertificate: 'wellsfargo.der' + }]); // Create an HTTP client the same way you always have // but pass in the optional Security Manager that was created previously. - httpClient = Ti.Network.createHTTPClient({ + var httpClient = Ti.Network.createHTTPClient({ onload: function(e) { Ti.API.info('Received text: ' + this.responseText); - }, + }, onerror: function(e) { Ti.API.error(e.error); }, diff --git a/build.py b/build.py index 14b559f..7679ac0 100755 --- a/build.py +++ b/build.py @@ -62,9 +62,9 @@ def main(args): if cmd == 'build': packages = [] - if os.path.exists('iphone'): - create_module('iphone', 'appc ti build -p ios') - packages.append('iphone') + if os.path.exists('ios'): + create_module('ios', 'appc ti build -p ios') + packages.append('ios') if os.path.exists('android'): create_module('android', 'appc ti build -p android') @@ -74,8 +74,8 @@ def main(args): fork('.', packages_cmd, False) elif cmd == 'clean': - if os.path.exists('iphone'): - clean_build_module('iphone') + if os.path.exists('ios'): + clean_build_module('ios') if os.path.exists('android'): clean_ant_module('android') diff --git a/documentation/changelog.md b/documentation/changelog.md index 6a722cd..033b711 100644 --- a/documentation/changelog.md +++ b/documentation/changelog.md @@ -1,5 +1,14 @@ # Change Log
+
+v2.1.0 [MOD-2347] Expose "trustChainIndex" to select different certificates than the leaf
+
+v2.0.2 iOS: Fix module crash on Titanium SDK 6.x
+
+v2.0.1 [MOD-2293] iOS: Fix support for wildcard entries
+
+v2.0.0 Update Android module built against Titanium SDK 6, V8 5.1.281.59.
+
 v1.1.3 [TIMOB-19729] Rebuilding binary for Android 23 SDK. No changes to code.
 
 v1.1.2 [TIMOB-18129] Parity in handling Man In the Middle Attack
diff --git a/example/Resources/app.js b/example/Resources/app.js
index f868205..e750980 100644
--- a/example/Resources/app.js
+++ b/example/Resources/app.js
@@ -1,8 +1,5 @@
 /**
  * This is an example of how to use the appcelerator.https module.
- *
- * Author: Matt Langston
- * Created: 2014.04.29
  */
 
 var https = require('appcelerator.https');
@@ -10,17 +7,17 @@ var https = require('appcelerator.https');
 /*
  * Create a Security Manager for Titanium.Network.HTTPClient that
  * authenticates a currated set of HTTPS servers. It does this by
- * "pinning" an HTTPS server's DNS name to the public key contained in
+ * 'pinning' an HTTPS server's DNS name to the public key contained in
  * the X509 certificate it uses for TLS communication. The public key
  * is embedded in an app by adding this X509 certificate to the app's
  * Resources directory.
  *
- * With such a "pin" in place, the security manager will guarantee
+ * With such a 'pin' in place, the security manager will guarantee
  * that all HTTPClient connections to this HTTPS server are to a
  * server that holds the private key corresponding to the public key
  * embedded in the app, therefore authenticating the server.
  *
- * This is what prevents "Man-in-the-Middle" attack.
+ * This is what prevents 'Man-in-the-Middle' attack.
  *
  * This example pins two URLs.
  *
@@ -42,16 +39,16 @@ var https = require('appcelerator.https');
  * The X.509 certificate files can have any name and extension you
  * wish, but they must be in the standard DER binary format.
  */
-var securityManager = https.createX509CertificatePinningSecurityManager([
-	{
-		url: "https://www.americanexpress.com",
-		serverCertificate: "wellsfargo.cer"
-	},
-	{
-		url: "https://www.wellsfargo.com",
-		serverCertificate: "wellsfargo.cer"
-	}
-]);
+var securityManager = https.createX509CertificatePinningSecurityManager([{
+	url: 'https://www.americanexpress.com',
+	serverCertificate: 'wellsfargo.cer'
+},
+{
+	url: 'https://www.wellsfargo.com',
+  serverCertificate: 'wellsfargo.cer',
+	// Optional: Pass the trust-chain index to select a certificate different to the leaf
+	// trustChainIndex: 1
+}]);
 
 
 var win = Titanium.UI.createWindow({
@@ -111,7 +108,7 @@ win.open();
 /*
  * Create an HTTP client the same way you always have, but pass in an
  * (optional) Security Manager. In this example, we pass in the
- * "Certificate Pinning Security Manager " that I configured above.
+ * 'Certificate Pinning Security Manager ' that I configured above.
  */
 
 function getXHR(url) {
@@ -131,9 +128,9 @@ function getXHR(url) {
 	return xhr;
 }
 
-var wf = "https://www.wellsfargo.com";
-var amex = "https://www.americanexpress.com";
-var appc = "https://dashboard.appcelerator.com";
+var wf = 'https://www.wellsfargo.com';
+var amex = 'https://www.americanexpress.com';
+var appc = 'https://dashboard.appcelerator.com';
 
 button1.addEventListener('click',function(e){
 	var xhr = getXHR(wf);
diff --git a/iphone/Classes/AppceleratorHttpsModuleAssets.m b/ios/Classes/AppceleratorHttpsModuleAssets.m
similarity index 100%
rename from iphone/Classes/AppceleratorHttpsModuleAssets.m
rename to ios/Classes/AppceleratorHttpsModuleAssets.m
diff --git a/iphone/README.md b/ios/README.md
similarity index 100%
rename from iphone/README.md
rename to ios/README.md
diff --git a/iphone/appcelerator.https.xcodeproj/project.pbxproj b/ios/appcelerator.https.xcodeproj/project.pbxproj
similarity index 98%
rename from iphone/appcelerator.https.xcodeproj/project.pbxproj
rename to ios/appcelerator.https.xcodeproj/project.pbxproj
index 9803839..838c812 100644
--- a/iphone/appcelerator.https.xcodeproj/project.pbxproj
+++ b/ios/appcelerator.https.xcodeproj/project.pbxproj
@@ -259,7 +259,7 @@
 		C9078CFC192E4E1400B7BDDE /* Project object */ = {
 			isa = PBXProject;
 			attributes = {
-				LastUpgradeCheck = 0830;
+				LastUpgradeCheck = 0910;
 				ORGANIZATIONNAME = Appcelerator;
 			};
 			buildConfigurationList = C9078CFF192E4E1400B7BDDE /* Build configuration list for PBXProject "appcelerator.https" */;
@@ -354,14 +354,20 @@
 				CLANG_CXX_LIBRARY = "libc++";
 				CLANG_ENABLE_MODULES = YES;
 				CLANG_ENABLE_OBJC_ARC = YES;
+				CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
 				CLANG_WARN_BOOL_CONVERSION = YES;
+				CLANG_WARN_COMMA = YES;
 				CLANG_WARN_CONSTANT_CONVERSION = YES;
 				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
 				CLANG_WARN_EMPTY_BODY = YES;
 				CLANG_WARN_ENUM_CONVERSION = YES;
 				CLANG_WARN_INFINITE_RECURSION = YES;
 				CLANG_WARN_INT_CONVERSION = YES;
+				CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+				CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
 				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+				CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+				CLANG_WARN_STRICT_PROTOTYPES = NO;
 				CLANG_WARN_SUSPICIOUS_MOVE = YES;
 				CLANG_WARN_UNREACHABLE_CODE = YES;
 				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@@ -399,14 +405,20 @@
 				CLANG_CXX_LIBRARY = "libc++";
 				CLANG_ENABLE_MODULES = YES;
 				CLANG_ENABLE_OBJC_ARC = YES;
+				CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
 				CLANG_WARN_BOOL_CONVERSION = YES;
+				CLANG_WARN_COMMA = YES;
 				CLANG_WARN_CONSTANT_CONVERSION = YES;
 				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
 				CLANG_WARN_EMPTY_BODY = YES;
 				CLANG_WARN_ENUM_CONVERSION = YES;
 				CLANG_WARN_INFINITE_RECURSION = YES;
 				CLANG_WARN_INT_CONVERSION = YES;
+				CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+				CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
 				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+				CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+				CLANG_WARN_STRICT_PROTOTYPES = NO;
 				CLANG_WARN_SUSPICIOUS_MOVE = YES;
 				CLANG_WARN_UNREACHABLE_CODE = YES;
 				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
diff --git a/iphone/appcelerator.https.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/ios/appcelerator.https.xcodeproj/project.xcworkspace/contents.xcworkspacedata
similarity index 100%
rename from iphone/appcelerator.https.xcodeproj/project.xcworkspace/contents.xcworkspacedata
rename to ios/appcelerator.https.xcodeproj/project.xcworkspace/contents.xcworkspacedata
diff --git a/ios/appcelerator.https.xcodeproj/project.xcworkspace/xcuserdata/hans.xcuserdatad/UserInterfaceState.xcuserstate b/ios/appcelerator.https.xcodeproj/project.xcworkspace/xcuserdata/hans.xcuserdatad/UserInterfaceState.xcuserstate
new file mode 100644
index 0000000..134a6af
Binary files /dev/null and b/ios/appcelerator.https.xcodeproj/project.xcworkspace/xcuserdata/hans.xcuserdatad/UserInterfaceState.xcuserstate differ
diff --git a/ios/appcelerator.https.xcodeproj/project.xcworkspace/xcuserdata/hknoechel.xcuserdatad/UserInterfaceState.xcuserstate b/ios/appcelerator.https.xcodeproj/project.xcworkspace/xcuserdata/hknoechel.xcuserdatad/UserInterfaceState.xcuserstate
new file mode 100644
index 0000000..e834549
Binary files /dev/null and b/ios/appcelerator.https.xcodeproj/project.xcworkspace/xcuserdata/hknoechel.xcuserdatad/UserInterfaceState.xcuserstate differ
diff --git a/iphone/appcelerator.https/AppceleratorHttps.h b/ios/appcelerator.https/AppceleratorHttps.h
similarity index 100%
rename from iphone/appcelerator.https/AppceleratorHttps.h
rename to ios/appcelerator.https/AppceleratorHttps.h
diff --git a/iphone/appcelerator.https/AppceleratorHttpsModule.h b/ios/appcelerator.https/AppceleratorHttpsModule.h
similarity index 100%
rename from iphone/appcelerator.https/AppceleratorHttpsModule.h
rename to ios/appcelerator.https/AppceleratorHttpsModule.h
diff --git a/iphone/appcelerator.https/AppceleratorHttpsModule.m b/ios/appcelerator.https/AppceleratorHttpsModule.m
similarity index 100%
rename from iphone/appcelerator.https/AppceleratorHttpsModule.m
rename to ios/appcelerator.https/AppceleratorHttpsModule.m
diff --git a/iphone/appcelerator.https/AppceleratorHttpsModuleAssets.h b/ios/appcelerator.https/AppceleratorHttpsModuleAssets.h
similarity index 100%
rename from iphone/appcelerator.https/AppceleratorHttpsModuleAssets.h
rename to ios/appcelerator.https/AppceleratorHttpsModuleAssets.h
diff --git a/iphone/appcelerator.https/AppceleratorHttpsModuleAssets.m b/ios/appcelerator.https/AppceleratorHttpsModuleAssets.m
similarity index 100%
rename from iphone/appcelerator.https/AppceleratorHttpsModuleAssets.m
rename to ios/appcelerator.https/AppceleratorHttpsModuleAssets.m
diff --git a/iphone/appcelerator.https/AppceleratorHttpsUtils.h b/ios/appcelerator.https/AppceleratorHttpsUtils.h
similarity index 100%
rename from iphone/appcelerator.https/AppceleratorHttpsUtils.h
rename to ios/appcelerator.https/AppceleratorHttpsUtils.h
diff --git a/iphone/appcelerator.https/AppceleratorHttpsUtils.m b/ios/appcelerator.https/AppceleratorHttpsUtils.m
similarity index 100%
rename from iphone/appcelerator.https/AppceleratorHttpsUtils.m
rename to ios/appcelerator.https/AppceleratorHttpsUtils.m
diff --git a/iphone/appcelerator.https/PinnedURL.h b/ios/appcelerator.https/PinnedURL.h
similarity index 100%
rename from iphone/appcelerator.https/PinnedURL.h
rename to ios/appcelerator.https/PinnedURL.h
diff --git a/iphone/appcelerator.https/PinnedURL.m b/ios/appcelerator.https/PinnedURL.m
similarity index 100%
rename from iphone/appcelerator.https/PinnedURL.m
rename to ios/appcelerator.https/PinnedURL.m
diff --git a/iphone/appcelerator.https/PublicKey.h b/ios/appcelerator.https/PublicKey.h
similarity index 100%
rename from iphone/appcelerator.https/PublicKey.h
rename to ios/appcelerator.https/PublicKey.h
diff --git a/iphone/appcelerator.https/PublicKey.m b/ios/appcelerator.https/PublicKey.m
similarity index 100%
rename from iphone/appcelerator.https/PublicKey.m
rename to ios/appcelerator.https/PublicKey.m
diff --git a/iphone/appcelerator.https/SecurityManager.h b/ios/appcelerator.https/SecurityManager.h
similarity index 100%
rename from iphone/appcelerator.https/SecurityManager.h
rename to ios/appcelerator.https/SecurityManager.h
diff --git a/iphone/appcelerator.https/SecurityManager.m b/ios/appcelerator.https/SecurityManager.m
similarity index 100%
rename from iphone/appcelerator.https/SecurityManager.m
rename to ios/appcelerator.https/SecurityManager.m
diff --git a/iphone/appcelerator.https/X509Certificate.h b/ios/appcelerator.https/X509Certificate.h
similarity index 100%
rename from iphone/appcelerator.https/X509Certificate.h
rename to ios/appcelerator.https/X509Certificate.h
diff --git a/iphone/appcelerator.https/X509Certificate.m b/ios/appcelerator.https/X509Certificate.m
similarity index 100%
rename from iphone/appcelerator.https/X509Certificate.m
rename to ios/appcelerator.https/X509Certificate.m
diff --git a/iphone/appcelerator.https/X509CertificatePinningSecurityManagerProxy.h b/ios/appcelerator.https/X509CertificatePinningSecurityManagerProxy.h
similarity index 100%
rename from iphone/appcelerator.https/X509CertificatePinningSecurityManagerProxy.h
rename to ios/appcelerator.https/X509CertificatePinningSecurityManagerProxy.h
diff --git a/iphone/appcelerator.https/X509CertificatePinningSecurityManagerProxy.m b/ios/appcelerator.https/X509CertificatePinningSecurityManagerProxy.m
similarity index 100%
rename from iphone/appcelerator.https/X509CertificatePinningSecurityManagerProxy.m
rename to ios/appcelerator.https/X509CertificatePinningSecurityManagerProxy.m
diff --git a/iphone/appcelerator.https/appcelerator.https-Prefix.pch b/ios/appcelerator.https/appcelerator.https-Prefix.pch
similarity index 100%
rename from iphone/appcelerator.https/appcelerator.https-Prefix.pch
rename to ios/appcelerator.https/appcelerator.https-Prefix.pch
diff --git a/iphone/appcelerator.https/appcelerator.https.xcodeproj/project.pbxproj b/ios/appcelerator.https/appcelerator.https.xcodeproj/project.pbxproj
similarity index 100%
rename from iphone/appcelerator.https/appcelerator.https.xcodeproj/project.pbxproj
rename to ios/appcelerator.https/appcelerator.https.xcodeproj/project.pbxproj
diff --git a/iphone/appcelerator.https/appcelerator.https.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/ios/appcelerator.https/appcelerator.https.xcodeproj/project.xcworkspace/contents.xcworkspacedata
similarity index 100%
rename from iphone/appcelerator.https/appcelerator.https.xcodeproj/project.xcworkspace/contents.xcworkspacedata
rename to ios/appcelerator.https/appcelerator.https.xcodeproj/project.xcworkspace/contents.xcworkspacedata
diff --git a/iphone/appcelerator.https/appcelerator.https.xcodeproj/project.xcworkspace/xcuserdata/matt.xcuserdatad/UserInterfaceState.xcuserstate b/ios/appcelerator.https/appcelerator.https.xcodeproj/project.xcworkspace/xcuserdata/matt.xcuserdatad/UserInterfaceState.xcuserstate
similarity index 100%
rename from iphone/appcelerator.https/appcelerator.https.xcodeproj/project.xcworkspace/xcuserdata/matt.xcuserdatad/UserInterfaceState.xcuserstate
rename to ios/appcelerator.https/appcelerator.https.xcodeproj/project.xcworkspace/xcuserdata/matt.xcuserdatad/UserInterfaceState.xcuserstate
diff --git a/iphone/appcelerator.https/appcelerator.https.xcodeproj/xcuserdata/matt.xcuserdatad/xcschemes/appcelerator.https.xcscheme b/ios/appcelerator.https/appcelerator.https.xcodeproj/xcuserdata/matt.xcuserdatad/xcschemes/appcelerator.https.xcscheme
similarity index 100%
rename from iphone/appcelerator.https/appcelerator.https.xcodeproj/xcuserdata/matt.xcuserdatad/xcschemes/appcelerator.https.xcscheme
rename to ios/appcelerator.https/appcelerator.https.xcodeproj/xcuserdata/matt.xcuserdatad/xcschemes/appcelerator.https.xcscheme
diff --git a/iphone/appcelerator.https/appcelerator.https.xcodeproj/xcuserdata/matt.xcuserdatad/xcschemes/xcschememanagement.plist b/ios/appcelerator.https/appcelerator.https.xcodeproj/xcuserdata/matt.xcuserdatad/xcschemes/xcschememanagement.plist
similarity index 100%
rename from iphone/appcelerator.https/appcelerator.https.xcodeproj/xcuserdata/matt.xcuserdatad/xcschemes/xcschememanagement.plist
rename to ios/appcelerator.https/appcelerator.https.xcodeproj/xcuserdata/matt.xcuserdatad/xcschemes/xcschememanagement.plist
diff --git a/iphone/appcelerator.https/appcelerator.https/appcelerator.https-Prefix.pch b/ios/appcelerator.https/appcelerator.https/appcelerator.https-Prefix.pch
similarity index 100%
rename from iphone/appcelerator.https/appcelerator.https/appcelerator.https-Prefix.pch
rename to ios/appcelerator.https/appcelerator.https/appcelerator.https-Prefix.pch
diff --git a/iphone/appcelerator.https/appcelerator.https/appcelerator_https.h b/ios/appcelerator.https/appcelerator.https/appcelerator_https.h
similarity index 100%
rename from iphone/appcelerator.https/appcelerator.https/appcelerator_https.h
rename to ios/appcelerator.https/appcelerator.https/appcelerator_https.h
diff --git a/iphone/appcelerator.https/appcelerator.https/appcelerator_https.m b/ios/appcelerator.https/appcelerator.https/appcelerator_https.m
similarity index 100%
rename from iphone/appcelerator.https/appcelerator.https/appcelerator_https.m
rename to ios/appcelerator.https/appcelerator.https/appcelerator_https.m
diff --git a/iphone/appcelerator.https/appcelerator.httpsTests/appcelerator.httpsTests-Info.plist b/ios/appcelerator.https/appcelerator.httpsTests/appcelerator.httpsTests-Info.plist
similarity index 100%
rename from iphone/appcelerator.https/appcelerator.httpsTests/appcelerator.httpsTests-Info.plist
rename to ios/appcelerator.https/appcelerator.httpsTests/appcelerator.httpsTests-Info.plist
diff --git a/iphone/appcelerator.https/appcelerator.httpsTests/appcelerator_httpsTests.m b/ios/appcelerator.https/appcelerator.httpsTests/appcelerator_httpsTests.m
similarity index 100%
rename from iphone/appcelerator.https/appcelerator.httpsTests/appcelerator_httpsTests.m
rename to ios/appcelerator.https/appcelerator.httpsTests/appcelerator_httpsTests.m
diff --git a/iphone/appcelerator.https/appcelerator.httpsTests/en.lproj/InfoPlist.strings b/ios/appcelerator.https/appcelerator.httpsTests/en.lproj/InfoPlist.strings
similarity index 100%
rename from iphone/appcelerator.https/appcelerator.httpsTests/en.lproj/InfoPlist.strings
rename to ios/appcelerator.https/appcelerator.httpsTests/en.lproj/InfoPlist.strings
diff --git a/iphone/appcelerator.httpsTests/*.prod.ace.appcelerator.com-1.cer b/ios/appcelerator.httpsTests/*.prod.ace.appcelerator.com-1.cer
similarity index 100%
rename from iphone/appcelerator.httpsTests/*.prod.ace.appcelerator.com-1.cer
rename to ios/appcelerator.httpsTests/*.prod.ace.appcelerator.com-1.cer
diff --git a/iphone/appcelerator.httpsTests/*.prod.ace.appcelerator.com-2.cer b/ios/appcelerator.httpsTests/*.prod.ace.appcelerator.com-2.cer
similarity index 100%
rename from iphone/appcelerator.httpsTests/*.prod.ace.appcelerator.com-2.cer
rename to ios/appcelerator.httpsTests/*.prod.ace.appcelerator.com-2.cer
diff --git a/iphone/appcelerator.httpsTests/AbstractBaseTest.h b/ios/appcelerator.httpsTests/AbstractBaseTest.h
similarity index 100%
rename from iphone/appcelerator.httpsTests/AbstractBaseTest.h
rename to ios/appcelerator.httpsTests/AbstractBaseTest.h
diff --git a/iphone/appcelerator.httpsTests/AbstractBaseTest.m b/ios/appcelerator.httpsTests/AbstractBaseTest.m
similarity index 100%
rename from iphone/appcelerator.httpsTests/AbstractBaseTest.m
rename to ios/appcelerator.httpsTests/AbstractBaseTest.m
diff --git a/iphone/appcelerator.httpsTests/PinnedURLTests.m b/ios/appcelerator.httpsTests/PinnedURLTests.m
similarity index 100%
rename from iphone/appcelerator.httpsTests/PinnedURLTests.m
rename to ios/appcelerator.httpsTests/PinnedURLTests.m
diff --git a/iphone/appcelerator.httpsTests/PublicKeyTests.m b/ios/appcelerator.httpsTests/PublicKeyTests.m
similarity index 100%
rename from iphone/appcelerator.httpsTests/PublicKeyTests.m
rename to ios/appcelerator.httpsTests/PublicKeyTests.m
diff --git a/iphone/appcelerator.httpsTests/SecurityManagerTests.m b/ios/appcelerator.httpsTests/SecurityManagerTests.m
similarity index 100%
rename from iphone/appcelerator.httpsTests/SecurityManagerTests.m
rename to ios/appcelerator.httpsTests/SecurityManagerTests.m
diff --git a/iphone/appcelerator.httpsTests/X509CertificateTests.m b/ios/appcelerator.httpsTests/X509CertificateTests.m
similarity index 100%
rename from iphone/appcelerator.httpsTests/X509CertificateTests.m
rename to ios/appcelerator.httpsTests/X509CertificateTests.m
diff --git a/iphone/appcelerator.httpsTests/appcelerator.httpsTests-Info.plist b/ios/appcelerator.httpsTests/appcelerator.httpsTests-Info.plist
similarity index 100%
rename from iphone/appcelerator.httpsTests/appcelerator.httpsTests-Info.plist
rename to ios/appcelerator.httpsTests/appcelerator.httpsTests-Info.plist
diff --git a/iphone/appcelerator.httpsTests/en.lproj/InfoPlist.strings b/ios/appcelerator.httpsTests/en.lproj/InfoPlist.strings
similarity index 100%
rename from iphone/appcelerator.httpsTests/en.lproj/InfoPlist.strings
rename to ios/appcelerator.httpsTests/en.lproj/InfoPlist.strings
diff --git a/iphone/appcelerator.httpsTests/random-org.der b/ios/appcelerator.httpsTests/random-org.der
similarity index 100%
rename from iphone/appcelerator.httpsTests/random-org.der
rename to ios/appcelerator.httpsTests/random-org.der
diff --git a/iphone/appcelerator.httpsTests/random-org2.der b/ios/appcelerator.httpsTests/random-org2.der
similarity index 100%
rename from iphone/appcelerator.httpsTests/random-org2.der
rename to ios/appcelerator.httpsTests/random-org2.der
diff --git a/iphone/build.py b/ios/build.py
similarity index 100%
rename from iphone/build.py
rename to ios/build.py
diff --git a/iphone/manifest b/ios/manifest
similarity index 100%
rename from iphone/manifest
rename to ios/manifest
diff --git a/ios/metadata.json b/ios/metadata.json
new file mode 100644
index 0000000..43a62e5
--- /dev/null
+++ b/ios/metadata.json
@@ -0,0 +1 @@
+{"exports":[]}
\ No newline at end of file
diff --git a/iphone/module.xcconfig b/ios/module.xcconfig
similarity index 100%
rename from iphone/module.xcconfig
rename to ios/module.xcconfig
diff --git a/iphone/timodule.xml b/ios/timodule.xml
similarity index 100%
rename from iphone/timodule.xml
rename to ios/timodule.xml
diff --git a/iphone/titanium.xcconfig b/ios/titanium.xcconfig
similarity index 100%
rename from iphone/titanium.xcconfig
rename to ios/titanium.xcconfig