diff --git a/.gitignore b/.gitignore
index 021874f..d5b5511 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,5 +12,3 @@
.DS_Store
*.iml
*~
-*.key
-*.crt
diff --git a/netty-channel/src/main/java/module-info.java b/netty-channel/src/main/java/module-info.java
index 7faabd5..fcbe973 100644
--- a/netty-channel/src/main/java/module-info.java
+++ b/netty-channel/src/main/java/module-info.java
@@ -11,6 +11,8 @@ module org.xbib.io.netty.channel {
exports io.netty.channel.oio;
exports io.netty.channel.pool;
exports io.netty.channel.socket;
+ exports io.netty.channel.socket.nio;
+ exports io.netty.channel.socket.oio;
uses ChannelInitializerExtension;
requires org.xbib.io.netty.buffer;
requires org.xbib.io.netty.resolver;
diff --git a/netty-handler-codec-http2/build.gradle b/netty-handler-codec-http2/build.gradle
index 6651465..9e41ef9 100644
--- a/netty-handler-codec-http2/build.gradle
+++ b/netty-handler-codec-http2/build.gradle
@@ -3,6 +3,7 @@ dependencies {
testImplementation testLibs.gson
testImplementation testLibs.assertj
testImplementation testLibs.mockito.core
+ testImplementation project(':netty-handler-ssl-bouncycastle')
testRuntimeOnly project(path: ':netty-tcnative-boringssl-static', configuration: osdetector.classifier)
testRuntimeOnly libs.brotli4j.native."${osdetector.os}"."${osdetector.arch.replace('_','')}"
}
diff --git a/netty-handler-codec-http2/src/test/java/io/netty/handler/codec/http2/Http2MultiplexTransportTest.java b/netty-handler-codec-http2/src/test/java/io/netty/handler/codec/http2/Http2MultiplexTransportTest.java
index fd201c6..dd4abd1 100644
--- a/netty-handler-codec-http2/src/test/java/io/netty/handler/codec/http2/Http2MultiplexTransportTest.java
+++ b/netty-handler-codec-http2/src/test/java/io/netty/handler/codec/http2/Http2MultiplexTransportTest.java
@@ -42,7 +42,7 @@ import io.netty.handler.ssl.SslHandshakeCompletionEvent;
import io.netty.handler.ssl.SslProvider;
import io.netty.handler.ssl.SupportedCipherSuiteFilter;
import io.netty.handler.ssl.util.InsecureTrustManagerFactory;
-import io.netty.handler.ssl.util.SelfSignedCertificate;
+import io.netty.handler.ssl.bouncycastle.SelfSignedCertificate;
import io.netty.util.CharsetUtil;
import io.netty.util.NetUtil;
import io.netty.util.ReferenceCountUtil;
diff --git a/netty-handler-codec-http3/build.gradle b/netty-handler-codec-http3/build.gradle
index bafe222..f4af733 100644
--- a/netty-handler-codec-http3/build.gradle
+++ b/netty-handler-codec-http3/build.gradle
@@ -3,4 +3,5 @@ dependencies {
api project(':netty-handler-codec-quic')
testImplementation testLibs.assertj
testImplementation testLibs.mockito.core
+ testImplementation project(':netty-handler-ssl-bouncycastle')
}
diff --git a/netty-handler-codec-http3/src/test/java/io/netty/handler/codec/http3/Http3FrameToHttpObjectCodecTest.java b/netty-handler-codec-http3/src/test/java/io/netty/handler/codec/http3/Http3FrameToHttpObjectCodecTest.java
index 937d434..437e8df 100644
--- a/netty-handler-codec-http3/src/test/java/io/netty/handler/codec/http3/Http3FrameToHttpObjectCodecTest.java
+++ b/netty-handler-codec-http3/src/test/java/io/netty/handler/codec/http3/Http3FrameToHttpObjectCodecTest.java
@@ -54,7 +54,7 @@ import io.netty.handler.codec.http.HttpUtil;
import io.netty.handler.codec.http.HttpVersion;
import io.netty.handler.codec.http.LastHttpContent;
import io.netty.handler.ssl.util.InsecureTrustManagerFactory;
-import io.netty.handler.ssl.util.SelfSignedCertificate;
+import io.netty.handler.ssl.bouncycastle.SelfSignedCertificate;
import io.netty.handler.codec.quic.InsecureQuicTokenHandler;
import io.netty.handler.codec.quic.QuicChannel;
import io.netty.handler.codec.quic.QuicSslContextBuilder;
diff --git a/netty-handler-codec-http3/src/test/java/io/netty/handler/codec/http3/Http3SpecTestServer.java b/netty-handler-codec-http3/src/test/java/io/netty/handler/codec/http3/Http3SpecTestServer.java
index ab47fb0..8746ba7 100644
--- a/netty-handler-codec-http3/src/test/java/io/netty/handler/codec/http3/Http3SpecTestServer.java
+++ b/netty-handler-codec-http3/src/test/java/io/netty/handler/codec/http3/Http3SpecTestServer.java
@@ -23,7 +23,7 @@ import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelInitializer;
import io.netty.channel.nio.NioEventLoopGroup;
import io.netty.channel.socket.nio.NioDatagramChannel;
-import io.netty.handler.ssl.util.SelfSignedCertificate;
+import io.netty.handler.ssl.bouncycastle.SelfSignedCertificate;
import io.netty.handler.codec.quic.InsecureQuicTokenHandler;
import io.netty.handler.codec.quic.QuicChannel;
import io.netty.handler.codec.quic.QuicSslContext;
diff --git a/netty-handler-codec-http3/src/test/java/io/netty/handler/codec/http3/example/Http3ServerExample.java b/netty-handler-codec-http3/src/test/java/io/netty/handler/codec/http3/example/Http3ServerExample.java
index 3b1c09e..600c14a 100644
--- a/netty-handler-codec-http3/src/test/java/io/netty/handler/codec/http3/example/Http3ServerExample.java
+++ b/netty-handler-codec-http3/src/test/java/io/netty/handler/codec/http3/example/Http3ServerExample.java
@@ -23,7 +23,7 @@ import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelInitializer;
import io.netty.channel.nio.NioEventLoopGroup;
import io.netty.channel.socket.nio.NioDatagramChannel;
-import io.netty.handler.ssl.util.SelfSignedCertificate;
+import io.netty.handler.ssl.bouncycastle.SelfSignedCertificate;
import io.netty.handler.codec.http3.DefaultHttp3DataFrame;
import io.netty.handler.codec.http3.DefaultHttp3HeadersFrame;
import io.netty.handler.codec.http3.Http3;
diff --git a/netty-handler-codec-http3/src/test/resources/cert.crt b/netty-handler-codec-http3/src/test/resources/cert.crt
new file mode 100644
index 0000000..a9842e4
--- /dev/null
+++ b/netty-handler-codec-http3/src/test/resources/cert.crt
@@ -0,0 +1,18 @@
+-----BEGIN CERTIFICATE-----
+MIIC7TCCAdUCFDuGBhl3l5Z++VCLkvaav4yteBonMA0GCSqGSIb3DQEBCwUAMEUx
+CzAJBgNVBAYTAkFVMRMwEQYDVQQIDApTb21lLVN0YXRlMSEwHwYDVQQKDBhJbnRl
+cm5ldCBXaWRnaXRzIFB0eSBMdGQwHhcNMjAwMzIzMTYwNzU0WhcNNDcwODA5MTYw
+NzU0WjAhMQswCQYDVQQGEwJHQjESMBAGA1UEAwwJcXVpYy50ZWNoMIIBIjANBgkq
+hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAz5bOL7LD9kiIagcVrZqZ13ZcR0KhMuzs
+brqULbZKyqC+uBRgINxYJ7LPnJ4LPYuCt/nAaQ7CLXfKgzAMFu8eIK6UEvZA6+7b
+20E4rvOpPbTB/T4JbYZNQKyM9AEwr6j0P6vFgrWT7aBzhkmiqEe5vv/7ZOEGb+Ab
++cvMeszfBbk93nyzKdNaUuh95x7/p0Ow315np2PRuoT0QQnA9zE/9eZ3Jah3cNZn
+NuQ6BDHlkegzTV5JhYYblRo/pmt2E9E0ha+NWsRLf3ZJUYhkYR3UqMltEKuLglCO
+VWBbPmKd4IZUNIotpKMVQSVb9agNBF49hH9iBhN3fBm7Hp8KBpjJLwIDAQABMA0G
+CSqGSIb3DQEBCwUAA4IBAQCo/Rn4spa5XFk0cCoKypP27DxePkGD9rQZk/CY4inV
+JV16anZ1pr9yfO61+m3fRKTZq7yxtHRDWxDdROHx9LqV1dXLAmh1ecV9Kn6/796O
+EHsOcVB0Lfi9Ili7//oUqlhGNploRuQbgWAXU+Eo1xJRWIXeedhzBSgEOMaQk3Zn
+TdYFhP0/Ao/fEdI4VULv1A43ztnZIB2KXWgUQoFT32woL47eWge8LxxVmmH3STtz
+nNcGnYxIorCQemDHDzMrvxRWgHxkpFGGqAhkFFyCmhKFPglKwt+yVTx26T8tShID
+ISMj0rgVMptmtWKJfzNCvFG52gsuO4w3yGdjgjRRrBDm
+-----END CERTIFICATE-----
\ No newline at end of file
diff --git a/netty-handler-codec-http3/src/test/resources/cert.key b/netty-handler-codec-http3/src/test/resources/cert.key
new file mode 100644
index 0000000..89ee3e6
--- /dev/null
+++ b/netty-handler-codec-http3/src/test/resources/cert.key
@@ -0,0 +1,28 @@
+-----BEGIN PRIVATE KEY-----
+MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEA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a0NT
+LFREdObI5HsCgYBUbm8KRyi5Zxm4VNbgtTYM8ZYMmdLxPe2i85PjyAABT+IRncuC
+jQwT7n5Swc9XWBpiMuFp5J3JPgmfZgRMwsMS61YClqbfk3Qi4FtaBMjqiu43Rubt
+zWL56DNV0xoRlufRkcq8rdq5spJR0L+5aLFCMhHh0taW1QaxZPOMq4IkyQKBgQC3
+GetubGzewqPyzuz77ri5URm+jW0dT4ofnE9hRpRCXMK9EJ52TkOGHYZ2cIKJcTno
+dpl/27Tpk/ykJJSu9SnVDbVszkOf4OuIPty6uCAHdPxG5Q3ItTCulkVz5QmUqHf1
+RlHxB8FCUSilQFdRLmx+03h3X9vID+4soQoXlwxAJQKBgE5SQpN+TG5V+E4zHgNd
+6cy6gA5dGDJ0KbsgxJwlKTFA9nIcs2ssBxLY9U4x75EGuqpeVNmq6xwwmPtBs0rp
+M3W4zdFrZQ3BneFRW7WbSBbsUSprkJW/p4GXa17GzGUq/MDXlGhNlApP1nknzFvE
+xGaH0/H/TZxpLCogVP9npUkj
+-----END PRIVATE KEY-----
\ No newline at end of file
diff --git a/netty-handler-codec-protobuf/build.gradle b/netty-handler-codec-protobuf/build.gradle
deleted file mode 100644
index 71f6f7a..0000000
--- a/netty-handler-codec-protobuf/build.gradle
+++ /dev/null
@@ -1,4 +0,0 @@
-dependencies {
- api project(':netty-handler-codec')
- implementation libs.protobuf
-}
diff --git a/netty-handler-codec-protobuf/src/main/java/io/netty/handler/codec/protobuf/ProtobufDecoder.java b/netty-handler-codec-protobuf/src/main/java/io/netty/handler/codec/protobuf/ProtobufDecoder.java
deleted file mode 100644
index 31f0376..0000000
--- a/netty-handler-codec-protobuf/src/main/java/io/netty/handler/codec/protobuf/ProtobufDecoder.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
- * Copyright 2015 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.handler.codec.protobuf;
-
-import com.google.protobuf.ExtensionRegistry;
-import com.google.protobuf.ExtensionRegistryLite;
-import com.google.protobuf.Message;
-import com.google.protobuf.MessageLite;
-import io.netty.buffer.ByteBuf;
-import io.netty.buffer.ByteBufUtil;
-import io.netty.channel.ChannelHandler.Sharable;
-import io.netty.channel.ChannelHandlerContext;
-import io.netty.channel.ChannelPipeline;
-import io.netty.handler.codec.ByteToMessageDecoder;
-import io.netty.handler.codec.LengthFieldBasedFrameDecoder;
-import io.netty.handler.codec.LengthFieldPrepender;
-import io.netty.handler.codec.MessageToMessageDecoder;
-import io.netty.util.internal.ObjectUtil;
-
-import java.util.List;
-
-/**
- * Decodes a received {@link ByteBuf} into a
- * Google Protocol Buffers
- * {@link Message} and {@link MessageLite}. Please note that this decoder must
- * be used with a proper {@link ByteToMessageDecoder} such as {@link ProtobufVarint32FrameDecoder}
- * or {@link LengthFieldBasedFrameDecoder} if you are using a stream-based
- * transport such as TCP/IP. A typical setup for TCP/IP would be:
- *
- * {@link ChannelPipeline} pipeline = ...;
- *
- * // Decoders
- * pipeline.addLast("frameDecoder",
- * new {@link LengthFieldBasedFrameDecoder}(1048576, 0, 4, 0, 4));
- * pipeline.addLast("protobufDecoder",
- * new {@link ProtobufDecoder}(MyMessage.getDefaultInstance()));
- *
- * // Encoder
- * pipeline.addLast("frameEncoder", new {@link LengthFieldPrepender}(4));
- * pipeline.addLast("protobufEncoder", new {@link ProtobufEncoder}());
- *
- * and then you can use a {@code MyMessage} instead of a {@link ByteBuf}
- * as a message:
- *
- * void channelRead({@link ChannelHandlerContext} ctx, Object msg) {
- * MyMessage req = (MyMessage) msg;
- * MyMessage res = MyMessage.newBuilder().setText(
- * "Did you say '" + req.getText() + "'?").build();
- * ch.write(res);
- * }
- *
- */
-@Sharable
-public class ProtobufDecoder extends MessageToMessageDecoder {
-
- private static final boolean HAS_PARSER;
-
- static {
- boolean hasParser = false;
- try {
- // MessageLite.getParserForType() is not available until protobuf 2.5.0.
- MessageLite.class.getDeclaredMethod("getParserForType");
- hasParser = true;
- } catch (Throwable t) {
- // Ignore
- }
-
- HAS_PARSER = hasParser;
- }
-
- private final MessageLite prototype;
- private final ExtensionRegistryLite extensionRegistry;
-
- /**
- * Creates a new instance.
- */
- public ProtobufDecoder(MessageLite prototype) {
- this(prototype, null);
- }
-
- public ProtobufDecoder(MessageLite prototype, ExtensionRegistry extensionRegistry) {
- this(prototype, (ExtensionRegistryLite) extensionRegistry);
- }
-
- public ProtobufDecoder(MessageLite prototype, ExtensionRegistryLite extensionRegistry) {
- this.prototype = ObjectUtil.checkNotNull(prototype, "prototype").getDefaultInstanceForType();
- this.extensionRegistry = extensionRegistry;
- }
-
- @Override
- protected void decode(ChannelHandlerContext ctx, ByteBuf msg, List