Skip to content

Commit 5e430a1

Browse files
Merge pull request #231 from cconlon/v1.14release
Prep for 1.14 Release
2 parents 55c3193 + 13e73db commit 5e430a1

8 files changed

Lines changed: 124 additions & 23 deletions

File tree

ChangeLog.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,70 @@
1+
### wolfSSL JNI Release 1.14.0 (11/7/2024)
2+
3+
Release 1.14.0 has bug fixes and new features including:
4+
5+
**New JSSE Functionality:**
6+
* Add wolfJCE WKS KeyStore type support (PR 178)
7+
* Add support for native `poll()` and set as default over `select()` (PR 201)
8+
* Add `getSSLParameters()` to SSLServerSocket implementation (PR 214)
9+
* Add `rsa_pss` support and tests to wolfJSSE (PR 218)
10+
* Add LDAPS endpoint identification to X509ExtendedTrustManager (PR 227)
11+
12+
**JSSE System/Security Property Support:**
13+
* Add option to print debug logs in JSON format (`wolfjsse.debugFormat=JSON`) (PR 187)
14+
* Add Security property to disable Java client session cache (`wolfjsse.clientSessionCache.disabled=true`) (PR 225)
15+
16+
**JSSE Changes:**
17+
* Fix for native memory leak when calling `wolfSSL_get_peer_certificate()` (PR 188)
18+
* Optimization to allow for easier garbage collection (PR 189)
19+
* Fix for SSLEngine session storage and unwrap() FINISHED state (PR 193)
20+
* Fix to not close SSLSocket when SSLServerSocket is closed (PR 194)
21+
* Fix for getting end of stream when calling InputStream.read() (PR 195)
22+
* Fix for throwing exceptions on KeyManagerFactory/TrustManagerFactory use before init (PR 196)
23+
* Fix for SSLEngine HandshakeStatus when receiving TLS 1.3 session tickets after handshake (PR 197)
24+
* Throw SSLException to indicate lack of renegotiation support in `SSLEngine.beginHandshake()` (PR 197)
25+
* Fix to mark inbound and outbound closed in SSLEngine when fatal alerts are received (PR 197)
26+
* Return `X509Certificate[]` from `SSLSession.getPeerCertificates()` (PR 199)
27+
* Remove unneeded `SSLServerSocket.close()` method (PR 200)
28+
* Fix `SSLSession.getLocalPrincipal()` to assume user cert is first in chain (PR 204)
29+
* Ensure that socket is closed if implicit handshake in `SSLSocket.getSession()` fails (PR 205)
30+
* If SSLSocket handshake is unsuccessful, close Socket before throwing an exception (PR 205)
31+
* Close SSLEngine inbound on ALPN protocol name error (PR 208)
32+
* Adjust client-side session resumption to check cipher suite and protocol (PR 209)
33+
* Pass lower level exception messages up during X509TrustManager verification (PR 211)
34+
* Refactor code calls not available in Android API 24 (PR 216)
35+
* Fix to return end of stream in `InputStream.read()` on socket error (PR 217)
36+
* Fix to update the TLS protocol in SSLSession after handshake completes (PR 219)
37+
* Fix potential deadlock on close() between SSLSocket and Input/OutputStream (PR 220)
38+
* Fixes for issues found with SpotBugs (PR 221)
39+
* Clean up ant build warnings on Corretto 20.0.1 (PR 223)
40+
* Error out on invalid port during creation of SSLEngine (PR 224)
41+
* Correct SSLSocket exception types and fix setting of native file descriptor (PR 228)
42+
* Fix deadlock issues between `SSLSocket close()` and `OutputStream.write()` (PR 230)
43+
44+
**New JNI Wrapped APIs and Functionality:**
45+
* `wolfSSL_SessionIsSetup()` (PR 191)
46+
* `wolfSSL_SESSION_dup()` (PR 206)
47+
48+
**JNI Changes:**
49+
* Fix for JNI example use of TLS 1.3 secret callback strings (PR 192)
50+
51+
**Example Changes:**
52+
* Add Host into HTTP GET in example ClientJSSE when used with `-g` (PR 213)
53+
* Add example JNI-only threaded client/server applications (PR 212)
54+
* Add basic RMI example client and server (PR 226)
55+
56+
**Debugging Changes:**
57+
* Fix typo in SSLEngine debug logs (PR 203)
58+
59+
**Testing Changes:**
60+
* Run Facebook Infer on all PRs with GitHub Actions (PR 190)
61+
* Run TLS 1.0 and 1.1 tests if enabled in native wolfSSL even if disabled in `java.security` (PR 198)
62+
* Add GitHub Actions PRB test for Android gradle build (PR 222)
63+
64+
The wolfSSL JNI Manual is available at:
65+
https://www.wolfssl.com/documentation/manuals/wolfssljni. For build
66+
instructions and more detailed comments, please check the manual.
67+
168
### wolfSSL JNI Release 1.13.0 (4/9/2024)
269

