The standard java.net.URL
class provides HTTPS functionality. To make it work you only need to set up security providers and CA certificates (cacerts).
Here is how you can do this on Mac OS X* from the command line.
Change the current directory to the resources
directory of your Intel INDE Multi-OS Engine module and do the following:
Set up Security Providers
- Create a
./java/security
directory.mkdir –p ./java/security
- Copy the security.properties file from the Android code repository to the directory you created in the previous step.
cd ./java/security/ curl –o ./security.tar.gz “https://android.googlesource.com/platform/libcore/+archive/master/luni/src/main/java/java/security.tar.gz” tar --extract --file=./security.tar.gz ./security.properties rm ./security.tar.gz cd ../../
- Zip the
./java
directory to anapplication.jar
file.zip –r application.jar ./java
- Finally, remove the
./java
directory.rm –R ./java
Set up CA Certificates
- Create the
./android_root/etc/security/cacerts
directory.mkdir –p ./ android_root/etc/security/cacerts
- Copy the cacerts directory from the Android code repository to the directory you created in the previous step.
cd ./android_root/etc/security/cacerts curl –o ./cacerts.tar.gz “https://android.googlesource.com/platform/libcore/+archive/master/luni/src/main/files/cacerts.tar.gz” tar --extract --file=./cacerts.tar.gz rm ./cacerts.tar.gz cd ../../../../
In the Finder application the resulting directory structure of your Intel INDE Module should look as follows:
In Android Studio the structure of your Intel INDE Multi-OS Engine module should look as follows:
The structure of the resulting Xcode* project should look as follows:
Now you should be able to use HTTPS in your project through the java.net.URL class
.