Skip to content

Commit b09a5b8

Browse files
committed
Android: update wolfcryptjni-ndk-gradle, wolfCrypt JNI to v1.3.0-stable, wolfSSL to v5.3.0-stable
1 parent be12343 commit b09a5b8

5 files changed

Lines changed: 22 additions & 13 deletions

File tree

android/wolfcryptjni-ndk-gradle/app/CMakeLists.txt

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,20 @@
44
# Sets the minimum version of CMake required to build the native library.
55

66
cmake_minimum_required(VERSION 3.4.1)
7+
project("wolfcryptjni-ndk-gradle")
78

8-
# Add preprocessor defines to CFLAGS
9-
add_definitions(-DNO_DSA -DNO_PSK -DNO_MD4 -DNO_HC128 -DNO_RABBIT
10-
-DWOLFSSL_SHA512 -DWOLFSSL_SHA384 -DHAVE_AESGCM -DHAVE_HASHDRBG
11-
-DHAVE_ECC -DWOLFSSL_KEY_GEN -DNO_PWDBASED -DUSE_FAST_MATH
12-
-DTFM_ECC256 -DHAVE_DH -DUSE_FAST_MATH -DTFM_TIMING_RESISTANT
13-
-DECC_TIMING_RESISTANT -DWC_RSA_BLINDING -DTFM_NO_ASM
14-
)
9+
# Add preprocessor defines to CFLAGS. These mirror the CFLAGS set in
10+
# wolfssl/options.h if using './configure --enable-keygen'
11+
add_definitions(-DUSE_FAST_MATH -DTFM_TIMING_RESISTANT -DECC_TIMING_RESISTANT
12+
-DWC_RSA_BLINDING -DWOLFSSL_SHA224 -DWOLFSSL_SHA384
13+
-DWOLFSSL_SHA512 -DHAVE_HKDF -DNO_DSA -DHAVE_ECC -DTFM_ECC256
14+
-DECC_SHAMIR -DWC_RSA_PSS -DWOLFSSL_BASE64_ENCODE -DWOLFSSL_SHA3
15+
-DHAVE_POLY1305 -DHAVE_CHACHA -DHAVE_HASHDRBG
16+
-DHAVE_TLS_EXTENSIONS -DHAVE_SUPPORTED_CURVES -DHAVE_FFDHE_2048
17+
-DWOLFSSL_TLS13 -DHAVE_EXTENDED_MASTER -DNO_RC4 -DNO_MD4
18+
-DHAVE_ENCRYPT_THEN_MAC -DNO_PSK -DHAVE_DH_DEFAULT_PARAMS
19+
-DWOLFSSL_KEY_GEN -DNO_DES3 -DGCM_TABLE_4BIT -DHAVE_AESGCM
20+
-DTFM_NO_ASM)
1521

1622
# set wolfSSL JNI location as environment variable, change if needed
1723
set(wolfcryptjni_DIR ${CMAKE_SOURCE_DIR}/../wolfcrypt-jni)
@@ -52,6 +58,7 @@ add_library(wolfssl SHARED
5258
${wolfssl_DIR}/wolfcrypt/src/hash.c
5359
${wolfssl_DIR}/wolfcrypt/src/hmac.c
5460
${wolfssl_DIR}/wolfcrypt/src/integer.c
61+
${wolfssl_DIR}/wolfcrypt/src/kdf.c
5562
${wolfssl_DIR}/wolfcrypt/src/logging.c
5663
${wolfssl_DIR}/wolfcrypt/src/md2.c
5764
${wolfssl_DIR}/wolfcrypt/src/md4.c
@@ -99,6 +106,7 @@ add_library(wolfcryptjni SHARED
99106
${wolfcryptjni_DIR}/jni/jni_ecc.c
100107
${wolfcryptjni_DIR}/jni/jni_ed25519.c
101108
${wolfcryptjni_DIR}/jni/jni_error.c
109+
${wolfcryptjni_DIR}/jni/jni_feature_detect.c
102110
${wolfcryptjni_DIR}/jni/jni_fips.c
103111
${wolfcryptjni_DIR}/jni/jni_hmac.c
104112
${wolfcryptjni_DIR}/jni/jni_logging.c
@@ -107,6 +115,7 @@ add_library(wolfcryptjni SHARED
107115
${wolfcryptjni_DIR}/jni/jni_rng.c
108116
${wolfcryptjni_DIR}/jni/jni_rsa.c
109117
${wolfcryptjni_DIR}/jni/jni_sha.c
118+
${wolfcryptjni_DIR}/jni/jni_wolfobject.c
110119
)
111120

112121
# Include libraries needed for wolfSSL and wolfCrypt JNI libs

android/wolfcryptjni-ndk-gradle/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ buildscript {
66
google()
77
}
88
dependencies {
9-
classpath 'com.android.tools.build:gradle:3.4.1'
9+
classpath 'com.android.tools.build:gradle:7.2.0'
1010

1111
// NOTE: Do not place your application dependencies here; they belong
1212
// in the individual module build.gradle files
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Wed Jul 03 11:55:41 PDT 2019
1+
#Mon May 23 14:17:29 MDT 2022
22
distributionBase=GRADLE_USER_HOME
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
34
distributionPath=wrapper/dists
4-
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-5.5-all.zip
6+
zipStoreBase=GRADLE_USER_HOME
Submodule wolfcrypt-jni updated 114 files
Submodule wolfssl updated 1795 files

0 commit comments

Comments
 (0)