370
Release 1.13.0 has bug fixes and new features including:

IDE/WIN/README.md

Lines changed: 41 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ section titled `/* Configuration */`:
137137
```
138138
#define WOLFSSL_JNI
139139
#define HAVE_EX_DATA
140+
#define OPENSSL_EXTRA
140141
#define OPENSSL_ALL
141142
#define HAVE_CRL
142143
#define HAVE_OCSP
@@ -146,9 +147,16 @@ section titled `/* Configuration */`:
146147
#define HAVE_DH
147148
#define WOLFSSL_CERT_EXT
148149
#define WOLFSSL_CERT_GEN
150+
#define WOLFSSL_KEY_GEN
151+
#define WOLFSSL_CERT_REQ
152+
#define WOLFSSL_ALT_NAMES
149153
#define HAVE_TLS_EXTENSIONS
150154
#define HAVE_SNI
151155
#define HAVE_ALPN
156+
#define KEEP_PEER_CERT
157+
#define SESSION_CERTS
158+
#define WOLFSSL_ALT_CERT_CHAINS
159+
#define WOLFSSL_ALWAYS_VERIFY_CB
152160
```
153161

154162
After editing and saving the `user_settings.h` file, select one of the following
@@ -171,10 +179,13 @@ When bulding wolfSSL JNI/JSSE, the Visual Studio project file for that library
171179
will look in the above locations to link against the wolfSSL DLL matching
172180
the same build configuration.
173181

174-
## wolfSSL FIPS 140-2 (Certificate #3389)
182+
## wolfSSL FIPS 140-2 (Certificate #3389, Now Historical)
183+
184+
Please consider looking at and migrating to wolfSSL's new FIPS 140-3
185+
validated version of wolfCrypt. Email fips@wolfssl.com for more information.
175186

176187
To build a wolfSSL FIPS 140-2 variant of wolfSSL for use with FIPS 140-2
177-
certificate #3389 or later, use the Visual Studio solution file located under
188+
certificate #3389, use the Visual Studio solution file located under
178189
the `IDE\WIN10` directory inside the wolfSSL FIPS release package:
179190

