forked from pool/netty
Compare commits
34 Commits
Author | SHA256 | Date | |
---|---|---|---|
4f7c8a054f | |||
9272b942cc | |||
77a56e6ac6 | |||
a346feeee4 | |||
5b27b01931 | |||
6cdd29a7f0 | |||
609ab09c04 | |||
f0b9d05854 | |||
25ecbc201f | |||
d1f938a48d | |||
35b7e182f1 | |||
6ca30ae4fe | |||
d58cd52ce9 | |||
0deabeaf17 | |||
5dbb81cf38 | |||
8a09310e15 | |||
21911a7780 | |||
db991669c7 | |||
232b552f66 | |||
0b6723814d | |||
af4cb47f4d | |||
ec5430b105 | |||
4659c18a19 | |||
96a6047fff | |||
1aa82d8fd1 | |||
15b547fef2 | |||
0ff97990aa | |||
6ce117b8e1 | |||
1f94ae87b5 | |||
80436d6205 | |||
e0fe930ae9 | |||
c27f37778d | |||
6f2467ee2a | |||
0eb78f730e |
@@ -1,25 +1,29 @@
|
||||
From e4d00571feb88e27151b3cc2d4d62cbf7cb57577 Mon Sep 17 00:00:00 2001
|
||||
From 2caba3146e0ff279db66cd8362c06efdeac0d48e Mon Sep 17 00:00:00 2001
|
||||
From: Mat Booth <mat.booth@redhat.com>
|
||||
Date: Mon, 7 Sep 2020 12:17:31 +0100
|
||||
Subject: [PATCH 1/7] Remove optional dep Blockhound
|
||||
Subject: [PATCH 1/4] Remove optional dep Blockhound
|
||||
|
||||
---
|
||||
common/pom.xml | 5 -
|
||||
.../java/io/netty/util/internal/Hidden.java | 200 ------
|
||||
...ockhound.integration.BlockHoundIntegration | 14 -
|
||||
pom.xml | 8 -
|
||||
transport-blockhound-tests/pom.xml | 219 -------
|
||||
.../NettyBlockHoundIntegrationTest.java | 568 ------------------
|
||||
.../netty/util/internal/localhost_server.key | 28 -
|
||||
.../netty/util/internal/localhost_server.pem | 17 -
|
||||
.../io/netty/util/internal/mutual_auth_ca.pem | 19 -
|
||||
9 files changed, 1032 deletions(-)
|
||||
9 files changed, 1078 deletions(-)
|
||||
delete mode 100644 common/src/main/java/io/netty/util/internal/Hidden.java
|
||||
delete mode 100644 common/src/main/resources/META-INF/services/reactor.blockhound.integration.BlockHoundIntegration
|
||||
delete mode 100644 transport-blockhound-tests/pom.xml
|
||||
delete mode 100644 transport-blockhound-tests/src/test/java/io/netty/util/internal/NettyBlockHoundIntegrationTest.java
|
||||
delete mode 100644 transport-blockhound-tests/src/test/resources/io/netty/util/internal/localhost_server.key
|
||||
delete mode 100644 transport-blockhound-tests/src/test/resources/io/netty/util/internal/localhost_server.pem
|
||||
delete mode 100644 transport-blockhound-tests/src/test/resources/io/netty/util/internal/mutual_auth_ca.pem
|
||||
|
||||
diff --git a/common/pom.xml b/common/pom.xml
|
||||
index d7a5e0cc5f..1ebc9edf35 100644
|
||||
index 66e719e183..77452afbac 100644
|
||||
--- a/common/pom.xml
|
||||
+++ b/common/pom.xml
|
||||
@@ -82,11 +82,6 @@
|
||||
@@ -262,10 +266,10 @@ index e33bea796c..0000000000
|
||||
-io.netty.util.internal.Hidden$NettyBlockHoundIntegration
|
||||
\ No newline at end of file
|
||||
diff --git a/pom.xml b/pom.xml
|
||||
index 855fedf5e2..76f3dc1728 100644
|
||||
index 4f572c5912..6b389326a4 100644
|
||||
--- a/pom.xml
|
||||
+++ b/pom.xml
|
||||
@@ -816,7 +816,6 @@
|
||||
@@ -839,7 +839,6 @@
|
||||
<module>testsuite-native-image</module>
|
||||
<module>testsuite-native-image-client</module>
|
||||
<module>testsuite-native-image-client-runtime-init</module>
|
||||
@@ -273,7 +277,7 @@ index 855fedf5e2..76f3dc1728 100644
|
||||
<module>microbench</module>
|
||||
<module>bom</module>
|
||||
</modules>
|
||||
@@ -1244,13 +1243,6 @@
|
||||
@@ -1254,13 +1253,6 @@
|
||||
<version>${log4j2.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
@@ -287,6 +291,805 @@ index 855fedf5e2..76f3dc1728 100644
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
||||
diff --git a/transport-blockhound-tests/pom.xml b/transport-blockhound-tests/pom.xml
|
||||
deleted file mode 100644
|
||||
index a48ee58b90..0000000000
|
||||
--- a/transport-blockhound-tests/pom.xml
|
||||
+++ /dev/null
|
||||
@@ -1,219 +0,0 @@
|
||||
-<?xml version="1.0" encoding="UTF-8"?>
|
||||
-<!--
|
||||
- ~ Copyright 2019 The Netty Project
|
||||
- ~
|
||||
- ~ The Netty Project licenses this file to you under the Apache License,
|
||||
- ~ version 2.0 (the "License"); you may not use this file except in compliance
|
||||
- ~ with the License. You may obtain a copy of the License at:
|
||||
- ~
|
||||
- ~ https://www.apache.org/licenses/LICENSE-2.0
|
||||
- ~
|
||||
- ~ Unless required by applicable law or agreed to in writing, software
|
||||
- ~ distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
- ~ WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
- ~ License for the specific language governing permissions and limitations
|
||||
- ~ under the License.
|
||||
- -->
|
||||
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/maven-v4_0_0.xsd">
|
||||
-
|
||||
- <modelVersion>4.0.0</modelVersion>
|
||||
- <parent>
|
||||
- <groupId>io.netty</groupId>
|
||||
- <artifactId>netty-parent</artifactId>
|
||||
- <version>4.1.123.Final</version>
|
||||
- </parent>
|
||||
-
|
||||
- <artifactId>netty-transport-blockhound-tests</artifactId>
|
||||
- <packaging>jar</packaging>
|
||||
- <description>
|
||||
- Tests for the BlockHound integration.
|
||||
- </description>
|
||||
-
|
||||
- <name>Netty/Transport/BlockHound/Tests</name>
|
||||
-
|
||||
- <profiles>
|
||||
- <profile>
|
||||
- <id>java13</id>
|
||||
- <activation>
|
||||
- <jdk>13</jdk>
|
||||
- </activation>
|
||||
- <properties>
|
||||
- <argLine.common>-XX:+AllowRedefinitionToAddDeleteMethods</argLine.common>
|
||||
- </properties>
|
||||
- </profile>
|
||||
- <profile>
|
||||
- <id>java14</id>
|
||||
- <activation>
|
||||
- <jdk>14</jdk>
|
||||
- </activation>
|
||||
- <properties>
|
||||
- <argLine.common>-XX:+AllowRedefinitionToAddDeleteMethods</argLine.common>
|
||||
- </properties>
|
||||
- </profile>
|
||||
- <profile>
|
||||
- <id>java15</id>
|
||||
- <activation>
|
||||
- <jdk>15</jdk>
|
||||
- </activation>
|
||||
- <properties>
|
||||
- <argLine.common>-XX:+AllowRedefinitionToAddDeleteMethods</argLine.common>
|
||||
- </properties>
|
||||
- </profile>
|
||||
- <profile>
|
||||
- <id>java16</id>
|
||||
- <activation>
|
||||
- <jdk>16</jdk>
|
||||
- </activation>
|
||||
- <properties>
|
||||
- <argLine.common>-XX:+AllowRedefinitionToAddDeleteMethods</argLine.common>
|
||||
- </properties>
|
||||
- </profile>
|
||||
- <profile>
|
||||
- <id>java17</id>
|
||||
- <activation>
|
||||
- <jdk>17</jdk>
|
||||
- </activation>
|
||||
- <properties>
|
||||
- <argLine.common>-XX:+AllowRedefinitionToAddDeleteMethods</argLine.common>
|
||||
- </properties>
|
||||
- </profile>
|
||||
- <profile>
|
||||
- <id>java18</id>
|
||||
- <activation>
|
||||
- <jdk>18</jdk>
|
||||
- </activation>
|
||||
- <properties>
|
||||
- <argLine.common>-XX:+AllowRedefinitionToAddDeleteMethods</argLine.common>
|
||||
- </properties>
|
||||
- </profile>
|
||||
- <profile>
|
||||
- <id>java19</id>
|
||||
- <activation>
|
||||
- <jdk>19</jdk>
|
||||
- </activation>
|
||||
- <properties>
|
||||
- <argLine.common>-XX:+AllowRedefinitionToAddDeleteMethods</argLine.common>
|
||||
- </properties>
|
||||
- </profile>
|
||||
- <profile>
|
||||
- <id>java20</id>
|
||||
- <activation>
|
||||
- <jdk>20</jdk>
|
||||
- </activation>
|
||||
- <properties>
|
||||
- <argLine.common>-XX:+AllowRedefinitionToAddDeleteMethods</argLine.common>
|
||||
- </properties>
|
||||
- </profile>
|
||||
- <profile>
|
||||
- <id>java21</id>
|
||||
- <activation>
|
||||
- <jdk>21</jdk>
|
||||
- </activation>
|
||||
- <properties>
|
||||
- <argLine.common>-XX:+AllowRedefinitionToAddDeleteMethods</argLine.common>
|
||||
- </properties>
|
||||
- </profile>
|
||||
- <profile>
|
||||
- <id>java22</id>
|
||||
- <activation>
|
||||
- <jdk>22</jdk>
|
||||
- </activation>
|
||||
- <properties>
|
||||
- <argLine.common>-XX:+AllowRedefinitionToAddDeleteMethods</argLine.common>
|
||||
- </properties>
|
||||
- </profile>
|
||||
- <profile>
|
||||
- <id>java23</id>
|
||||
- <activation>
|
||||
- <jdk>23</jdk>
|
||||
- </activation>
|
||||
- <properties>
|
||||
- <argLine.common>-XX:+AllowRedefinitionToAddDeleteMethods</argLine.common>
|
||||
- </properties>
|
||||
- </profile>
|
||||
- <profile>
|
||||
- <id>java24</id>
|
||||
- <activation>
|
||||
- <jdk>24</jdk>
|
||||
- </activation>
|
||||
- <properties>
|
||||
- <argLine.common>-XX:+AllowRedefinitionToAddDeleteMethods</argLine.common>
|
||||
- </properties>
|
||||
- </profile>
|
||||
- <profile>
|
||||
- <id>java25</id>
|
||||
- <activation>
|
||||
- <jdk>25</jdk>
|
||||
- </activation>
|
||||
- <properties>
|
||||
- <argLine.common>-XX:+AllowRedefinitionToAddDeleteMethods -XX:+EnableDynamicAgentLoading</argLine.common>
|
||||
- </properties>
|
||||
- </profile>
|
||||
- </profiles>
|
||||
-
|
||||
- <properties>
|
||||
- <maven.compiler.source>1.8</maven.compiler.source>
|
||||
- <maven.compiler.target>1.8</maven.compiler.target>
|
||||
- <!-- Needed for SelfSignedCertificate -->
|
||||
- <argLine.java9.extras>--add-exports java.base/sun.security.x509=ALL-UNNAMED</argLine.java9.extras>
|
||||
- <japicmp.skip>true</japicmp.skip>
|
||||
- <!-- Do not deploy this module -->
|
||||
- <skipDeploy>true</skipDeploy>
|
||||
- <javaModuleName>io.netty.transport_blockhound_tests</javaModuleName>
|
||||
- </properties>
|
||||
-
|
||||
- <dependencies>
|
||||
- <dependency>
|
||||
- <groupId>${project.groupId}</groupId>
|
||||
- <artifactId>netty-transport</artifactId>
|
||||
- <version>${project.version}</version>
|
||||
- </dependency>
|
||||
- <dependency>
|
||||
- <groupId>${project.groupId}</groupId>
|
||||
- <artifactId>netty-handler</artifactId>
|
||||
- <version>${project.version}</version>
|
||||
- </dependency>
|
||||
- <dependency>
|
||||
- <groupId>${project.groupId}</groupId>
|
||||
- <artifactId>netty-resolver-dns</artifactId>
|
||||
- <version>${project.version}</version>
|
||||
- </dependency>
|
||||
- <dependency>
|
||||
- <groupId>${project.groupId}</groupId>
|
||||
- <artifactId>${tcnative.artifactId}</artifactId>
|
||||
- <classifier>${tcnative.classifier}</classifier>
|
||||
- <optional>true</optional>
|
||||
- </dependency>
|
||||
-
|
||||
- <dependency>
|
||||
- <groupId>org.bouncycastle</groupId>
|
||||
- <artifactId>bcpkix-jdk15on</artifactId>
|
||||
- <optional>true</optional>
|
||||
- </dependency>
|
||||
- <dependency>
|
||||
- <groupId>io.projectreactor.tools</groupId>
|
||||
- <artifactId>blockhound</artifactId>
|
||||
- <scope>test</scope>
|
||||
- </dependency>
|
||||
- <dependency>
|
||||
- <groupId>org.junit.jupiter</groupId>
|
||||
- <artifactId>junit-jupiter-api</artifactId>
|
||||
- <scope>test</scope>
|
||||
- </dependency>
|
||||
- <dependency>
|
||||
- <groupId>org.junit.jupiter</groupId>
|
||||
- <artifactId>junit-jupiter-engine</artifactId>
|
||||
- <scope>test</scope>
|
||||
- </dependency>
|
||||
- <dependency>
|
||||
- <groupId>org.junit.jupiter</groupId>
|
||||
- <artifactId>junit-jupiter-params</artifactId>
|
||||
- <scope>test</scope>
|
||||
- </dependency>
|
||||
- <dependency>
|
||||
- <groupId>org.assertj</groupId>
|
||||
- <artifactId>assertj-core</artifactId>
|
||||
- <scope>test</scope>
|
||||
- </dependency>
|
||||
- </dependencies>
|
||||
-</project>
|
||||
diff --git a/transport-blockhound-tests/src/test/java/io/netty/util/internal/NettyBlockHoundIntegrationTest.java b/transport-blockhound-tests/src/test/java/io/netty/util/internal/NettyBlockHoundIntegrationTest.java
|
||||
deleted file mode 100644
|
||||
index 403b97a418..0000000000
|
||||
--- a/transport-blockhound-tests/src/test/java/io/netty/util/internal/NettyBlockHoundIntegrationTest.java
|
||||
+++ /dev/null
|
||||
@@ -1,568 +0,0 @@
|
||||
-/*
|
||||
- * Copyright 2019 The Netty Project
|
||||
-
|
||||
- * The Netty Project licenses this file to you under the Apache License,
|
||||
- * version 2.0 (the "License"); you may not use this file except in compliance
|
||||
- * with the License. You may obtain a copy of the License at:
|
||||
-
|
||||
- * https://www.apache.org/licenses/LICENSE-2.0
|
||||
-
|
||||
- * Unless required by applicable law or agreed to in writing, software
|
||||
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
- * License for the specific language governing permissions and limitations
|
||||
- * under the License.
|
||||
- */
|
||||
-package io.netty.util.internal;
|
||||
-
|
||||
-import io.netty.bootstrap.Bootstrap;
|
||||
-import io.netty.bootstrap.ServerBootstrap;
|
||||
-import io.netty.buffer.ByteBuf;
|
||||
-import io.netty.buffer.PooledByteBufAllocator;
|
||||
-import io.netty.buffer.UnpooledByteBufAllocator;
|
||||
-import io.netty.channel.Channel;
|
||||
-import io.netty.channel.ChannelFuture;
|
||||
-import io.netty.channel.ChannelFutureListener;
|
||||
-import io.netty.channel.ChannelHandlerContext;
|
||||
-import io.netty.channel.ChannelInboundHandlerAdapter;
|
||||
-import io.netty.channel.ChannelInitializer;
|
||||
-import io.netty.channel.EventLoopGroup;
|
||||
-import io.netty.channel.nio.NioEventLoopGroup;
|
||||
-import io.netty.channel.socket.nio.NioDatagramChannel;
|
||||
-import io.netty.channel.socket.nio.NioServerSocketChannel;
|
||||
-import io.netty.channel.socket.nio.NioSocketChannel;
|
||||
-import io.netty.handler.ssl.SslContext;
|
||||
-import io.netty.handler.ssl.SslContextBuilder;
|
||||
-import io.netty.handler.ssl.SslHandler;
|
||||
-import io.netty.handler.ssl.SslHandshakeCompletionEvent;
|
||||
-import io.netty.handler.ssl.SslProvider;
|
||||
-import io.netty.handler.ssl.util.InsecureTrustManagerFactory;
|
||||
-import io.netty.handler.ssl.util.SelfSignedCertificate;
|
||||
-import io.netty.resolver.dns.DnsNameResolverBuilder;
|
||||
-import io.netty.resolver.dns.DnsServerAddressStreamProviders;
|
||||
-import io.netty.util.HashedWheelTimer;
|
||||
-import io.netty.util.ReferenceCountUtil;
|
||||
-import io.netty.util.concurrent.DefaultThreadFactory;
|
||||
-import io.netty.util.concurrent.EventExecutor;
|
||||
-import io.netty.util.concurrent.FastThreadLocalThread;
|
||||
-import io.netty.util.concurrent.GlobalEventExecutor;
|
||||
-import io.netty.util.concurrent.ImmediateEventExecutor;
|
||||
-import io.netty.util.concurrent.ImmediateExecutor;
|
||||
-import io.netty.util.concurrent.ScheduledFuture;
|
||||
-import io.netty.util.concurrent.SingleThreadEventExecutor;
|
||||
-import io.netty.util.internal.Hidden.NettyBlockHoundIntegration;
|
||||
-import org.junit.jupiter.api.BeforeAll;
|
||||
-import org.junit.jupiter.api.Test;
|
||||
-import org.junit.jupiter.api.Timeout;
|
||||
-import reactor.blockhound.BlockHound;
|
||||
-import reactor.blockhound.BlockingOperationError;
|
||||
-import reactor.blockhound.integration.BlockHoundIntegration;
|
||||
-
|
||||
-import java.net.InetSocketAddress;
|
||||
-import java.util.ArrayList;
|
||||
-import java.util.List;
|
||||
-import java.util.Queue;
|
||||
-import java.util.ServiceLoader;
|
||||
-import java.util.concurrent.Callable;
|
||||
-import java.util.concurrent.CountDownLatch;
|
||||
-import java.util.concurrent.ExecutionException;
|
||||
-import java.util.concurrent.Executor;
|
||||
-import java.util.concurrent.ExecutorService;
|
||||
-import java.util.concurrent.Executors;
|
||||
-import java.util.concurrent.Future;
|
||||
-import java.util.concurrent.FutureTask;
|
||||
-import java.util.concurrent.LinkedBlockingQueue;
|
||||
-import java.util.concurrent.TimeUnit;
|
||||
-import java.util.concurrent.atomic.AtomicLong;
|
||||
-import java.util.concurrent.atomic.AtomicReference;
|
||||
-import java.util.concurrent.locks.ReentrantLock;
|
||||
-
|
||||
-import static io.netty.buffer.Unpooled.wrappedBuffer;
|
||||
-import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
-import static org.junit.jupiter.api.Assertions.assertInstanceOf;
|
||||
-import static org.junit.jupiter.api.Assertions.assertNull;
|
||||
-import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
-import static org.junit.jupiter.api.Assertions.fail;
|
||||
-import static org.junit.jupiter.api.Assumptions.assumeTrue;
|
||||
-
|
||||
-public class NettyBlockHoundIntegrationTest {
|
||||
-
|
||||
- @BeforeAll
|
||||
- public static void setUpClass() {
|
||||
- BlockHound.install();
|
||||
- }
|
||||
-
|
||||
- @Test
|
||||
- public void testServiceLoader() {
|
||||
- for (BlockHoundIntegration integration : ServiceLoader.load(BlockHoundIntegration.class)) {
|
||||
- if (integration instanceof NettyBlockHoundIntegration) {
|
||||
- return;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- fail("NettyBlockHoundIntegration cannot be loaded with ServiceLoader");
|
||||
- }
|
||||
-
|
||||
- @Test
|
||||
- public void testBlockingCallsInNettyThreads() throws Exception {
|
||||
- final FutureTask<Void> future = new FutureTask<>(() -> {
|
||||
- Thread.sleep(0);
|
||||
- return null;
|
||||
- });
|
||||
- GlobalEventExecutor.INSTANCE.execute(future);
|
||||
-
|
||||
- try {
|
||||
- future.get(5, TimeUnit.SECONDS);
|
||||
- fail("Expected an exception due to a blocking call but none was thrown");
|
||||
- } catch (ExecutionException e) {
|
||||
- assertInstanceOf(BlockingOperationError.class, e.getCause());
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- @Test
|
||||
- @Timeout(value = 5000, unit = TimeUnit.MILLISECONDS)
|
||||
- public void testGlobalEventExecutorTakeTask() throws InterruptedException {
|
||||
- testEventExecutorTakeTask(GlobalEventExecutor.INSTANCE);
|
||||
- }
|
||||
-
|
||||
- @Test
|
||||
- @Timeout(value = 5000, unit = TimeUnit.MILLISECONDS)
|
||||
- public void testSingleThreadEventExecutorTakeTask() throws InterruptedException {
|
||||
- SingleThreadEventExecutor executor =
|
||||
- new SingleThreadEventExecutor(null, new DefaultThreadFactory("test"), true) {
|
||||
- @Override
|
||||
- protected void run() {
|
||||
- while (!confirmShutdown()) {
|
||||
- Runnable task = takeTask();
|
||||
- if (task != null) {
|
||||
- task.run();
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
- };
|
||||
- testEventExecutorTakeTask(executor);
|
||||
- }
|
||||
-
|
||||
- private static void testEventExecutorTakeTask(EventExecutor eventExecutor) throws InterruptedException {
|
||||
- CountDownLatch latch = new CountDownLatch(1);
|
||||
- ScheduledFuture<?> f = eventExecutor.schedule(latch::countDown, 10, TimeUnit.MILLISECONDS);
|
||||
- f.sync();
|
||||
- latch.await();
|
||||
- }
|
||||
-
|
||||
- @Test
|
||||
- @Timeout(value = 5000, unit = TimeUnit.MILLISECONDS)
|
||||
- public void testSingleThreadEventExecutorAddTask() throws Exception {
|
||||
- TestLinkedBlockingQueue<Runnable> taskQueue = new TestLinkedBlockingQueue<>();
|
||||
- SingleThreadEventExecutor executor =
|
||||
- new SingleThreadEventExecutor(null, new DefaultThreadFactory("test"), true) {
|
||||
- @Override
|
||||
- protected Queue<Runnable> newTaskQueue(int maxPendingTasks) {
|
||||
- return taskQueue;
|
||||
- }
|
||||
-
|
||||
- @Override
|
||||
- protected void run() {
|
||||
- while (!confirmShutdown()) {
|
||||
- Runnable task = takeTask();
|
||||
- if (task != null) {
|
||||
- task.run();
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
- };
|
||||
- taskQueue.emulateContention();
|
||||
- CountDownLatch latch = new CountDownLatch(1);
|
||||
- executor.submit(() -> {
|
||||
- executor.execute(() -> { }); // calls addTask
|
||||
- latch.countDown();
|
||||
- });
|
||||
- taskQueue.waitUntilContented();
|
||||
- taskQueue.removeContention();
|
||||
- latch.await();
|
||||
- }
|
||||
-
|
||||
- @Test
|
||||
- void permittingBlockingCallsInFastThreadLocalThreadSubclass() throws Exception {
|
||||
- final FutureTask<Void> future = new FutureTask<>(() -> {
|
||||
- Thread.sleep(0);
|
||||
- return null;
|
||||
- });
|
||||
- FastThreadLocalThread thread = new FastThreadLocalThread(future) {
|
||||
- @Override
|
||||
- public boolean permitBlockingCalls() {
|
||||
- return true; // The Thread.sleep(0) call should not be flagged because we allow blocking calls.
|
||||
- }
|
||||
- };
|
||||
- thread.start();
|
||||
- future.get(5, TimeUnit.SECONDS);
|
||||
- thread.join();
|
||||
- }
|
||||
-
|
||||
- @Test
|
||||
- @Timeout(value = 5000, unit = TimeUnit.MILLISECONDS)
|
||||
- public void testHashedWheelTimerStartStop() throws Exception {
|
||||
- HashedWheelTimer timer = new HashedWheelTimer();
|
||||
- Future<?> futureStart = GlobalEventExecutor.INSTANCE.submit(timer::start);
|
||||
- futureStart.get(5, TimeUnit.SECONDS);
|
||||
- Future<?> futureStop = GlobalEventExecutor.INSTANCE.submit(timer::stop);
|
||||
- futureStop.get(5, TimeUnit.SECONDS);
|
||||
- }
|
||||
-
|
||||
- // Tests copied from io.netty.handler.ssl.SslHandlerTest
|
||||
- @Test
|
||||
- public void testHandshakeWithExecutorThatExecuteDirectory() throws Exception {
|
||||
- testHandshakeWithExecutor(Runnable::run, "TLSv1.2");
|
||||
- }
|
||||
-
|
||||
- @Test
|
||||
- public void testHandshakeWithExecutorThatExecuteDirectoryTLSv13() throws Exception {
|
||||
- assumeTrue(SslProvider.isTlsv13Supported(SslProvider.JDK));
|
||||
- testHandshakeWithExecutor(Runnable::run, "TLSv1.3");
|
||||
- }
|
||||
-
|
||||
- @Test
|
||||
- public void testHandshakeWithImmediateExecutor() throws Exception {
|
||||
- testHandshakeWithExecutor(ImmediateExecutor.INSTANCE, "TLSv1.2");
|
||||
- }
|
||||
-
|
||||
- @Test
|
||||
- public void testHandshakeWithImmediateExecutorTLSv13() throws Exception {
|
||||
- assumeTrue(SslProvider.isTlsv13Supported(SslProvider.JDK));
|
||||
- testHandshakeWithExecutor(ImmediateExecutor.INSTANCE, "TLSv1.3");
|
||||
- }
|
||||
-
|
||||
- @Test
|
||||
- public void testHandshakeWithImmediateEventExecutor() throws Exception {
|
||||
- testHandshakeWithExecutor(ImmediateEventExecutor.INSTANCE, "TLSv1.2");
|
||||
- }
|
||||
-
|
||||
- @Test
|
||||
- public void testHandshakeWithImmediateEventExecutorTLSv13() throws Exception {
|
||||
- assumeTrue(SslProvider.isTlsv13Supported(SslProvider.JDK));
|
||||
- testHandshakeWithExecutor(ImmediateEventExecutor.INSTANCE, "TLSv1.3");
|
||||
- }
|
||||
-
|
||||
- @Test
|
||||
- public void testHandshakeWithExecutor() throws Exception {
|
||||
- ExecutorService executorService = Executors.newCachedThreadPool();
|
||||
- try {
|
||||
- testHandshakeWithExecutor(executorService, "TLSv1.2");
|
||||
- } finally {
|
||||
- executorService.shutdown();
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- @Test
|
||||
- public void testHandshakeWithExecutorTLSv13() throws Exception {
|
||||
- assumeTrue(SslProvider.isTlsv13Supported(SslProvider.JDK));
|
||||
- ExecutorService executorService = Executors.newCachedThreadPool();
|
||||
- try {
|
||||
- testHandshakeWithExecutor(executorService, "TLSv1.3");
|
||||
- } finally {
|
||||
- executorService.shutdown();
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- @Test
|
||||
- public void testTrustManagerVerifyJDK() throws Exception {
|
||||
- testTrustManagerVerify(SslProvider.JDK, "TLSv1.2");
|
||||
- }
|
||||
-
|
||||
- @Test
|
||||
- public void testTrustManagerVerifyTLSv13JDK() throws Exception {
|
||||
- assumeTrue(SslProvider.isTlsv13Supported(SslProvider.JDK));
|
||||
- testTrustManagerVerify(SslProvider.JDK, "TLSv1.3");
|
||||
- }
|
||||
-
|
||||
- @Test
|
||||
- public void testTrustManagerVerifyOpenSSL() throws Exception {
|
||||
- testTrustManagerVerify(SslProvider.OPENSSL, "TLSv1.2");
|
||||
- }
|
||||
-
|
||||
- @Test
|
||||
- public void testTrustManagerVerifyTLSv13OpenSSL() throws Exception {
|
||||
- assumeTrue(SslProvider.isTlsv13Supported(SslProvider.OPENSSL));
|
||||
- testTrustManagerVerify(SslProvider.OPENSSL, "TLSv1.3");
|
||||
- }
|
||||
-
|
||||
- @Test
|
||||
- public void testSslHandlerWrapAllowsBlockingCalls() throws Exception {
|
||||
- final SslContext sslClientCtx =
|
||||
- SslContextBuilder.forClient()
|
||||
- .trustManager(InsecureTrustManagerFactory.INSTANCE)
|
||||
- .sslProvider(SslProvider.JDK)
|
||||
- .build();
|
||||
- final SslHandler sslHandler = sslClientCtx.newHandler(UnpooledByteBufAllocator.DEFAULT);
|
||||
- final EventLoopGroup group = new NioEventLoopGroup();
|
||||
- final CountDownLatch activeLatch = new CountDownLatch(1);
|
||||
- final AtomicReference<Throwable> error = new AtomicReference<>();
|
||||
-
|
||||
- Channel sc = null;
|
||||
- Channel cc = null;
|
||||
- try {
|
||||
- sc = new ServerBootstrap()
|
||||
- .group(group)
|
||||
- .channel(NioServerSocketChannel.class)
|
||||
- .childHandler(new ChannelInboundHandlerAdapter())
|
||||
- .bind(new InetSocketAddress(0))
|
||||
- .syncUninterruptibly()
|
||||
- .channel();
|
||||
-
|
||||
- cc = new Bootstrap()
|
||||
- .group(group)
|
||||
- .channel(NioSocketChannel.class)
|
||||
- .handler(new ChannelInitializer<Channel>() {
|
||||
-
|
||||
- @Override
|
||||
- protected void initChannel(Channel ch) {
|
||||
- ch.pipeline().addLast(sslHandler);
|
||||
- ch.pipeline().addLast(new ChannelInboundHandlerAdapter() {
|
||||
-
|
||||
- @Override
|
||||
- public void channelActive(ChannelHandlerContext ctx) {
|
||||
- activeLatch.countDown();
|
||||
- }
|
||||
-
|
||||
- @Override
|
||||
- public void userEventTriggered(ChannelHandlerContext ctx, Object evt) {
|
||||
- if (evt instanceof SslHandshakeCompletionEvent &&
|
||||
- ((SslHandshakeCompletionEvent) evt).cause() != null) {
|
||||
- Throwable cause = ((SslHandshakeCompletionEvent) evt).cause();
|
||||
- cause.printStackTrace();
|
||||
- error.set(cause);
|
||||
- }
|
||||
- ctx.fireUserEventTriggered(evt);
|
||||
- }
|
||||
- });
|
||||
- }
|
||||
- })
|
||||
- .connect(sc.localAddress())
|
||||
- .addListener((ChannelFutureListener) future ->
|
||||
- future.channel().writeAndFlush(wrappedBuffer(new byte [] { 1, 2, 3, 4 })))
|
||||
- .syncUninterruptibly()
|
||||
- .channel();
|
||||
-
|
||||
- assertTrue(activeLatch.await(5, TimeUnit.SECONDS));
|
||||
- assertNull(error.get());
|
||||
- } finally {
|
||||
- if (cc != null) {
|
||||
- cc.close().syncUninterruptibly();
|
||||
- }
|
||||
- if (sc != null) {
|
||||
- sc.close().syncUninterruptibly();
|
||||
- }
|
||||
- group.shutdownGracefully();
|
||||
- ReferenceCountUtil.release(sslClientCtx);
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- @Test
|
||||
- @Timeout(value = 5000, unit = TimeUnit.MILLISECONDS)
|
||||
- public void pooledBufferAllocation() throws Exception {
|
||||
- AtomicLong iterationCounter = new AtomicLong();
|
||||
- PooledByteBufAllocator allocator = PooledByteBufAllocator.DEFAULT;
|
||||
- FutureTask<Void> task = new FutureTask<>(() -> {
|
||||
- List<ByteBuf> buffers = new ArrayList<>();
|
||||
- long count;
|
||||
- do {
|
||||
- count = iterationCounter.get();
|
||||
- } while (count == 0);
|
||||
- for (int i = 0; i < 13; i++) {
|
||||
- int size = 8 << i;
|
||||
- buffers.add(allocator.ioBuffer(size, size));
|
||||
- }
|
||||
- for (ByteBuf buffer : buffers) {
|
||||
- buffer.release();
|
||||
- }
|
||||
- return null;
|
||||
- });
|
||||
- FastThreadLocalThread thread = new FastThreadLocalThread(task);
|
||||
- thread.start();
|
||||
- do {
|
||||
- allocator.dumpStats(); // This will take internal pool locks and we'll race with the thread.
|
||||
- iterationCounter.set(1);
|
||||
- } while (thread.isAlive());
|
||||
- thread.join();
|
||||
- task.get();
|
||||
- }
|
||||
-
|
||||
- @Test
|
||||
- @Timeout(value = 5000, unit = TimeUnit.MILLISECONDS)
|
||||
- public void testUnixResolverDnsServerAddressStreamProvider_Parse() throws InterruptedException {
|
||||
- doTestParseResolverFilesAllowsBlockingCalls(DnsServerAddressStreamProviders::unixDefault);
|
||||
- }
|
||||
-
|
||||
- @Test
|
||||
- @Timeout(value = 5000, unit = TimeUnit.MILLISECONDS)
|
||||
- public void testHostsFileParser_Parse() throws InterruptedException {
|
||||
- doTestParseResolverFilesAllowsBlockingCalls(DnsNameResolverBuilder::new);
|
||||
- }
|
||||
-
|
||||
- @Test
|
||||
- @Timeout(value = 5000, unit = TimeUnit.MILLISECONDS)
|
||||
- public void testUnixResolverDnsServerAddressStreamProvider_ParseEtcResolverSearchDomainsAndOptions()
|
||||
- throws InterruptedException {
|
||||
- NioEventLoopGroup group = new NioEventLoopGroup();
|
||||
- try {
|
||||
- DnsNameResolverBuilder builder = new DnsNameResolverBuilder(group.next())
|
||||
- .datagramChannelFactory(NioDatagramChannel::new);
|
||||
- doTestParseResolverFilesAllowsBlockingCalls(builder::build);
|
||||
- } finally {
|
||||
- group.shutdownGracefully();
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- private static void doTestParseResolverFilesAllowsBlockingCalls(Callable<Object> callable)
|
||||
- throws InterruptedException {
|
||||
- SingleThreadEventExecutor executor =
|
||||
- new SingleThreadEventExecutor(null, new DefaultThreadFactory("test"), true) {
|
||||
- @Override
|
||||
- protected void run() {
|
||||
- while (!confirmShutdown()) {
|
||||
- Runnable task = takeTask();
|
||||
- if (task != null) {
|
||||
- task.run();
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
- };
|
||||
- try {
|
||||
- CountDownLatch latch = new CountDownLatch(1);
|
||||
- List<Object> result = new ArrayList<>();
|
||||
- List<Throwable> error = new ArrayList<>();
|
||||
- executor.execute(() -> {
|
||||
- try {
|
||||
- result.add(callable.call());
|
||||
- } catch (Throwable t) {
|
||||
- error.add(t);
|
||||
- }
|
||||
- latch.countDown();
|
||||
- });
|
||||
- latch.await();
|
||||
- assertEquals(0, error.size());
|
||||
- assertEquals(1, result.size());
|
||||
- } finally {
|
||||
- executor.shutdownGracefully();
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- private static void testTrustManagerVerify(SslProvider provider, String tlsVersion) throws Exception {
|
||||
- final SslContext sslClientCtx =
|
||||
- SslContextBuilder.forClient()
|
||||
- .sslProvider(provider)
|
||||
- .protocols(tlsVersion)
|
||||
- .trustManager(ResourcesUtil.getFile(
|
||||
- NettyBlockHoundIntegrationTest.class, "mutual_auth_ca.pem"))
|
||||
- .build();
|
||||
-
|
||||
- final SslContext sslServerCtx =
|
||||
- SslContextBuilder.forServer(ResourcesUtil.getFile(
|
||||
- NettyBlockHoundIntegrationTest.class, "localhost_server.pem"),
|
||||
- ResourcesUtil.getFile(
|
||||
- NettyBlockHoundIntegrationTest.class, "localhost_server.key"),
|
||||
- null)
|
||||
- .sslProvider(provider)
|
||||
- .protocols(tlsVersion)
|
||||
- .build();
|
||||
-
|
||||
- final SslHandler clientSslHandler = sslClientCtx.newHandler(UnpooledByteBufAllocator.DEFAULT);
|
||||
- final SslHandler serverSslHandler = sslServerCtx.newHandler(UnpooledByteBufAllocator.DEFAULT);
|
||||
-
|
||||
- testHandshake(sslClientCtx, clientSslHandler, serverSslHandler);
|
||||
- }
|
||||
-
|
||||
- private static void testHandshakeWithExecutor(Executor executor, String tlsVersion) throws Exception {
|
||||
- final SslContext sslClientCtx = SslContextBuilder.forClient()
|
||||
- .trustManager(InsecureTrustManagerFactory.INSTANCE)
|
||||
- .sslProvider(SslProvider.JDK).protocols(tlsVersion).build();
|
||||
-
|
||||
- final SelfSignedCertificate cert = new SelfSignedCertificate();
|
||||
- final SslContext sslServerCtx = SslContextBuilder.forServer(cert.key(), cert.cert())
|
||||
- .sslProvider(SslProvider.JDK).protocols(tlsVersion).build();
|
||||
-
|
||||
- final SslHandler clientSslHandler = sslClientCtx.newHandler(UnpooledByteBufAllocator.DEFAULT, executor);
|
||||
- final SslHandler serverSslHandler = sslServerCtx.newHandler(UnpooledByteBufAllocator.DEFAULT, executor);
|
||||
-
|
||||
- testHandshake(sslClientCtx, clientSslHandler, serverSslHandler);
|
||||
- }
|
||||
-
|
||||
- private static void testHandshake(SslContext sslClientCtx, SslHandler clientSslHandler,
|
||||
- SslHandler serverSslHandler) throws Exception {
|
||||
- EventLoopGroup group = new NioEventLoopGroup();
|
||||
- Channel sc = null;
|
||||
- Channel cc = null;
|
||||
- try {
|
||||
- sc = new ServerBootstrap()
|
||||
- .group(group)
|
||||
- .channel(NioServerSocketChannel.class)
|
||||
- .childHandler(serverSslHandler)
|
||||
- .bind(new InetSocketAddress(0)).syncUninterruptibly().channel();
|
||||
-
|
||||
- ChannelFuture future = new Bootstrap()
|
||||
- .group(group)
|
||||
- .channel(NioSocketChannel.class)
|
||||
- .handler(new ChannelInitializer<Channel>() {
|
||||
- @Override
|
||||
- protected void initChannel(Channel ch) {
|
||||
- ch.pipeline()
|
||||
- .addLast(clientSslHandler)
|
||||
- .addLast(new ChannelInboundHandlerAdapter() {
|
||||
-
|
||||
- @Override
|
||||
- public void userEventTriggered(ChannelHandlerContext ctx, Object evt) {
|
||||
- if (evt instanceof SslHandshakeCompletionEvent &&
|
||||
- ((SslHandshakeCompletionEvent) evt).cause() != null) {
|
||||
- ((SslHandshakeCompletionEvent) evt).cause().printStackTrace();
|
||||
- }
|
||||
- ctx.fireUserEventTriggered(evt);
|
||||
- }
|
||||
- });
|
||||
- }
|
||||
- }).connect(sc.localAddress());
|
||||
- cc = future.syncUninterruptibly().channel();
|
||||
-
|
||||
- clientSslHandler.handshakeFuture().await().sync();
|
||||
- serverSslHandler.handshakeFuture().await().sync();
|
||||
- } finally {
|
||||
- if (cc != null) {
|
||||
- cc.close().syncUninterruptibly();
|
||||
- }
|
||||
- if (sc != null) {
|
||||
- sc.close().syncUninterruptibly();
|
||||
- }
|
||||
- group.shutdownGracefully();
|
||||
- ReferenceCountUtil.release(sslClientCtx);
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- private static class TestLinkedBlockingQueue<T> extends LinkedBlockingQueue<T> {
|
||||
-
|
||||
- private final ReentrantLock lock = new ReentrantLock();
|
||||
-
|
||||
- @Override
|
||||
- public boolean offer(T t) {
|
||||
- lock.lock();
|
||||
- try {
|
||||
- return super.offer(t);
|
||||
- } finally {
|
||||
- lock.unlock();
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- void emulateContention() {
|
||||
- lock.lock();
|
||||
- }
|
||||
-
|
||||
- void waitUntilContented() throws InterruptedException {
|
||||
- // wait until the lock gets contended
|
||||
- while (lock.getQueueLength() == 0) {
|
||||
- Thread.sleep(10L);
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- void removeContention() {
|
||||
- lock.unlock();
|
||||
- }
|
||||
- }
|
||||
-}
|
||||
diff --git a/transport-blockhound-tests/src/test/resources/io/netty/util/internal/localhost_server.key b/transport-blockhound-tests/src/test/resources/io/netty/util/internal/localhost_server.key
|
||||
deleted file mode 100644
|
||||
index 9aa6611400..0000000000
|
||||
@@ -370,5 +1173,5 @@ index 9c9241bc65..0000000000
|
||||
-hH82y9bBeflqroOeztqMpONpWoZjlz0sWbJNvXztXINL7LaNmVYOcoUrCcxPS54T
|
||||
------END CERTIFICATE-----
|
||||
--
|
||||
2.48.1
|
||||
2.50.1
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
From 55c1dd2fea13516c9fee6b5365bd6fe7e701a7ec Mon Sep 17 00:00:00 2001
|
||||
From 8f4108d30a1a883b60bc944165ab1ecd91792d2e Mon Sep 17 00:00:00 2001
|
||||
From: Mat Booth <mat.booth@redhat.com>
|
||||
Date: Mon, 7 Sep 2020 13:24:30 +0100
|
||||
Subject: [PATCH 2/7] Remove optional dep conscrypt
|
||||
Subject: [PATCH 2/4] Remove optional dep conscrypt
|
||||
|
||||
---
|
||||
handler/pom.xml | 6 -
|
||||
@@ -15,7 +15,7 @@ Subject: [PATCH 2/7] Remove optional dep conscrypt
|
||||
delete mode 100644 handler/src/main/java/io/netty/handler/ssl/ConscryptAlpnSslEngine.java
|
||||
|
||||
diff --git a/handler/pom.xml b/handler/pom.xml
|
||||
index 36ebf83f49..f5f179584b 100644
|
||||
index d13a8b48ed..e8375d6273 100644
|
||||
--- a/handler/pom.xml
|
||||
+++ b/handler/pom.xml
|
||||
@@ -96,12 +96,6 @@
|
||||
@@ -367,10 +367,10 @@ index 9eb8f15d14..b5715e87ff 100644
|
||||
// https://bugs.java.com/bugdatabase/view_bug.do?bug_id=8230977.
|
||||
// Because of this lets not do a Java version runtime check but just depend on if the required methods are
|
||||
diff --git a/handler/src/main/java/io/netty/handler/ssl/SslHandler.java b/handler/src/main/java/io/netty/handler/ssl/SslHandler.java
|
||||
index 2e8e15fd84..1a6a84b1c6 100644
|
||||
index f80b3004a8..6159b87ca2 100644
|
||||
--- a/handler/src/main/java/io/netty/handler/ssl/SslHandler.java
|
||||
+++ b/handler/src/main/java/io/netty/handler/ssl/SslHandler.java
|
||||
@@ -251,55 +251,6 @@ public class SslHandler extends ByteToMessageDecoder implements ChannelOutboundH
|
||||
@@ -250,55 +250,6 @@ public class SslHandler extends ByteToMessageDecoder implements ChannelOutboundH
|
||||
return ((ReferenceCountedOpenSslEngine) engine).jdkCompatibilityMode;
|
||||
}
|
||||
},
|
||||
@@ -426,7 +426,7 @@ index 2e8e15fd84..1a6a84b1c6 100644
|
||||
JDK(false, MERGE_CUMULATOR) {
|
||||
@Override
|
||||
SSLEngineResult unwrap(SslHandler handler, ByteBuf in, int len, ByteBuf out) throws SSLException {
|
||||
@@ -358,8 +309,7 @@ public class SslHandler extends ByteToMessageDecoder implements ChannelOutboundH
|
||||
@@ -357,8 +308,7 @@ public class SslHandler extends ByteToMessageDecoder implements ChannelOutboundH
|
||||
};
|
||||
|
||||
static SslEngineType forEngine(SSLEngine engine) {
|
||||
@@ -437,10 +437,10 @@ index 2e8e15fd84..1a6a84b1c6 100644
|
||||
|
||||
SslEngineType(boolean wantsDirectBuffer, Cumulator cumulator) {
|
||||
diff --git a/pom.xml b/pom.xml
|
||||
index 76f3dc1728..b3188b816f 100644
|
||||
index 6b389326a4..e3d8295642 100644
|
||||
--- a/pom.xml
|
||||
+++ b/pom.xml
|
||||
@@ -895,16 +895,6 @@
|
||||
@@ -918,16 +918,6 @@
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
@@ -458,5 +458,5 @@ index 76f3dc1728..b3188b816f 100644
|
||||
<dependency>
|
||||
<groupId>software.amazon.cryptools</groupId>
|
||||
--
|
||||
2.48.1
|
||||
2.50.1
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
From daed233559d36cfb8f5136403eb2224da0d89b82 Mon Sep 17 00:00:00 2001
|
||||
From 80592dee40e6b80b630c5931e4e76d0bbe7e9cfd Mon Sep 17 00:00:00 2001
|
||||
From: Mat Booth <mat.booth@redhat.com>
|
||||
Date: Mon, 7 Sep 2020 13:26:20 +0100
|
||||
Subject: [PATCH 3/7] Remove optional deps jetty alpn and npn
|
||||
Subject: [PATCH 3/4] Remove optional deps jetty alpn and npn
|
||||
|
||||
---
|
||||
handler/pom.xml | 10 --
|
||||
@@ -15,7 +15,7 @@ Subject: [PATCH 3/7] Remove optional deps jetty alpn and npn
|
||||
delete mode 100644 handler/src/main/java/io/netty/handler/ssl/JettyNpnSslEngine.java
|
||||
|
||||
diff --git a/handler/pom.xml b/handler/pom.xml
|
||||
index 46c20028eb..35bdbf9272 100644
|
||||
index e8375d6273..6b9a3dd5f7 100644
|
||||
--- a/handler/pom.xml
|
||||
+++ b/handler/pom.xml
|
||||
@@ -86,16 +86,6 @@
|
||||
@@ -374,10 +374,10 @@ index aad00b5f6d..0000000000
|
||||
- }
|
||||
-}
|
||||
diff --git a/pom.xml b/pom.xml
|
||||
index ae68f4ebe8..176b8e9a96 100644
|
||||
index e3d8295642..e6759f0794 100644
|
||||
--- a/pom.xml
|
||||
+++ b/pom.xml
|
||||
@@ -815,20 +815,6 @@
|
||||
@@ -875,20 +875,6 @@
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
@@ -399,5 +399,5 @@ index ae68f4ebe8..176b8e9a96 100644
|
||||
<dependency>
|
||||
<groupId>com.google.protobuf</groupId>
|
||||
--
|
||||
2.46.1
|
||||
2.50.1
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
From 54262615f71f8e201500f31c5fb96d4103228711 Mon Sep 17 00:00:00 2001
|
||||
From e93d8f3b39a67d1726304d8fe29f5ca8584d60e0 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Fridrich=20=C5=A0trba?= <fridrich.strba@bluewin.ch>
|
||||
Date: Thu, 30 Mar 2023 13:19:04 +0200
|
||||
Subject: [PATCH 4/7] Disable Brotli and ZStd compression
|
||||
Subject: [PATCH 4/4] Disable Brotli and ZStd compression
|
||||
|
||||
---
|
||||
.../codec/http/HttpContentCompressor.java | 107 +-----------------
|
||||
@@ -217,7 +217,7 @@ index 17f55d3ed5..27da52dd9a 100644
|
||||
- }
|
||||
}
|
||||
diff --git a/codec-http/src/main/java/io/netty/handler/codec/http/HttpContentDecompressor.java b/codec-http/src/main/java/io/netty/handler/codec/http/HttpContentDecompressor.java
|
||||
index 3b1134b038..c2f3150bfd 100644
|
||||
index 44e6195332..ea461844af 100644
|
||||
--- a/codec-http/src/main/java/io/netty/handler/codec/http/HttpContentDecompressor.java
|
||||
+++ b/codec-http/src/main/java/io/netty/handler/codec/http/HttpContentDecompressor.java
|
||||
@@ -15,23 +15,15 @@
|
||||
@@ -244,7 +244,7 @@ index 3b1134b038..c2f3150bfd 100644
|
||||
|
||||
/**
|
||||
* Decompresses an {@link HttpMessage} and an {@link HttpContent} compressed in
|
||||
@@ -72,20 +64,6 @@ public class HttpContentDecompressor extends HttpContentDecoder {
|
||||
@@ -102,20 +94,6 @@ public class HttpContentDecompressor extends HttpContentDecoder {
|
||||
return new EmbeddedChannel(ctx.channel().id(), ctx.channel().metadata().hasDisconnect(),
|
||||
ctx.channel().config(), ZlibCodecFactory.newZlibDecoder(wrapper, maxAllocation));
|
||||
}
|
||||
@@ -370,7 +370,7 @@ index b12213dff6..fdeadaebbe 100644
|
||||
return null;
|
||||
}
|
||||
diff --git a/codec-http2/src/main/java/io/netty/handler/codec/http2/DelegatingDecompressorFrameListener.java b/codec-http2/src/main/java/io/netty/handler/codec/http2/DelegatingDecompressorFrameListener.java
|
||||
index 88245d1116..de44d6013b 100644
|
||||
index 4c25f0adb7..3e3cdddeb4 100644
|
||||
--- a/codec-http2/src/main/java/io/netty/handler/codec/http2/DelegatingDecompressorFrameListener.java
|
||||
+++ b/codec-http2/src/main/java/io/netty/handler/codec/http2/DelegatingDecompressorFrameListener.java
|
||||
@@ -19,24 +19,16 @@ import io.netty.buffer.Unpooled;
|
||||
@@ -398,7 +398,7 @@ index 88245d1116..de44d6013b 100644
|
||||
import static io.netty.handler.codec.http2.Http2Error.INTERNAL_ERROR;
|
||||
import static io.netty.handler.codec.http2.Http2Exception.streamError;
|
||||
import static io.netty.util.internal.ObjectUtil.checkNotNull;
|
||||
@@ -181,18 +173,6 @@ public class DelegatingDecompressorFrameListener extends Http2FrameListenerDecor
|
||||
@@ -233,18 +225,6 @@ public class DelegatingDecompressorFrameListener extends Http2FrameListenerDecor
|
||||
return new EmbeddedChannel(ctx.channel().id(), ctx.channel().metadata().hasDisconnect(),
|
||||
ctx.channel().config(), ZlibCodecFactory.newZlibDecoder(wrapper, maxAllocation));
|
||||
}
|
||||
@@ -509,5 +509,5 @@ index 38793a97e6..c1f1c8c17c 100644
|
||||
* Default implementation of {@link GzipOptions} with
|
||||
* {@code compressionLevel()} set to 6, {@code windowBits()} set to 15 and {@code memLevel()} set to 8.
|
||||
--
|
||||
2.48.1
|
||||
2.50.1
|
||||
|
||||
|
BIN
netty-4.1.123.Final.tar.gz
(Stored with Git LFS)
Normal file
BIN
netty-4.1.123.Final.tar.gz
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
netty-4.1.124.Final.tar.gz
(Stored with Git LFS)
BIN
netty-4.1.124.Final.tar.gz
(Stored with Git LFS)
Binary file not shown.
@@ -1,24 +1,3 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Aug 22 05:25:09 UTC 2025 - Fridrich Strba <fstrba@suse.com>
|
||||
|
||||
- Upgrade to upstream version 4.1.124
|
||||
* Fixes
|
||||
+ MadeYouReset HTTP/2 DDoS vulnerability
|
||||
(CVE-2025-55163, bsc#1247991)
|
||||
+ Fix NPE and AssertionErrors when many tasks are scheduled and
|
||||
cancelled
|
||||
+ HTTP2: Http2ConnectionHandler should always use
|
||||
Http2ConnectionEncoder
|
||||
+ Epoll: Correctly handle UDP packets with source port of 0
|
||||
+ Fix netty-common OSGi Import-Package header
|
||||
+ MqttConnectPayload.toString() includes password
|
||||
- Modified patches:
|
||||
* 0001-Remove-optional-dep-Blockhound.patch
|
||||
* 0002-Remove-optional-dep-conscrypt.patch
|
||||
* 0003-Remove-optional-deps-jetty-alpn-and-npn.patch
|
||||
* 0004-Disable-Brotli-and-ZStd-compression.patch
|
||||
+ rediff
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jul 24 18:11:55 UTC 2025 - Fridrich Strba <fstrba@suse.com>
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package netty
|
||||
#
|
||||
# Copyright (c) 2025 SUSE LLC and contributors
|
||||
# Copyright (c) 2025 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -19,7 +19,7 @@
|
||||
%global namedreltag .Final
|
||||
%global namedversion %{version}%{?namedreltag}
|
||||
Name: netty
|
||||
Version: 4.1.124
|
||||
Version: 4.1.123
|
||||
Release: 0
|
||||
Summary: An asynchronous event-driven network application framework and tools for Java
|
||||
License: Apache-2.0
|
||||
|
Reference in New Issue
Block a user