-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #73 from cconlon/releasePrep
Release prep and fixes for 1.8.0
- Loading branch information
Showing
25 changed files
with
910 additions
and
291 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,43 @@ | ||
This is an example of use with Android Studio. | ||
# Android Studio Example Project | ||
|
||
An emulation of Nexus 4 API 23 (Android 6.0, API 23) was used with testing and Android Studio IDE version 3.3.2 was used. | ||
This is an example Android Studio project file for wolfssljni / wolfJSSE. This | ||
project should be used for reference only. | ||
|
||
Steps to run example: | ||
Tool and version information used when testing this project: | ||
|
||
1) On the Android device BKS format key stores are expected. To convert the JKS example bundles to BKS use the following commands: | ||
- Ubuntu 20.04.3 LTS | ||
- Android Studio Arctic Fox 2020.3.1 Patch 3 | ||
- Android Gradle Plugin Version: 4.2.2 | ||
- Gradle Version: 6.9.1 | ||
- API 28: Android 9.0 (Pie) | ||
- Emulator: Nexus 5X API 28 | ||
|
||
The following sections outline steps required to run this example on an | ||
Android device or emulator. | ||
|
||
## Converting JKS to BKS for Android Use | ||
|
||
On the Android device BKS format key stores are expected. To convert the | ||
JKS example bundles to BKS use the following commands. Note: you will need | ||
to download a version of the bcprov JAR from the Bouncy Castle website: | ||
|
||
``` | ||
cd examples/provider | ||
./convert-to-bks.sh <path/to/provider> | ||
``` | ||
|
||
exmaple: | ||
For exmaple, when using bcprov-ext-jdk15on-169.jar: | ||
|
||
``` | ||
cd examples/provider | ||
./convert-to-bks.sh ~/Downloads/bcprov-jdk15on-161.jar | ||
./convert-to-bks.sh ~/Downloads/bcprov-ext-jdk15on-169.jar | ||
``` | ||
|
||
2) Push BKS bundles up to the device along with certificates. To do this start up the emulator/device and use "adb push". An example of this would be the following commands from root wolfssljni directory: | ||
## Push BKS to Android Device or Emulator | ||
|
||
Push BKS bundles up to the device along with certificates. To do this start | ||
up the emulator/device and use `adb push`. An example of this would be the | ||
following commands from root wolfssljni directory: | ||
|
||
``` | ||
adb shell | ||
|
@@ -28,10 +50,56 @@ adb push ./examples/provider/*.bks /sdcard/examples/provider/ | |
adb push ./examples/certs/ /sdcard/examples/ | ||
``` | ||
|
||
3) Add wolfssl source code for compiling. The project looks for the directory wolfssljni/IDE/Android/app/src/main/cpp/wolfssl for wolfSSL source code. This can be done multiple ways one being to download the latest release from wolfSSL's website, unzip it, rename it to wolfssl, and place it in the direcotry wolfssljni/IDE/Android/app/src/main/cpp/. Alternatively GitHub can be used with "cd /IDE/Android/app/src/main/cpp/ && git clone https://github.com/wolfssl/wolfssl". And the final method to be mentioned in this document is by creating a symbolic link to a wolfssl directory on the system by using "cd /IDE/Android/app/src/main/cpp/ && ln -s /path/to/local/wolfssl ./wolfssl". | ||
## Add Native wolfSSL Library Source Code to Project | ||
|
||
This example project is already set up to compile and build the native | ||
wolfSSL library source files, but the wolfSSL files themselves have not been | ||
included in this package. You must download or link an appropriate version | ||
of wolfSSL to this project using one of the options below. | ||
|
||
The project looks for the directory | ||
`wolfssljni/IDE/Android/app/src/main/cpp/wolfssl` for wolfSSL source code. | ||
This can added in multiple ways: | ||
|
||
- OPTION A: Download the latest wolfSSL library release from www.wolfssl.com, | ||
unzip it, rename it to `wolfssl`, and place it in the direcotry | ||
`wolfssljni/IDE/Android/app/src/main/cpp/`. | ||
|
||
``` | ||
$ unzip wolfssl-X.X.X.zip | ||
$ mv wolfssl-X.X.X wolfssljni/IDE/Android/app/src/main/cpp/wolfssl | ||
``` | ||
|
||
- OPTION B: Alternatively GitHub can be used to clone wolfSSL: | ||
|
||
``` | ||
$ cd /IDE/Android/app/src/main/cpp/ | ||
$ git clone https://github.com/wolfssl/wolfssl | ||
$ cp wolfssl/options.h.in wolfssl/options.h | ||
``` | ||
|
||
- OPTION C: A symbolic link to a wolfssl directory on the system by using: | ||
|
||
``` | ||
$ cd /IDE/Android/app/src/main/cpp/ | ||
$ ln -s /path/to/local/wolfssl ./wolfssl | ||
``` | ||
|
||
## Importing and Building the Example Project with Android Studio | ||
|
||
4) Open the Android Studio project by double clicking on the `Android` folder | ||
in wolfssljni/IDE/ | ||
|
||
5) Build the project and run MainActivity from app -> java/com/example.wolfssl. | ||
This will ask for permissions to access the certificates in the /sdcard/ | ||
directory and then print out the server certificate information on success. | ||
|
||
6) OPTIONAL: The androidTests can be run after permissions has been given. | ||
app->java->com.wolfssl->provider.jsse.test->WolfSSLJSSETestSuite and | ||
app->java->com.wolfssl->test->WolfSSLTestSuite | ||
|
||
4) Open the Android studio project by double clicking on the Android folder in wolfssljni/IDE/ | ||
## Support | ||
|
||
5) Compile the project and run MainActivity from app -> java -> com -> example.wolfssl. This will ask for permissions to access the certificates in the /sdcard/ directory and then print out the server certificate information on success. | ||
Please contact wolfSSL support at [email protected] with any questions or | ||
feedback. | ||
|
||
6) OPTIONAL : The androidTests can then be ran after permissions has been given. app->java->com.wolfssl->provider.jsse.test->WolfSSLJSSETestSuite and app->java->com.wolfssl->test->WolfSSLTestSuite |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#Thu Apr 11 15:51:35 MDT 2019 | ||
#Thu Nov 04 15:51:08 MDT 2021 | ||
distributionBase=GRADLE_USER_HOME | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.9.1-bin.zip | ||
distributionPath=wrapper/dists | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip | ||
zipStoreBase=GRADLE_USER_HOME |
Oops, something went wrong.