From 23a9e1bc513ccfb59af90e76385f25bb45eb192b Mon Sep 17 00:00:00 2001 From: Chris Conlon Date: Wed, 10 Aug 2022 14:59:01 -0600 Subject: [PATCH 1/4] bump version to 1.10 in WolfSSLProvider.java --- src/java/com/wolfssl/provider/jsse/WolfSSLProvider.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/java/com/wolfssl/provider/jsse/WolfSSLProvider.java b/src/java/com/wolfssl/provider/jsse/WolfSSLProvider.java index 2e202af0..3716a510 100644 --- a/src/java/com/wolfssl/provider/jsse/WolfSSLProvider.java +++ b/src/java/com/wolfssl/provider/jsse/WolfSSLProvider.java @@ -73,8 +73,8 @@ public void errorCallback(int ok, int err, String hash) { * wolfSSL JSSE Provider class */ public WolfSSLProvider() { - super("wolfJSSE", 1.8, "wolfSSL JSSE Provider"); - //super("wolfJSSE", "1.8", "wolfSSL JSSE Provider"); + super("wolfJSSE", 1.10, "wolfSSL JSSE Provider"); + //super("wolfJSSE", "1.10", "wolfSSL JSSE Provider"); /* load native wolfSSLJNI library */ WolfSSL.loadLibrary(); From 3924d59d5d072f64e7bab60a6c231bc59e476446 Mon Sep 17 00:00:00 2001 From: Chris Conlon Date: Wed, 10 Aug 2022 14:59:29 -0600 Subject: [PATCH 2/4] add manifest version/title/vendor info to build.xml jar target --- build.xml | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/build.xml b/build.xml index 7d7a89bf..5049045b 100644 --- a/build.xml +++ b/build.xml @@ -11,6 +11,11 @@ $JUNIT_HOME/junit.jar + + + + + @@ -157,6 +162,14 @@ + + + + + @@ -165,7 +178,16 @@ - + + + + + + + From 364db70e78b4621def7d9f79bec3d03bea6c797e Mon Sep 17 00:00:00 2001 From: Chris Conlon Date: Wed, 10 Aug 2022 14:59:47 -0600 Subject: [PATCH 3/4] add release notes for v1.10 --- README.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/README.md b/README.md index 6c936ec1..cbae3e5c 100644 --- a/README.md +++ b/README.md @@ -157,6 +157,30 @@ Additional instructions can be found on the wolfSSL.com website: ## Release Notes +### wolfSSL JNI Release 1.10.0 (8/11/2022) + +Release 1.10.0 has bug fixes and new features including: + +**JNI and JSSE Changes:** +* Add SSLEngine.getApplicationProtocol(), fixes Undertow compatibility (PR 84) +* Wrap wolfSSL\_UseALPN() at JNI level (PR 84) +* Fix compile error for wolfSSL < 4.2.0 and wolfSSL\_set\_alpn\_protos() (PR 84) +* Fix NullPointerException when no selected ALPN is available (PR 84) +* Fix JNI build when wolfSSL compiled with --disable-filesystem (PR 104) +* Fix SSLEngine compatibility with data larger than TLS record size (PR 105) +* Refactor SSLEngine handshake status to be more inline with SunJSSE (PR 105) +* Add verbose SSLEngine logging with "wolfsslengine.debug" property (PR 105) + +**Documentation Changes** +* Fix missing Javadoc warnings in ALPN code + +**Example Changes:** +* Update Android Studio IDE project to use Android 11 (SDK 30) + +The wolfSSL JNI Manual is available at: +http://www.wolfssl.com/documentation/wolfSSL-JNI-Manual.pdf. For build +instructions and more detailed comments, please check the manual. + ### wolfSSL JNI Release 1.9.0 (5/5/2022) Release 1.9.0 has bug fixes and new features including: From fb43575f29ae8a6269261c7091c65f006519ecf1 Mon Sep 17 00:00:00 2001 From: Chris Conlon Date: Wed, 10 Aug 2022 17:11:52 -0600 Subject: [PATCH 4/4] Update Android IDE example SDK to 30 for SSLParameters ALPN support --- IDE/Android/.idea/gradle.xml | 1 - IDE/Android/.idea/misc.xml | 7 ++++ IDE/Android/README.md | 6 +-- IDE/Android/app/build.gradle | 6 +-- IDE/Android/app/src/main/AndroidManifest.xml | 3 +- .../com/example/wolfssl/MainActivity.java | 40 +++++++++++++------ .../app/src/main/res/layout/activity_main.xml | 19 ++++++--- 7 files changed, 56 insertions(+), 26 deletions(-) diff --git a/IDE/Android/.idea/gradle.xml b/IDE/Android/.idea/gradle.xml index 526b4c25..a2d7c213 100644 --- a/IDE/Android/.idea/gradle.xml +++ b/IDE/Android/.idea/gradle.xml @@ -13,7 +13,6 @@ - diff --git a/IDE/Android/.idea/misc.xml b/IDE/Android/.idea/misc.xml index 860da66a..0c29bd6f 100644 --- a/IDE/Android/.idea/misc.xml +++ b/IDE/Android/.idea/misc.xml @@ -1,5 +1,12 @@ + + + diff --git a/IDE/Android/README.md b/IDE/Android/README.md index 37d5e786..9ce96573 100644 --- a/IDE/Android/README.md +++ b/IDE/Android/README.md @@ -6,11 +6,11 @@ project should be used for reference only. Tool and version information used when testing this project: - Ubuntu 20.04.3 LTS -- Android Studio Bumblebeea 2021.1.1 Patch 3 +- Android Studio Chipmunk 2021.2.1 - Android Gradle Plugin Version: 4.2.2 - Gradle Version: 7.1.3 -- API 28: Android 9.0 (Pie) -- Emulator: Nexus 5X API 28 +- API 30: Android 11 +- Emulator: Pixel 5 API 31 The following sections outline steps required to run this example on an Android device or emulator. diff --git a/IDE/Android/app/build.gradle b/IDE/Android/app/build.gradle index e698f103..1cb39b4d 100644 --- a/IDE/Android/app/build.gradle +++ b/IDE/Android/app/build.gradle @@ -1,11 +1,11 @@ apply plugin: 'com.android.application' android { - compileSdkVersion 28 + compileSdkVersion 30 defaultConfig { applicationId "com.example.wolfssl" - minSdkVersion 23 - targetSdkVersion 28 + minSdkVersion 30 + targetSdkVersion 30 versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" diff --git a/IDE/Android/app/src/main/AndroidManifest.xml b/IDE/Android/app/src/main/AndroidManifest.xml index f94f74da..1604ad3d 100644 --- a/IDE/Android/app/src/main/AndroidManifest.xml +++ b/IDE/Android/app/src/main/AndroidManifest.xml @@ -1,7 +1,7 @@ - + - diff --git a/IDE/Android/app/src/main/java/com/example/wolfssl/MainActivity.java b/IDE/Android/app/src/main/java/com/example/wolfssl/MainActivity.java index e77070ff..5a6022b4 100644 --- a/IDE/Android/app/src/main/java/com/example/wolfssl/MainActivity.java +++ b/IDE/Android/app/src/main/java/com/example/wolfssl/MainActivity.java @@ -22,11 +22,15 @@ package com.example.wolfssl; +import android.content.Intent; +import android.net.Uri; +import android.os.Environment; +import android.provider.Settings; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; +import android.view.View; +import android.widget.Button; import android.widget.TextView; -import android.Manifest; -import android.content.pm.PackageManager; import com.wolfssl.WolfSSL; import com.wolfssl.WolfSSLException; @@ -34,7 +38,6 @@ import com.wolfssl.provider.jsse.WolfSSLX509; import java.io.FileInputStream; -import java.io.FileNotFoundException; import java.io.IOException; import java.security.KeyStore; import java.security.KeyStoreException; @@ -48,25 +51,38 @@ public class MainActivity extends AppCompatActivity { + private View.OnClickListener buttonListener = new View.OnClickListener() { + @Override + public void onClick(View v) { + TextView tv = (TextView) findViewById(R.id.sample_text); + + try { + testLoadCert(tv); + } catch (Exception e) { + e.printStackTrace(); + } + } + }; + @Override protected void onCreate(Bundle savedInstanceState) { int permission; super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); + Button button = (Button) findViewById(R.id.button); + button.setOnClickListener(buttonListener); + TextView tv = (TextView) findViewById(R.id.sample_text); tv.setText("wolfSSL JNI Android Studio Example App"); - permission = checkSelfPermission(Manifest.permission.READ_EXTERNAL_STORAGE); - if (permission != PackageManager.PERMISSION_GRANTED) { - requestPermissions(new String[] {Manifest.permission.READ_EXTERNAL_STORAGE},1); - } - - try { - testLoadCert(tv); - } catch (Exception e) { - e.printStackTrace(); + if (Environment.isExternalStorageManager()) { + } else { + Intent intent = new Intent(Settings.ACTION_MANAGE_APP_ALL_FILES_ACCESS_PERMISSION); + Uri uri = Uri.fromParts("package", getPackageName(), null); + intent.setData(uri); + startActivity(intent); } } diff --git a/IDE/Android/app/src/main/res/layout/activity_main.xml b/IDE/Android/app/src/main/res/layout/activity_main.xml index 548354ac..1e49ea6b 100644 --- a/IDE/Android/app/src/main/res/layout/activity_main.xml +++ b/IDE/Android/app/src/main/res/layout/activity_main.xml @@ -1,20 +1,29 @@ - +