Skip to content

Commit 7145792

Browse files
Merge pull request #101 from cconlon/0415
Release Prep and Fixes
2 parents e56b05b + 8849604 commit 7145792

59 files changed

Lines changed: 642 additions & 367 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

IDE/Android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ buildscript {
77

88
}
99
dependencies {
10-
classpath 'com.android.tools.build:gradle:4.2.2'
10+
classpath 'com.android.tools.build:gradle:7.1.3'
1111

1212
// NOTE: Do not place your application dependencies here; they belong
1313
// in the individual module build.gradle files
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#Thu Nov 04 15:51:08 MDT 2021
22
distributionBase=GRADLE_USER_HOME
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.9.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
44
distributionPath=wrapper/dists
55
zipStorePath=wrapper/dists
66
zipStoreBase=GRADLE_USER_HOME

README.md

Lines changed: 57 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
11

22
# wolfSSL JSSE Provider and JNI Wrapper
33

4-
This package provides both a wolfSSL Java JSSE provider (**wolfJSSE**), and a
5-
thin JNI-based interface to the native
6-
[wolfSSL embedded SSL/TLS library](https://www.wolfssl.com/products/wolfssl/).
7-
These provide Java applications with SSL/TLS support up to the current
8-
[TLS 1.3](https://www.wolfssl.com/tls13) protocol standard.
4+
This package provides Java support for the
5+
[wolfSSL embedded SSL/TLS library](https://www.wolfssl.com/products/wolfssl/),
6+
giving applications support for SSL/TLS up to the current
7+
[TLS 1.3](https://www.wolfssl.com/tls13) protocol level.
8+
It contains both a wolfSSL **JSSE** (Java Secure Socket Extension) provider,
9+
called **wolfJSSE**, and a thin JNI-based interface that wraps the native C
10+
library.
11+
12+
wolfSSL also provides a **JCE** (Java Cryptography Extension) provider that
13+
wraps native wolfCrypt. This can be found in a separate repository, located
14+
[here](https://github.com/wolfSSL/wolfcrypt-jni).
915

1016
## Why use wolfJSSE?
1117

@@ -19,10 +25,10 @@ and more!
1925

2026
## User Manual
2127

22-
The wolfSSL JNI/JSSE Manual is available on wolfssl.com:
28+
The wolfSSL JNI/JSSE Manual is available on the wolfSSL website:
2329
[wolfSSL JNI Manual](https://www.wolfssl.com/documentation/wolfSSL-JNI-Manual.pdf).
2430

25-
For additional build instructions and more detailed comments, please check
31+
For additional build instructions and more detailed comments, please reference
2632
the manual.
2733

2834
## Building
@@ -40,11 +46,12 @@ Build targets for ant are :
4046
* **ant clean** (cleans all Java artifacts)
4147
* **ant cleanjni** (cleans native artifacts)
4248

43-
wolfJSSE currently supports compilation on Linux/Unix and Android.
49+
wolfJSSE currently supports compilation on Linux/Unix, OSX, and Android.
4450

45-
To build wolfJSSE on Linux, first download, compile, and install wolfSSL.
46-
wolfSSL can be downloaded from the wolfSSL download page or cloned from
47-
GitHub.
51+
To build wolfJSSE in Linux/Unix environments, first download, compile, and
52+
install wolfSSL. wolfSSL can be downloaded from the wolfSSL
53+
[download page](https://www.wolfssl.com/download/) or cloned from
54+
[GitHub](https://github.com/wolfssl/wolfssl).
4855

4956
```
5057
$ unzip wolfssl-X.X.X.zip
@@ -60,6 +67,7 @@ Then, to build wolfJSSE:
6067
$ cd wolfssljni
6168
$ ./java.sh
6269
$ ant
70+
$ export JUNIT_HOME=/path/to/junit/jars
6371
$ ant test
6472
```
6573

@@ -82,7 +90,7 @@ $ ./examples/provider/ClientJSSE.sh
8290
Examples of using wolfssljni can be found in the `./examples` subdirectory.
8391
See [examples/README.md](./examples/README.md) for more details.
8492

85-
Examples of using wolfJSSE can be found in the `./examples/provider`
93+
Examples of using the wolfJSSE provider can be found in the `./examples/provider`
8694
subdirectory. See [examples/provider/README.md](./examples/provider/README.md)
8795
for more details.
8896

@@ -106,23 +114,24 @@ Android AOSP at the system-level.
106114

107115
An example Android Studio application is included in this package, to show
108116
users how they could include the wolfSSL native and wolfSSL JNI/JSSE sources
109-
in an Androi Studio application. For more details, see the Android Studio
117+
in an Android Studio application. For more details, see the Android Studio
110118
project and README.md located in the [./IDE/Android](./IDE/Android) directory.
111119

112120
Using wolfJSSE at the application level will allow developers to register
113121
wolfJSSE as a Security provider at the application scope. The application can
114-
they use the Java Security API for SSL/TLS operations which will then use the
122+
use the Java Security API for SSL/TLS operations which will then use the
115123
underlying wolfJSSE provider (and subsequently native wolfSSL).
116124

117-
Applications can add the wolfJSSE provider using:
125+
Applications can register the wolfJSSE provider using:
118126

119127
```
120128
import com.wolfssl.provider.jsse.WolfSSLProvider;
121129
...
122130
Security.addProvider(new WolfSSLProvider());
123131
```
124132

125-
To instead insert the WolfSSLProvider as the top priority provider:
133+
To instead insert the WolfSSLProvider as the top priority provider, or at
134+
a specified index (note: indexing starts at 1):
126135

127136
```
128137
import com.wolfssl.provider.jsse.WolfSSLProvider;
@@ -148,12 +157,38 @@ Additional instructions can be found on the wolfSSL.com website:
148157

149158
## Release Notes
150159

151-
### wolfSSL JNI Release X.X.X (TBD)
152-
153-
Release X.X.X has bug fixes and new features including:
154-
155-
* Removal of HC-128 stream cipher support. Native wolfSSL removed HC-128
156-
support in [PR #4767](https://github.com/wolfSSL/wolfssl/pull/4767)
160+
### wolfSSL JNI Release 1.9.0 (TBD)
161+
162+
Release 1.9.0 has bug fixes and new features including:
163+
164+
**JNI and JSSE Changes:**
165+
* Add synchronization to class cleanup/free routines (PR 78)
166+
* Fix JNI native casting to use utintptr\_t instead of intptr\_t (PR 79)
167+
* Add support for newer Java versions (ex: Java 17) (PR 90)
168+
* Remove HC-128 support (PR 94). Native wolfSSL removed with
169+
[PR #4767](https://github.com/wolfSSL/wolfssl/pull/4767)
170+
* Remove RABBIT support (PR 96). Native wolfSSL removed with
171+
[PR #4774](https://github.com/wolfSSL/wolfssl/pull/4767)
172+
* Remove IDEA support (PR 97). Native wolfSSL removed in
173+
[PR #4806](https://github.com/wolfSSL/wolfssl/pull/4806).
174+
* Fix typecasting issues and cleanup for native argument checking (PR 98, 99)
175+
* Add Socket timeout support for native SSL\_connect/write() (PR 95)
176+
* SSLSocket.getSession() now tries to do TLS handshake if not completed (PR 76)
177+
* Fix shutdown/close\_notify alert handling in WolfSSLEngine (PR 83)
178+
* Fix WolfSSLSocket to test if close() called before object init (PR 88)
179+
* Add support for loading default system CA certs on Java 9+ (PR 89)
180+
* Fix timeout behavior with WolfSSLSession.connect() (PR 100)
181+
182+
**Example Changes:**
183+
* Print wolfJSSE provider info in JSSE ProviderTest (PR 77)
184+
* Add option to ClientJSSE to do one session resumption (PR 80)
185+
* Update example certificates and keys (PR 81)
186+
187+
**Documentation Changes:**
188+
* Add missing Javadocs, fix warnings on newer Java versions (PR 92)
189+
190+
**Testing Changes:**
191+
* Update junit dependency to 4.13.2 (PR 91)
157192

158193
The wolfSSL JNI Manual is available at:
159194
http://www.wolfssl.com/documentation/wolfSSL-JNI-Manual.pdf. For build

examples/certs/ca-cert.pem

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ Certificate:
22
Data:
33
Version: 3 (0x2)
44
Serial Number:
5-
7d:94:70:88:ba:07:42:8d:aa:af:4f:be:c2:1a:48:f0:d1:40:e6:42
5+
26:8c:93:f9:f9:f4:1e:b3:01:72:94:55:67:6d:e2:f8:3d:da:e9:f4
66
Signature Algorithm: sha256WithRSAEncryption
77
Issuer: C = US, ST = Montana, L = Bozeman, O = Sawtooth, OU = Consulting, CN = www.wolfssl.com, emailAddress = info@wolfssl.com
88
Validity
9-
Not Before: Dec 20 23:07:24 2021 GMT
10-
Not After : Sep 15 23:07:24 2024 GMT
9+
Not Before: Feb 15 12:50:24 2022 GMT
10+
Not After : Nov 11 12:50:24 2024 GMT
1111
Subject: C = US, ST = Montana, L = Bozeman, O = Sawtooth, OU = Consulting, CN = www.wolfssl.com, emailAddress = info@wolfssl.com
1212
Subject Public Key Info:
1313
Public Key Algorithm: rsaEncryption
@@ -38,7 +38,7 @@ Certificate:
3838
X509v3 Authority Key Identifier:
3939
keyid:27:8E:67:11:74:C3:26:1D:3F:ED:33:63:B3:A4:D8:1D:30:E5:E8:D5
4040
DirName:/C=US/ST=Montana/L=Bozeman/O=Sawtooth/OU=Consulting/CN=www.wolfssl.com/emailAddress=info@wolfssl.com
41-
serial:7D:94:70:88:BA:07:42:8D:AA:AF:4F:BE:C2:1A:48:F0:D1:40:E6:42
41+
serial:26:8C:93:F9:F9:F4:1E:B3:01:72:94:55:67:6D:E2:F8:3D:DA:E9:F4
4242

4343
X509v3 Basic Constraints:
4444
CA:TRUE
@@ -47,27 +47,27 @@ Certificate:
4747
X509v3 Extended Key Usage:
4848
TLS Web Server Authentication, TLS Web Client Authentication
4949
Signature Algorithm: sha256WithRSAEncryption
50-
b0:71:bb:ba:45:5a:80:25:02:a4:7e:88:0b:a9:7b:fd:b0:bb:
51-
f6:46:b5:ba:f4:c7:e3:61:20:8c:03:15:66:f5:e4:54:82:ef:
52-
13:80:97:22:67:c1:d1:88:5d:e2:2d:57:f6:e0:9f:69:d6:b1:
53-
5c:b6:e8:e0:98:89:c8:14:12:d6:b6:89:8d:6c:b9:a0:59:4f:
54-
92:ee:11:53:6b:7d:93:4a:69:0a:85:d9:d5:d2:62:e8:c9:b5:
55-
c6:4e:17:f5:0a:e8:f3:2d:86:61:0b:eb:c4:c4:c6:67:75:ed:
56-
9a:9f:53:a0:71:1e:a0:90:0d:f9:03:b4:bc:86:19:6e:f0:3b:
57-
4f:e8:ed:68:f6:e7:23:43:3b:36:83:83:4b:46:a0:9a:01:d0:
58-
c7:85:bb:7d:94:a0:21:3d:7e:3c:6a:3d:81:db:41:7b:46:d8:
59-
15:62:d5:8f:4d:3d:c0:db:9a:c5:81:a8:ac:da:87:99:c7:dd:
60-
b9:f1:14:af:d1:93:e3:f3:42:d7:a2:04:51:21:54:29:c3:45:
61-
f6:be:5c:fa:cd:db:bf:2f:79:81:42:e5:8f:47:0b:d4:54:01:
62-
b5:c2:4a:46:d6:a8:31:2e:64:80:3f:48:61:91:29:f3:aa:43:
63-
5c:69:6e:f1:01:b9:df:63:71:3d:b9:5a:fb:36:c0:11:a2:c3:
64-
30:9d:95:c3
50+
62:e4:1b:28:3c:9d:d2:60:a9:55:be:6a:f6:20:f2:da:e8:a1:
51+
1a:97:b1:90:77:82:ed:c7:77:29:53:33:18:10:62:e0:bd:93:
52+
1b:d2:d6:a1:80:43:1d:64:f1:42:92:ec:b7:b8:f0:6b:da:59:
53+
83:f4:b8:87:e6:fc:70:21:ea:62:32:70:68:14:0e:dc:b4:f1:
54+
66:e2:6e:ab:d2:72:6f:da:df:71:f6:3d:27:97:7d:be:e1:d1:
55+
ac:16:ad:d7:4f:aa:9d:0c:1e:6e:a9:5e:7d:57:5b:3c:c7:6d:
56+
d2:f2:5c:c3:dc:3d:36:99:8e:ab:c0:7f:13:a5:f4:67:8b:e2:
57+
a6:51:31:f1:03:91:00:a8:c4:c5:1d:7f:35:62:b8:1d:a0:a5:
58+
ab:ec:32:68:ee:f3:ca:48:16:9f:f4:1e:7e:ea:fa:b0:86:15:
59+
52:36:6c:4b:58:44:a7:eb:20:78:6e:7e:e8:00:40:ac:98:d8:
60+
53:f3:13:4b:b8:98:66:50:63:ed:af:e5:a4:f6:c9:90:1c:84:
61+
0a:09:45:2f:a1:e1:37:63:b5:43:8c:a0:2e:7f:c4:d4:e1:ae:
62+
b7:b9:45:13:f8:70:d5:79:06:4f:82:83:4b:98:d7:56:47:64:
63+
9a:6a:6d:8e:7a:9d:ef:83:0f:6b:75:0e:47:22:92:f3:b4:b2:
64+
84:61:1f:1c
6565
-----BEGIN CERTIFICATE-----
66-
MIIE/zCCA+egAwIBAgIUfZRwiLoHQo2qr0++whpI8NFA5kIwDQYJKoZIhvcNAQEL
66+
MIIE/zCCA+egAwIBAgIUJoyT+fn0HrMBcpRVZ23i+D3a6fQwDQYJKoZIhvcNAQEL
6767
BQAwgZQxCzAJBgNVBAYTAlVT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D
88-
FWb15FSC7xOAlyJnwdGIXeItV/bgn2nWsVy26OCYicgUEta2iY1suaBZT5LuEVNr
89-
fZNKaQqF2dXSYujJtcZOF/UK6PMthmEL68TExmd17ZqfU6BxHqCQDfkDtLyGGW7w
90-
O0/o7Wj25yNDOzaDg0tGoJoB0MeFu32UoCE9fjxqPYHbQXtG2BVi1Y9NPcDbmsWB
91-
qKzah5nH3bnxFK/Rk+PzQteiBFEhVCnDRfa+XPrN278veYFC5Y9HC9RUAbXCSkbW
92-
qDEuZIA/SGGRKfOqQ1xpbvEBud9jcT25Wvs2wBGiwzCdlcM=
87+
DQYJKoZIhvcNAQELBQADggEBAGLkGyg8ndJgqVW+avYg8trooRqXsZB3gu3HdylT
88+
MxgQYuC9kxvS1qGAQx1k8UKS7Le48GvaWYP0uIfm/HAh6mIycGgUDty08WbibqvS
89+
cm/a33H2PSeXfb7h0awWrddPqp0MHm6pXn1XWzzHbdLyXMPcPTaZjqvAfxOl9GeL
90+
4qZRMfEDkQCoxMUdfzViuB2gpavsMmju88pIFp/0Hn7q+rCGFVI2bEtYRKfrIHhu
91+
fugAQKyY2FPzE0u4mGZQY+2v5aT2yZAchAoJRS+h4TdjtUOMoC5/xNThrre5RRP4
92+
cNV5Bk+Cg0uY11ZHZJpqbY56ne+DD2t1DkcikvO0soRhHxw=
9393
-----END CERTIFICATE-----

examples/certs/ca-ecc-cert.pem

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ Certificate:
22
Data:
33
Version: 3 (0x2)
44
Serial Number:
5-
2f:c0:2c:fe:1f:6a:5a:0b:dd:f6:08:63:99:42:7e:19:92:fa:dc:32
5+
29:bf:2b:cd:bf:55:54:49:85:b3:69:4e:e1:85:37:79:1e:81:f9:c2
66
Signature Algorithm: ecdsa-with-SHA256
77
Issuer: C = US, ST = Washington, L = Seattle, O = wolfSSL, OU = Development, CN = www.wolfssl.com, emailAddress = info@wolfssl.com
88
Validity
9-
Not Before: Dec 20 23:07:24 2021 GMT
10-
Not After : Sep 15 23:07:24 2024 GMT
9+
Not Before: Feb 15 12:50:24 2022 GMT
10+
Not After : Nov 11 12:50:24 2024 GMT
1111
Subject: C = US, ST = Washington, L = Seattle, O = wolfSSL, OU = Development, CN = www.wolfssl.com, emailAddress = info@wolfssl.com
1212
Subject Public Key Info:
1313
Public Key Algorithm: id-ecPublicKey
@@ -31,23 +31,23 @@ Certificate:
3131
X509v3 Key Usage: critical
3232
Digital Signature, Certificate Sign, CRL Sign
3333
Signature Algorithm: ecdsa-with-SHA256
34-
30:45:02:21:00:f2:a0:7a:0f:66:05:ec:81:a2:94:6a:31:e0:
35-
0d:ee:8f:6a:ed:63:33:0e:27:31:b3:cf:c8:a0:0e:5b:88:51:
36-
fa:02:20:51:0f:26:46:95:37:8e:49:4e:b0:4d:cd:b1:65:fe:
37-
2d:43:ab:20:c7:83:70:44:11:13:86:a5:9b:3b:34:24:f2
34+
30:44:02:20:78:ed:4c:1c:a7:2d:b3:35:0b:1d:46:a3:37:31:
35+
0b:8a:05:39:c8:28:31:58:35:f1:98:f7:4b:72:c0:4f:e6:7f:
36+
02:20:02:f2:09:2b:3a:e1:36:92:bf:58:6a:03:12:2d:79:e6:
37+
bd:06:45:61:b9:0e:39:e1:9c:f0:a8:2e:0b:1e:8c:b2
3838
-----BEGIN CERTIFICATE-----
39-
MIIClTCCAjugAwIBAgIUL8As/h9qWgvd9ghjmUJ+GZL63DIwCgYIKoZIzj0EAwIw
39+
MIIClDCCAjugAwIBAgIUKb8rzb9VVEmFs2lO4YU3eR6B+cIwCgYIKoZIzj0EAwIw
4040
gZcxCzAJBgNVBAYTAlVTMRMwEQYDVQQIDApXYXNoaW5ndG9uMRAwDgYDVQQHDAdT
4141
ZWF0dGxlMRAwDgYDVQQKDAd3b2xmU1NMMRQwEgYDVQQLDAtEZXZlbG9wbWVudDEY
4242
MBYGA1UEAwwPd3d3LndvbGZzc2wuY29tMR8wHQYJKoZIhvcNAQkBFhBpbmZvQHdv
43-
bGZzc2wuY29tMB4XDTIxMTIyMDIzMDcyNFoXDTI0MDkxNTIzMDcyNFowgZcxCzAJ
43+
bGZzc2wuY29tMB4XDTIyMDIxNTEyNTAyNFoXDTI0MTExMTEyNTAyNFowgZcxCzAJ
4444
BgNVBAYTAlVTMRMwEQYDVQQIDApXYXNoaW5ndG9uMRAwDgYDVQQHDAdTZWF0dGxl
4545
MRAwDgYDVQQKDAd3b2xmU1NMMRQwEgYDVQQLDAtEZXZlbG9wbWVudDEYMBYGA1UE
4646
AwwPd3d3LndvbGZzc2wuY29tMR8wHQYJKoZIhvcNAQkBFhBpbmZvQHdvbGZzc2wu
4747
Y29tMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEAtPZbtYBjkXIuZAx5cBM456t
4848
KTiYuhDW6QkqgKkuFyq5ir8zg0bjlQvkd0C1O0NFMw9hU3w3RMHL/IDK6EPqp6Nj
4949
MGEwHQYDVR0OBBYEFFaOmsPwQt4YuUVVbvmTz+rD86UhMB8GA1UdIwQYMBaAFFaO
5050
msPwQt4YuUVVbvmTz+rD86UhMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQD
51-
AgGGMAoGCCqGSM49BAMCA0gAMEUCIQDyoHoPZgXsgaKUajHgDe6Pau1jMw4nMbPP
52-
yKAOW4hR+gIgUQ8mRpU3jklOsE3NsWX+LUOrIMeDcEQRE4almzs0JPI=
51+
AgGGMAoGCCqGSM49BAMCA0cAMEQCIHjtTBynLbM1Cx1GozcxC4oFOcgoMVg18Zj3
52+
S3LAT+Z/AiAC8gkrOuE2kr9YagMSLXnmvQZFYbkOOeGc8KguCx6Msg==
5353
-----END CERTIFICATE-----

examples/certs/client-cert.der

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)