Quantcast
Channel: Intel Developer Zone Articles
Viewing all articles
Browse latest Browse all 3384

Intel Multi-OS Engine: Enabling HTTPS

$
0
0

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

  1. Create a ./java/security directory.
    mkdir –p ./java/security
  2. 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 ../../
  3. Zip the ./java directory to an application.jar file.
    zip –r application.jar ./java
  4. Finally, remove the ./java directory.
    rm –R ./java

Set up CA Certificates

  1. Create the ./android_root/etc/security/cacerts directory.
    mkdir –p ./ android_root/etc/security/cacerts
  2. 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:

Finder directory structure

In Android Studio the structure of your Intel INDE Multi-OS Engine module should look as follows:

Android Studio directory structure

The structure of the resulting Xcode* project should look as follows: 

Xcode directory structure

Now you should be able to use HTTPS in your project through the java.net.URL class.


Viewing all articles
Browse latest Browse all 3384

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>