Skip to content

Commit

Permalink
Clean Android CI Dependencies and add PKCS11 documentation (#457)
Browse files Browse the repository at this point in the history
* remove unnecessary dependencies in test app

* Add documentation for Android PKCS#11 library requirements
  • Loading branch information
sbSteveK authored Jan 10, 2024
1 parent 92e9ff7 commit ebf80fc
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
9 changes: 9 additions & 0 deletions documents/ANDROID.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ a dependency of the aws-iot-device-sdk-android library.
* [Consuming from Maven](#consuming-from-maven)
* [Consuming from locally installed](#consuming-from-locally-installed)
* [Samples App](#samples-app)
* [PKCS#11](#pkcs11)

## Installation

Expand Down Expand Up @@ -94,3 +95,11 @@ Look up the latest SDK version here: https://github.com/aws/aws-iot-device-sdk-j
## Samples App
[Android IoT Samples App README](../samples/Android/README.md)

## PKCS#11
Connecting using PKCS#11 requires a PKCS#11 library which the user must supply. There are requirements the library must meet:
* The PKCS#11 library **must** be compiled for Android and for use on the architecture of the target device.
* The PKCS#11 library **must** have access to the PKCS#11 compatible smart card or Hardware Security Module (HSM) for storage and access to the private key file.
* The path to the library needs to be provided to the [AwsIotMqtt5ClientBuilder](https://github.com/aws/aws-iot-device-sdk-java-v2/blob/92e9ff7dff1cdb191b16c8e52710cc731df04c08/sdk/src/main/java/software/amazon/awssdk/iot/AwsIotMqtt5ClientBuilder.java#L109C24-L109C24) for it to load and use the PKCS#11 library. ([The PKCS#11 Sample](../samples/Pkcs11Connect/README.md) can be used as a reference)
* The PKCS#11 library must not be compressed (When packaging assets into an Android APK, the assets are routinely compressed) and if it is compressed, must be uncompressed before providing the file location.

A java sample using PKCS#11 can be found here: [Java PKCS#11 Sample](../samples/Pkcs11Connect/README.md)
11 changes: 1 addition & 10 deletions sdk/tests/android/testapp/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ buildscript {
allprojects {
repositories{
google()
mavenLocal()
mavenCentral()
}
}
Expand Down Expand Up @@ -57,12 +58,6 @@ android {
sourceCompatibility = 1.8
targetCompatibility = 1.8
}
ndkVersion '23.1.7779620'
}

repositories {
mavenLocal()
mavenCentral()
}

dependencies {
Expand All @@ -75,13 +70,9 @@ dependencies {
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'

testImplementation 'junit:junit:4.13'
testImplementation 'junit:junit:4.12'

androidTestImplementation "androidx.test:core:1.2.0"

androidTestImplementation "androidx.test:runner:1.5.2"
androidTestImplementation "androidx.test:rules:1.5.0"

androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import androidx.test.ext.junit.runners.AndroidJUnit4

import org.junit.Test
import org.junit.runner.RunWith
import org.junit.Before
import org.junit.Assert.*

import java.lang.System
Expand Down

0 comments on commit ebf80fc

Please sign in to comment.