180191
```
@@ -216,6 +227,7 @@ and set the values for `HAVE_FIPS`, `HAVE_FIPS_VERSION`, and
216227
```
217228
#define WOLFSSL_JNI
218229
#define HAVE_EX_DATA
230+
#define OPENSSL_EXTRA
219231
#define OPENSSL_ALL
220232
#define HAVE_CRL
221233
#define HAVE_OCSP
@@ -225,9 +237,16 @@ and set the values for `HAVE_FIPS`, `HAVE_FIPS_VERSION`, and
225237
#define HAVE_DH
226238
#define WOLFSSL_CERT_EXT
227239
#define WOLFSSL_CERT_GEN
240+
#define WOLFSSL_KEY_GEN
241+
#define WOLFSSL_CERT_REQ
242+
#define WOLFSSL_ALT_NAMES
228243
#define HAVE_TLS_EXTENSIONS
229244
#define HAVE_SNI
230245
#define HAVE_ALPN
246+
#define KEEP_PEER_CERT
247+
#define SESSION_CERTS
248+
#define WOLFSSL_ALT_CERT_CHAINS
249+
#define WOLFSSL_ALWAYS_VERIFY_CB
231250
```
232251

233252
6. Build the `wolfssl-fips` project, which will create a DLL in one of the
@@ -254,28 +273,33 @@ in the wolfCrypt tests successfully running.
254273
See the FIPS User Guide for more details on the FIPS verifyCore hash, or
255274
email support@wolfssl.com.
256275

257-
## wolfSSL FIPS 140-3 (Upcoming)
276+
## wolfSSL FIPS 140-3 (Certificate #4718)
258277

259-
To build a version of wolfSSL that has been submitted for FIPS 140-3, use
260-
the Visual Studio solution file under the `IDE\WIN10` directory inside the
261-
wolfSSL package:
278+
To build a wolfSSL FIPS 140-3 variant for use with FIPS 140-3 certificate
279+
#4718, use the Visual Studio solution file located in the `IDE/WIN10`
280+
directory inside the wolfSSL package:
262281

263282
```
264283
<wolfssl>\IDE\WIN10\wolfssl-fips.sln
265284
```
266285

267286
Follow instructions in the above section for 140-2 / 3389, except use the
268-
following values for `HAVE_FIPS`, `HAVE_FIPS_VERSION`, and
269-
`HAVE_FIPS_VERSION_MINOR` in `user_settings.h`:
287+
following values for `HAVE_FIPS`, `HAVE_FIPS_VERSION`,
288+
`HAVE_FIPS_VERSION_MAJOR`, `HAVE_FIPS_VERSION_MINOR`, and
289+
`HAVE_FIPS_VERSION_PATCH` in `user_settings.h`:
270290

271291
```
272292
#if 1
273293
#undef HAVE_FIPS
274294
#define HAVE_FIPS
275295
#undef HAVE_FIPS_VERSION
276296
#define HAVE_FIPS_VERSION 5
297+
#undef HAVE_FIPS_VERSION_MAJOR
298+
#define HAVE_FIPS_VERSION_MAJOR 5
277299
#undef HAVE_FIPS_VERSION_MINOR
278-
#define HAVE_FIPS_VERSION_MINOR 1
300+
#define HAVE_FIPS_VERSION_MINOR 2
301+
#undef HAVE_FIPS_VERSION_PATCH
302+
#define HAVE_FIPS_VERSION_PATCH 0
279303
#endif
280304
```
281305

@@ -285,6 +309,7 @@ The following additional defines will also need to be added to
285309
```
286310
#define WOLFSSL_JNI
287311
#define HAVE_EX_DATA
312+
#define OPENSSL_EXTRA
288313
#define OPENSSL_ALL
289314
#define HAVE_CRL
290315
#define HAVE_OCSP
@@ -294,9 +319,16 @@ The following additional defines will also need to be added to
294319
#define HAVE_DH
295320
#define WOLFSSL_CERT_EXT
296321
#define WOLFSSL_CERT_GEN
322+
#define WOLFSSL_KEY_GEN
323+
#define WOLFSSL_CERT_REQ
324+
#define WOLFSSL_ALT_NAMES
297325
#define HAVE_TLS_EXTENSIONS
298326
#define HAVE_SNI
299327
#define HAVE_ALPN
328+
#define KEEP_PEER_CERT
329+
#define SESSION_CERTS
330+
#define WOLFSSL_ALT_CERT_CHAINS
331+
#define WOLFSSL_ALWAYS_VERIFY_CB
300332
```
301333

302334
For additional help, contact support@wolfssl.com.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ an application can include this as a dependency in the application's
186186
<dependency>
187187
<groupId>com.wolfssl</groupId>
188188
<artifactId>wolfssl-jsse</artifactId>
189-
<version>1.13.0-SNAPSHOT</version>
189+
<version>1.14.0-SNAPSHOT</version>
190190
</dependency>
191191
</dependencies>
192192
...

build.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<!-- versioning/manifest properties -->
1515
<property name="implementation.vendor" value="wolfSSL Inc." />
1616
<property name="implementation.title" value="wolfSSL JNI/JSSE" />
17-
<property name="implementation.version" value="1.13" />
17+
<property name="implementation.version" value="1.14" />
1818

1919
<!-- set properties for this build -->
2020
<property name="src.dir" value="src/java/"/>

native/com_wolfssl_WolfSSLSession.c

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@
3232
#include <sys/time.h>
3333
#include <arpa/inet.h>
3434
#include <sys/errno.h>
35-
#endif
36-
#ifdef WOLFJNI_USE_IO_SELECT
37-
#include <sys/select.h>
38-
#else
39-
#include <poll.h>
35+
#if defined(WOLFJNI_USE_IO_SELECT)
36+
#include <sys/select.h>
37+
#else
38+
#include <poll.h>
39+
#endif
4040
#endif
4141

4242
#ifndef WOLFSSL_JNI_DEFAULT_PEEK_TIMEOUT
@@ -615,7 +615,8 @@ enum {
615615
WOLFJNI_IO_EVENT_INVALID_TIMEOUT = -17
616616
};
617617

618-
#ifdef WOLFJNI_USE_IO_SELECT
618+
/* Windows doesn't have poll(), use select() */
619+
#if defined(WOLFJNI_USE_IO_SELECT) || defined(USE_WINDOWS_API)
619620

620621
/* Perform a select() call on the underlying socket to wait for socket to be
621622
* ready for read/write, or timeout. Note that we explicitly set the underlying
@@ -787,7 +788,7 @@ static int socketPoll(int sockfd, int timeout_ms, int rx, int tx)
787788
return WOLFJNI_IO_EVENT_FAIL;
788789
}
789790

790-
#endif /* WOLFJNI_USE_IO_SELECT */
791+
#endif /* WOLFJNI_USE_IO_SELECT | USE_WINDOWS_API */
791792

792793
JNIEXPORT jint JNICALL Java_com_wolfssl_WolfSSLSession_connect
793794
(JNIEnv* jenv, jobject jcl, jlong sslPtr, jint timeout)

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<modelVersion>4.0.0</modelVersion>
55
<groupId>com.wolfssl</groupId>
66
<artifactId>wolfssl-jsse</artifactId>
7-
<version>1.13.0-SNAPSHOT</version>
7+
<version>1.14.0-SNAPSHOT</version>
88
<packaging>jar</packaging>
99
<name>wolfssl-jsse</name>
1010
<url>https://www.wolfssl.com</url>

src/java/com/wolfssl/provider/jsse/WolfSSLProvider.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ public void errorCallback(int ok, int err, String hash) {
7373
* wolfSSL JSSE Provider class
7474
*/
7575
public WolfSSLProvider() {
76-
super("wolfJSSE", 1.13, "wolfSSL JSSE Provider");
77-
//super("wolfJSSE", "1.13", "wolfSSL JSSE Provider");
76+
super("wolfJSSE", 1.14, "wolfSSL JSSE Provider");
77+
//super("wolfJSSE", "1.14", "wolfSSL JSSE Provider");
7878

7979
/* load native wolfSSLJNI library */
8080
WolfSSL.loadLibrary();

src/test/com/wolfssl/provider/jsse/test/WolfSSLTrustX509Test.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1514,8 +1514,9 @@ public void testCheckServerTrustedWithDuplicatedRootInChain()
15141514
@Test
15151515
public void testUsingRsaPssCert()
15161516
throws Exception {
1517-
/* skip if RSA_PSS is not compiled in at native level */
1518-
if (WolfSSL.RsaPssEnabled() == false) {
1517+
/* skip if RSA_PSS or TLS 1.3 are not compiled in at native level */
1518+
if ((WolfSSL.RsaPssEnabled() == false) ||
1519+
(WolfSSL.TLSv13Enabled() == false)) {
15191520
return;
15201521
}
15211522

0 commit comments

Comments
 (0)