Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package netty-tcnative for openSUSE:Factory checked in at 2026-11-20 14:47:51 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/netty-tcnative (Old) and /work/SRC/openSUSE:Factory/.netty-tcnative.new.1251 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "netty-tcnative" Fri Nov 20 14:47:51 2026 rev:15 rq:1398902 version:2.0.86 Changes: -------- --- /work/SRC/openSUSE:Factory/netty-tcnative/netty-tcnative.changes 2026-11-03 18:03:06.709352931 +0100 +++ /work/SRC/openSUSE:Factory/.netty-tcnative.new.1251/netty-tcnative.changes 2026-11-20 14:50:32.589072044 +0100 @@ -1,0 +2,20 @@ +Fri Nov 20 06:44:47 UTC 2026 - Fridrich Strba <[email protected]> + +- Upgrade to version 2.0.86 Final + * Wipe session ticket keys before freeing them (#1052) + * Make setNpnProtos0 and setAlpnProtos0 safe on failure and + validate the protocol list (#1029) + * Make the narrowing of the options in getOptions explicit + (#1048) + * Preserve the selected credential after handshake completion + (#1051) + * Fail the build when a downloaded archive does not match its + SHA-256 (#1049) + * Use const STACK_OF(SSL_CIPHER)* for SSL_get_ciphers (#1050) + * Reject negative sizes in SSLContext.setMaxCertList (#1047) + * Pass the uncompressed length as jint when calling the Java + decompress method (#1046) + * Reject session timeouts that do not fit into 32 bits on + BoringSSL / AWS-LC (#1045) + +------------------------------------------------------------------- Old: ---- netty-tcnative-parent-2.0.85.Final.tar.gz New: ---- netty-tcnative-parent-2.0.86.Final.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ netty-tcnative.spec ++++++ --- /var/tmp/diff_new_pack.B7CIBq/_old 2026-11-20 14:50:33.611115308 +0100 +++ /var/tmp/diff_new_pack.B7CIBq/_new 2026-11-20 14:50:33.613115393 +0100 @@ -21,7 +21,7 @@ %define with_gcc 11 %endif Name: netty-tcnative -Version: 2.0.85 +Version: 2.0.86 Release: 0 %global namedversion %{version}%{?namedreltag} Summary: Fork of Tomcat Native with improved OpenSSL and mavenized build ++++++ _scmsync.obsinfo ++++++ --- /var/tmp/diff_new_pack.B7CIBq/_old 2026-11-20 14:50:33.643116663 +0100 +++ /var/tmp/diff_new_pack.B7CIBq/_new 2026-11-20 14:50:33.647116832 +0100 @@ -1,6 +1,6 @@ -mtime: 1793697748 -commit: 1ec9b23b108240afc9baddaa940e939cf269377ca3a46068ace08aaa3e313b68 +mtime: 1795157881 +commit: c04f28056b32ad4faeab47cf775b4f6b2eafe8c51581d83161a6d7d0cb947bde url: https://src.opensuse.org/java-packages/netty-tcnative -revision: 1ec9b23b108240afc9baddaa940e939cf269377ca3a46068ace08aaa3e313b68 +revision: c04f28056b32ad4faeab47cf775b4f6b2eafe8c51581d83161a6d7d0cb947bde projectscmsync: https://src.opensuse.org/java-packages/_ObsPrj ++++++ build.specials.obscpio ++++++ ++++++ build.specials.obscpio ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/.gitignore new/.gitignore --- old/.gitignore 1970-01-01 01:00:00.000000000 +0100 +++ new/.gitignore 2026-11-20 07:58:01.000000000 +0100 @@ -0,0 +1 @@ +.osc ++++++ netty-tcnative-parent-2.0.85.Final.tar.gz -> netty-tcnative-parent-2.0.86.Final.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/netty-tcnative-netty-tcnative-parent-2.0.85.Final/boringssl-static/pom.xml new/netty-tcnative-netty-tcnative-parent-2.0.86.Final/boringssl-static/pom.xml --- old/netty-tcnative-netty-tcnative-parent-2.0.85.Final/boringssl-static/pom.xml 2026-11-02 09:56:57.000000000 +0100 +++ new/netty-tcnative-netty-tcnative-parent-2.0.86.Final/boringssl-static/pom.xml 2026-11-16 14:06:58.000000000 +0100 @@ -19,7 +19,7 @@ <parent> <groupId>io.netty</groupId> <artifactId>netty-tcnative-parent</artifactId> - <version>2.0.85.Final</version> + <version>2.0.86.Final</version> </parent> <artifactId>${project.artifactId}</artifactId> <packaging>jar</packaging> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/netty-tcnative-netty-tcnative-parent-2.0.85.Final/libressl-static/pom.xml new/netty-tcnative-netty-tcnative-parent-2.0.86.Final/libressl-static/pom.xml --- old/netty-tcnative-netty-tcnative-parent-2.0.85.Final/libressl-static/pom.xml 2026-11-02 09:56:57.000000000 +0100 +++ new/netty-tcnative-netty-tcnative-parent-2.0.86.Final/libressl-static/pom.xml 2026-11-16 14:06:58.000000000 +0100 @@ -19,7 +19,7 @@ <parent> <groupId>io.netty</groupId> <artifactId>netty-tcnative-parent</artifactId> - <version>2.0.85.Final</version> + <version>2.0.86.Final</version> </parent> <artifactId>netty-tcnative-libressl-static</artifactId> <packaging>jar</packaging> @@ -310,7 +310,13 @@ <echo message="Downloading LibreSSL" /> <get src="https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/${libresslArchive}" dest="${project.build.directory}/${libresslArchive}" verbose="on" /> - <checksum file="${project.build.directory}/${libresslArchive}" algorithm="SHA-256" property="${libresslSha256}" verifyProperty="isEqual" /> + <fail message="SHA-256 of ${libresslArchive} does not match ${libresslSha256}"> + <condition> + <not> + <checksum file="${project.build.directory}/${libresslArchive}" algorithm="SHA-256" property="${libresslSha256}" /> + </not> + </condition> + </fail> <exec executable="tar" failonerror="true" dir="${project.build.directory}/" resolveexecutable="true"> <arg value="xfv" /> <arg value="${libresslArchive}" /> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/netty-tcnative-netty-tcnative-parent-2.0.85.Final/openssl-classes/pom.xml new/netty-tcnative-netty-tcnative-parent-2.0.86.Final/openssl-classes/pom.xml --- old/netty-tcnative-netty-tcnative-parent-2.0.85.Final/openssl-classes/pom.xml 2026-11-02 09:56:57.000000000 +0100 +++ new/netty-tcnative-netty-tcnative-parent-2.0.86.Final/openssl-classes/pom.xml 2026-11-16 14:06:58.000000000 +0100 @@ -19,7 +19,7 @@ <parent> <groupId>io.netty</groupId> <artifactId>netty-tcnative-parent</artifactId> - <version>2.0.85.Final</version> + <version>2.0.86.Final</version> </parent> <artifactId>netty-tcnative-classes</artifactId> <packaging>jar</packaging> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/netty-tcnative-netty-tcnative-parent-2.0.85.Final/openssl-classes/src/main/java/io/netty/internal/tcnative/SSL.java new/netty-tcnative-netty-tcnative-parent-2.0.86.Final/openssl-classes/src/main/java/io/netty/internal/tcnative/SSL.java --- old/netty-tcnative-netty-tcnative-parent-2.0.85.Final/openssl-classes/src/main/java/io/netty/internal/tcnative/SSL.java 2026-11-02 09:56:57.000000000 +0100 +++ new/netty-tcnative-netty-tcnative-parent-2.0.86.Final/openssl-classes/src/main/java/io/netty/internal/tcnative/SSL.java 2026-11-16 14:06:58.000000000 +0100 @@ -994,6 +994,8 @@ /** * Get the selected credential from an SSL instance. + * After a successful handshake, the selected credential remains available until + * another handshake completes or the SSL instance is freed. * * <p>This is a BoringSSL-specific feature. See * <a href="https://commondatastorage.googleapis.com/chromium-boringssl-docs/ssl.h.html#SSL_get0_selected_credential">SSL_get0_selected_credential</a> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/netty-tcnative-netty-tcnative-parent-2.0.85.Final/openssl-dynamic/pom.xml new/netty-tcnative-netty-tcnative-parent-2.0.86.Final/openssl-dynamic/pom.xml --- old/netty-tcnative-netty-tcnative-parent-2.0.85.Final/openssl-dynamic/pom.xml 2026-11-02 09:56:57.000000000 +0100 +++ new/netty-tcnative-netty-tcnative-parent-2.0.86.Final/openssl-dynamic/pom.xml 2026-11-16 14:06:58.000000000 +0100 @@ -19,7 +19,7 @@ <parent> <groupId>io.netty</groupId> <artifactId>netty-tcnative-parent</artifactId> - <version>2.0.85.Final</version> + <version>2.0.86.Final</version> </parent> <artifactId>netty-tcnative</artifactId> <packaging>jar</packaging> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/netty-tcnative-netty-tcnative-parent-2.0.85.Final/openssl-dynamic/src/main/c/cert_compress.c new/netty-tcnative-netty-tcnative-parent-2.0.86.Final/openssl-dynamic/src/main/c/cert_compress.c --- old/netty-tcnative-netty-tcnative-parent-2.0.85.Final/openssl-dynamic/src/main/c/cert_compress.c 2026-11-02 09:56:57.000000000 +0100 +++ new/netty-tcnative-netty-tcnative-parent-2.0.86.Final/openssl-dynamic/src/main/c/cert_compress.c 2026-11-16 14:06:58.000000000 +0100 @@ -79,6 +79,10 @@ if (compression_algorithm == NULL || decompress_method == NULL) { return 0; } + // The Java side takes the uncompressed length as int. + if (uncompressed_len > INT32_MAX) { + return 0; + } if (tcn_get_java_env(&e) != JNI_OK) { return 0; } @@ -91,7 +95,7 @@ // BoringSSL checks that `uncompressed_len <= ssl->max_cert_list` before calling `ssl_cert_decompression_func_t` // `max_cert_list` contains the max cert size, avoiding excessive allocations. jbyteArray resultArray = (*e)->CallObjectMethod(e, compression_algorithm, decompress_method, - P2J(ssl), uncompressed_len, inputArray); + P2J(ssl), (jint) uncompressed_len, inputArray); NETTY_JNI_UTIL_DELETE_LOCAL(e, inputArray); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/netty-tcnative-netty-tcnative-parent-2.0.85.Final/openssl-dynamic/src/main/c/ssl.c new/netty-tcnative-netty-tcnative-parent-2.0.86.Final/openssl-dynamic/src/main/c/ssl.c --- old/netty-tcnative-netty-tcnative-parent-2.0.85.Final/openssl-dynamic/src/main/c/ssl.c 2026-11-02 09:56:57.000000000 +0100 +++ new/netty-tcnative-netty-tcnative-parent-2.0.86.Final/openssl-dynamic/src/main/c/ssl.c 2026-11-16 14:06:58.000000000 +0100 @@ -940,6 +940,10 @@ tcn_ssl_task_free(e, state->ssl_task); state->ssl_task = NULL; +#ifdef OPENSSL_IS_BORINGSSL + SSL_CREDENTIAL_free(state->selected_credential); +#endif + // Free the tcn_ssl_state_t itself as it was allocated via OPENSSL_malloc(...) before // // https://github.com/netty/netty-tcnative/issues/532 @@ -1505,7 +1509,12 @@ TCN_CHECK_NULL(ssl_, ssl, 0); +#if defined(OPENSSL_IS_BORINGSSL) || defined(OPENSSL_IS_AWSLC) + // The timeout is an uint32_t here + if (seconds < 0 || seconds > (jlong) UINT32_MAX) { +#else if (seconds < 0 || !TCN_FITS_LONG(seconds)) { +#endif tcn_ThrowIllegalArgumentException(e, "seconds out of range"); return 0; } @@ -1581,7 +1590,9 @@ TCN_CHECK_NULL(ssl_, ssl, 0); - return SSL_get_options(ssl_); + // The Java API uses an int, but the options are a 64 bit value in OpenSSL 3.x. Only the lower 32 bits can be + // reported, which matches what setOptions(...) and clearOptions(...) are able to modify. + return (jint) (uint32_t) SSL_get_options(ssl_); } TCN_IMPLEMENT_CALL(jint, SSL, setMode)(TCN_STDARGS, jlong ssl, jint mode) @@ -1649,7 +1660,7 @@ TCN_IMPLEMENT_CALL(jobjectArray, SSL, getCiphers)(TCN_STDARGS, jlong ssl) { - STACK_OF(SSL_CIPHER) *sk = NULL; + const STACK_OF(SSL_CIPHER) *sk = NULL; int len; jobjectArray array = NULL; const SSL_CIPHER *cipher = NULL; @@ -2796,7 +2807,8 @@ TCN_CHECK_NULL(ssl_, ssl, 0); const SSL_CREDENTIAL* credential = SSL_get0_selected_credential(ssl_); if (credential == NULL) { - return 0; + tcn_ssl_state_t* state = tcn_SSL_get_app_state(ssl_); + credential = state->selected_credential; } return (jlong)(intptr_t)credential; #else diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/netty-tcnative-netty-tcnative-parent-2.0.85.Final/openssl-dynamic/src/main/c/ssl_private.h new/netty-tcnative-netty-tcnative-parent-2.0.86.Final/openssl-dynamic/src/main/c/ssl_private.h --- old/netty-tcnative-netty-tcnative-parent-2.0.85.Final/openssl-dynamic/src/main/c/ssl_private.h 2026-11-02 09:56:57.000000000 +0100 +++ new/netty-tcnative-netty-tcnative-parent-2.0.86.Final/openssl-dynamic/src/main/c/ssl_private.h 2026-11-16 14:06:58.000000000 +0100 @@ -416,6 +416,9 @@ tcn_ssl_ctxt_t *ctx; tcn_ssl_task_t* ssl_task; tcn_ssl_verify_config_t verify_config; +#ifdef OPENSSL_IS_BORINGSSL + SSL_CREDENTIAL* selected_credential; +#endif // Saved at async task creation time so the retry path can reproduce the // len < sk_CRYPTO_BUFFER_num(chain) check (both locals are 0/NULL there). int task_array_len; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/netty-tcnative-netty-tcnative-parent-2.0.85.Final/openssl-dynamic/src/main/c/sslcontext.c new/netty-tcnative-netty-tcnative-parent-2.0.86.Final/openssl-dynamic/src/main/c/sslcontext.c --- old/netty-tcnative-netty-tcnative-parent-2.0.85.Final/openssl-dynamic/src/main/c/sslcontext.c 2026-11-02 09:56:57.000000000 +0100 +++ new/netty-tcnative-netty-tcnative-parent-2.0.86.Final/openssl-dynamic/src/main/c/sslcontext.c 2026-11-16 14:06:58.000000000 +0100 @@ -171,6 +171,8 @@ } if (c->ticket_keys != NULL) { + // Wipe the keys before freeing them, OPENSSL_free(...) does not do this for us. + OPENSSL_cleanse(c->ticket_keys, sizeof(tcn_ssl_ticket_key_t) * c->ticket_keys_len); OPENSSL_free(c->ticket_keys); c->ticket_keys = NULL; } @@ -186,12 +188,24 @@ } static void ssl_info_callback(const SSL *ssl, int where, int ret) { - tcn_ssl_state_t* state = NULL; + tcn_ssl_state_t* state = tcn_SSL_get_app_state(ssl); + if (state == NULL) { + return; + } if (0 != (where & SSL_CB_HANDSHAKE_START)) { - if ((state = tcn_SSL_get_app_state(ssl)) != NULL) { - state->handshakeCount++; + state->handshakeCount++; + } +#ifdef OPENSSL_IS_BORINGSSL + if (0 != (where & SSL_CB_HANDSHAKE_DONE)) { + // retain the credential before BoringSSL discards its handshake state + SSL_CREDENTIAL* credential = (SSL_CREDENTIAL*) SSL_get0_selected_credential(ssl); + if (credential != NULL) { + SSL_CREDENTIAL_up_ref(credential); } + SSL_CREDENTIAL_free(state->selected_credential); + state->selected_credential = credential; } +#endif } /* Initialize server context */ @@ -542,7 +556,9 @@ TCN_CHECK_NULL(c, ctx, 0); - return SSL_CTX_get_options(c->ctx); + // The Java API uses an int, but the options are a 64 bit value in OpenSSL 3.x. Only the lower 32 bits can be + // reported, which matches what setOptions(...) and clearOptions(...) are able to modify. + return (jint) (uint32_t) SSL_CTX_get_options(c->ctx); } TCN_IMPLEMENT_CALL(void, SSLContext, clearOptions)(TCN_STDARGS, jlong ctx, @@ -1029,6 +1045,43 @@ #endif // defined(OPENSSL_IS_BORINGSSL) || defined(OPENSSL_IS_AWSLC) } +// Returns JNI_TRUE if the given buffer is a well-formed list of length-prefixed protocol names as used by ALPN / NPN. +// select_next_proto(...) relies on this to not read out of bounds. +static jboolean is_valid_proto_list(const unsigned char* data, unsigned int len) { + unsigned int i = 0; + while (i < len) { + i += 1 + data[i]; + } + return i == len ? JNI_TRUE : JNI_FALSE; +} + +// Copies the given byte[] into a newly allocated native buffer after validating it. +// Returns 0 on success and -1 on failure, in which case an exception is pending and nothing was allocated. +static int copy_proto_list(JNIEnv* e, jbyteArray array, unsigned char** out, unsigned int* out_len) { + int len = (*e)->GetArrayLength(e, array); + unsigned char* data = NULL; + + if (len > 0) { + if ((data = OPENSSL_malloc(len)) == NULL) { + tcn_throwOutOfMemoryError(e, "OPENSSL_malloc failed"); + return -1; + } + (*e)->GetByteArrayRegion(e, array, 0, len, (jbyte*) data); + if ((*e)->ExceptionCheck(e) == JNI_TRUE) { + OPENSSL_free(data); + return -1; + } + if (!is_valid_proto_list(data, len)) { + OPENSSL_free(data); + tcn_ThrowIllegalArgumentException(e, "Invalid protocol list"); + return -1; + } + } + *out = data; + *out_len = len; + return 0; +} + TCN_IMPLEMENT_CALL(void, SSLContext, setNpnProtos0)(TCN_STDARGS, jlong ctx, jbyteArray next_protos, jint selectorFailureBehavior) { @@ -1037,16 +1090,18 @@ TCN_CHECK_NULL(c, ctx, /* void */); if (next_protos != NULL) { - OPENSSL_free(c->next_proto_data); - - int next_protos_len = (*e)->GetArrayLength(e, next_protos); - c->next_proto_data = OPENSSL_malloc(next_protos_len); - if (c->next_proto_data == NULL) { - tcn_throwOutOfMemoryError(e, "OPENSSL_malloc failed"); + unsigned char* next_proto_data = NULL; + unsigned char* old_next_proto_data = NULL; + unsigned int next_proto_len = 0; + + // Allocate and validate the new data first so we never leave the context with a freed buffer if this fails. + if (copy_proto_list(e, next_protos, &next_proto_data, &next_proto_len) != 0) { return; } - c->next_proto_len = next_protos_len; - (*e)->GetByteArrayRegion(e, next_protos, 0, next_protos_len, (jbyte*) c->next_proto_data); + old_next_proto_data = c->next_proto_data; + c->next_proto_data = next_proto_data; + c->next_proto_len = next_proto_len; + OPENSSL_free(old_next_proto_data); // depending on if it's client mode or not we need to call different functions. if (c->mode == SSL_MODE_CLIENT) { @@ -1074,16 +1129,18 @@ TCN_CHECK_NULL(c, ctx, /* void */); if (alpn_protos != NULL) { - OPENSSL_free(c->alpn_proto_data); + unsigned char* alpn_proto_data = NULL; + unsigned char* old_alpn_proto_data = NULL; + unsigned int alpn_proto_len = 0; - int alpn_protos_len = (*e)->GetArrayLength(e, alpn_protos); - c->alpn_proto_data = OPENSSL_malloc(alpn_protos_len); - if (c->alpn_proto_data == NULL) { - tcn_throwOutOfMemoryError(e, "OPENSSL_malloc failed"); + // Allocate and validate the new data first so we never leave the context with a freed buffer if this fails. + if (copy_proto_list(e, alpn_protos, &alpn_proto_data, &alpn_proto_len) != 0) { return; } - c->alpn_proto_len = alpn_protos_len; - (*e)->GetByteArrayRegion(e, alpn_protos, 0, alpn_protos_len, (jbyte*) c->alpn_proto_data); + old_alpn_proto_data = c->alpn_proto_data; + c->alpn_proto_data = alpn_proto_data; + c->alpn_proto_len = alpn_proto_len; + OPENSSL_free(old_alpn_proto_data); // depending on if it's client mode or not we need to call different functions. @@ -1453,9 +1510,10 @@ TCN_CHECK_NULL(c, ctx, /* void */); TCN_CHECK_NULL(keys, keys, /* void */); - jbyte* b = NULL; - jbyte* key = NULL; tcn_ssl_ticket_key_t* ticket_keys = NULL; + tcn_ssl_ticket_key_t* old_ticket_keys = NULL; + unsigned int old_ticket_keys_len; + jsize offset; int i; int cnt; @@ -1465,28 +1523,33 @@ return; } - if ((b = (*e)->GetByteArrayElements(e, keys, NULL)) == NULL) { - OPENSSL_free(ticket_keys); - tcn_ThrowException(e, "GetByteArrayElements() returned null"); - return; - } - + // Copy the keys directly into our own memory. GetByteArrayElements(...) may hand out a temporary copy of the + // array that the JVM frees again without wiping it. for (i = 0; i < cnt; ++i) { - key = b + (SSL_SESSION_TICKET_KEY_SIZE * i); - memcpy(ticket_keys[i].key_name, key, 16); - memcpy(ticket_keys[i].hmac_key, key + 16, 16); - memcpy(ticket_keys[i].aes_key, key + 32, 16); + offset = SSL_SESSION_TICKET_KEY_SIZE * i; + (*e)->GetByteArrayRegion(e, keys, offset, 16, (jbyte*) ticket_keys[i].key_name); + (*e)->GetByteArrayRegion(e, keys, offset + 16, 16, (jbyte*) ticket_keys[i].hmac_key); + (*e)->GetByteArrayRegion(e, keys, offset + 32, 16, (jbyte*) ticket_keys[i].aes_key); + } + if ((*e)->ExceptionCheck(e) == JNI_TRUE) { + OPENSSL_cleanse(ticket_keys, sizeof(tcn_ssl_ticket_key_t) * cnt); + OPENSSL_free(ticket_keys); + return; } - (*e)->ReleaseByteArrayElements(e, keys, b, 0); apr_thread_rwlock_wrlock(c->mutex); - if (c->ticket_keys) { - OPENSSL_free(c->ticket_keys); - } + old_ticket_keys = c->ticket_keys; + old_ticket_keys_len = c->ticket_keys_len; c->ticket_keys_len = cnt; c->ticket_keys = ticket_keys; apr_thread_rwlock_unlock(c->mutex); + if (old_ticket_keys != NULL) { + // Wipe the replaced keys before freeing them, OPENSSL_free(...) does not do this for us. + OPENSSL_cleanse(old_ticket_keys, sizeof(tcn_ssl_ticket_key_t) * old_ticket_keys_len); + OPENSSL_free(old_ticket_keys); + } + #if OPENSSL_VERSION_NUMBER < 0x30000000L SSL_CTX_set_tlsext_ticket_key_cb(c->ctx, ssl_tlsext_ticket_key_cb); #else @@ -3007,6 +3070,12 @@ TCN_CHECK_NULL(c, ctx, /* void */); + // The size is converted to an unsigned type, so a negative value would end up as a huge limit. + if (size < 0) { + tcn_ThrowIllegalArgumentException(e, "size out of range"); + return; + } + SSL_CTX_set_max_cert_list(c->ctx, size); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/netty-tcnative-netty-tcnative-parent-2.0.85.Final/openssl-dynamic/src/main/c/sslsession.c new/netty-tcnative-netty-tcnative-parent-2.0.86.Final/openssl-dynamic/src/main/c/sslsession.c --- old/netty-tcnative-netty-tcnative-parent-2.0.85.Final/openssl-dynamic/src/main/c/sslsession.c 2026-11-02 09:56:57.000000000 +0100 +++ new/netty-tcnative-netty-tcnative-parent-2.0.86.Final/openssl-dynamic/src/main/c/sslsession.c 2026-11-16 14:06:58.000000000 +0100 @@ -44,7 +44,12 @@ TCN_CHECK_NULL(session_, session, 0); +#if defined(OPENSSL_IS_BORINGSSL) || defined(OPENSSL_IS_AWSLC) + // The timeout is an uint32_t here + if (seconds < 0 || seconds > (jlong) UINT32_MAX) { +#else if (seconds < 0 || !TCN_FITS_LONG(seconds)) { +#endif tcn_ThrowIllegalArgumentException(e, "seconds out of range"); return 0; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/netty-tcnative-netty-tcnative-parent-2.0.85.Final/openssl-static/pom.xml new/netty-tcnative-netty-tcnative-parent-2.0.86.Final/openssl-static/pom.xml --- old/netty-tcnative-netty-tcnative-parent-2.0.85.Final/openssl-static/pom.xml 2026-11-02 09:56:57.000000000 +0100 +++ new/netty-tcnative-netty-tcnative-parent-2.0.86.Final/openssl-static/pom.xml 2026-11-16 14:06:58.000000000 +0100 @@ -19,7 +19,7 @@ <parent> <groupId>io.netty</groupId> <artifactId>netty-tcnative-parent</artifactId> - <version>2.0.85.Final</version> + <version>2.0.86.Final</version> </parent> <artifactId>netty-tcnative-openssl-static</artifactId> <packaging>jar</packaging> @@ -277,7 +277,13 @@ <get src="https://www.openssl.org/source/old/${opensslMinorVersion}/openssl-${opensslVersion}.tar.gz" dest="${project.build.directory}/openssl-${opensslVersion}.tar.gz" verbose="on" /> </else> </if> - <checksum file="${project.build.directory}/openssl-${opensslVersion}.tar.gz" algorithm="SHA-256" property="${opensslSha256}" verifyProperty="isEqual" /> + <fail message="SHA-256 of openssl-${opensslVersion}.tar.gz does not match ${opensslSha256}"> + <condition> + <not> + <checksum file="${project.build.directory}/openssl-${opensslVersion}.tar.gz" algorithm="SHA-256" property="${opensslSha256}" /> + </not> + </condition> + </fail> <gunzip src="${project.build.directory}/openssl-${opensslVersion}.tar.gz" dest="${project.build.directory}/" /> <untar src="${project.build.directory}/openssl-${opensslVersion}.tar" dest="${project.build.directory}/" /> @@ -387,7 +393,13 @@ <get src="https://www.openssl.org/source/old/${opensslMinorVersion}/openssl-${opensslVersion}.tar.gz" dest="${project.build.directory}/openssl-${opensslVersion}.tar.gz" verbose="on" /> </else> </if> - <checksum file="${project.build.directory}/openssl-${opensslVersion}.tar.gz" algorithm="SHA-256" property="${opensslSha256}" verifyProperty="isEqual" /> + <fail message="SHA-256 of openssl-${opensslVersion}.tar.gz does not match ${opensslSha256}"> + <condition> + <not> + <checksum file="${project.build.directory}/openssl-${opensslVersion}.tar.gz" algorithm="SHA-256" property="${opensslSha256}" /> + </not> + </condition> + </fail> <!-- Use the tar command (rather than the untar ant task) in order to preserve file permissions. --> <exec executable="tar" failonerror="true" dir="${project.build.directory}/" resolveexecutable="true"> @@ -485,7 +497,13 @@ <get src="https://www.openssl.org/source/old/${opensslMinorVersion}/openssl-${opensslVersion}.tar.gz" dest="${project.build.directory}/openssl-${opensslVersion}.tar.gz" verbose="on" /> </else> </if> - <checksum file="${project.build.directory}/openssl-${opensslVersion}.tar.gz" algorithm="SHA-256" property="${opensslSha256}" verifyProperty="isEqual" /> + <fail message="SHA-256 of openssl-${opensslVersion}.tar.gz does not match ${opensslSha256}"> + <condition> + <not> + <checksum file="${project.build.directory}/openssl-${opensslVersion}.tar.gz" algorithm="SHA-256" property="${opensslSha256}" /> + </not> + </condition> + </fail> <!-- Use the tar command (rather than the untar ant task) in order to preserve file permissions. --> <exec executable="tar" failonerror="true" dir="${project.build.directory}/" resolveexecutable="true"> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/netty-tcnative-netty-tcnative-parent-2.0.85.Final/pom.xml new/netty-tcnative-netty-tcnative-parent-2.0.86.Final/pom.xml --- old/netty-tcnative-netty-tcnative-parent-2.0.85.Final/pom.xml 2026-11-02 09:56:57.000000000 +0100 +++ new/netty-tcnative-netty-tcnative-parent-2.0.86.Final/pom.xml 2026-11-16 14:06:58.000000000 +0100 @@ -24,7 +24,7 @@ <groupId>io.netty</groupId> <artifactId>netty-tcnative-parent</artifactId> - <version>2.0.85.Final</version> + <version>2.0.86.Final</version> <packaging>pom</packaging> <name>Netty/TomcatNative [Parent]</name> @@ -589,7 +589,13 @@ <property name="aprArchiveFile" value="apr-${aprVersion}-win32-src.zip" /> <get src="https://archive.apache.org/dist/apr/${aprArchiveFile}" dest="${project.build.directory}/${aprArchiveFile}" verbose="on" /> - <checksum file="${project.build.directory}/${aprArchiveFile}" algorithm="SHA-256" property="${aprWinSha256}" verifyProperty="isEqual" /> + <fail message="SHA-256 of ${aprArchiveFile} does not match ${aprWinSha256}"> + <condition> + <not> + <checksum file="${project.build.directory}/${aprArchiveFile}" algorithm="SHA-256" property="${aprWinSha256}" /> + </not> + </condition> + </fail> <unzip src="${project.build.directory}/${aprArchiveFile}" dest="${project.build.directory}" /> <condition property="windowsRelease" value="Win32 Release" else="x64 Release"> <equals arg1="${archBits}" arg2="32" /> @@ -695,7 +701,13 @@ <property name="aprTarGzFile" value="apr-${aprVersion}.tar.gz" /> <property name="aprTarFile" value="apr-${aprVersion}.tar" /> <get src="https://archive.apache.org/dist/apr/${aprTarGzFile}" dest="${project.build.directory}/${aprTarGzFile}" verbose="on" /> - <checksum file="${project.build.directory}/${aprTarGzFile}" algorithm="SHA-256" property="${aprSha256}" verifyProperty="isEqual" /> + <fail message="SHA-256 of ${aprTarGzFile} does not match ${aprSha256}"> + <condition> + <not> + <checksum file="${project.build.directory}/${aprTarGzFile}" algorithm="SHA-256" property="${aprSha256}" /> + </not> + </condition> + </fail> <gunzip src="${project.build.directory}/${aprTarGzFile}" dest="${project.build.directory}" /> <!-- Use the tar command (rather than the untar ant task) in order to preserve file permissions. --> <exec executable="tar" failonerror="true" dir="${project.build.directory}/" resolveexecutable="true">
