netty-ssl | 这个项目主要是 netty 利用 SSL 做身份认证的例子: myCa | Websocket library

 by   bingzhilanmo-bowen Java Version: Current License: No License

kandi X-RAY | netty-ssl Summary

kandi X-RAY | netty-ssl Summary

netty-ssl is a Java library typically used in Networking, Websocket applications. netty-ssl has no bugs, it has no vulnerabilities, it has build file available and it has low support. You can download it from GitHub.

这个项目主要是 netty 利用 SSL 做身份认证的例子: 是我代码中使用的证书,可解压放在 /home 下. 利用 openssl 自建证书体系 可以参考下面文档 解决 netty 不支持rsa key的问题

            kandi-support Support

              netty-ssl has a low active ecosystem.
              It has 4 star(s) with 1 fork(s). There are 1 watchers for this library.
              It had no major release in the last 6 months.
              netty-ssl has no issues reported. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of netty-ssl is current.

            kandi-Quality Quality

              netty-ssl has 0 bugs and 0 code smells.

            kandi-Security Security

              netty-ssl has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              netty-ssl code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              netty-ssl does not have a standard license declared.
              Check the repository for any license declaration and review the terms closely.
              Without a license, all rights are reserved, and you cannot use the library in your applications.

            kandi-Reuse Reuse

              netty-ssl releases are not available. You will need to build from source code and install.
              Build file is available. You can build the component from source.

            Top functions reviewed by kandi - BETA

            kandi has reviewed netty-ssl and discovered the below as its top functions. This is intended to give you an instant insight into netty-ssl implemented functionality, and help decide if they suit your requirements.
            • Creates a server
            • Creates the ssl context
            • Get input stream from file
            • Closes the given InputStream
            • Start the client
            • Connect to the client
            • Creates a client ssl context
            • Initialize the socket channel
            • Init socket channel
            • Initializes the channel to be active
            • Bind the principal to the channel
            • Initializes the channel
            • Send a message
            • Handle exception
            Get all kandi verified functions for this library.

            netty-ssl Key Features

            No Key Features are available at this moment for netty-ssl.

            netty-ssl Examples and Code Snippets

            No Code Snippets are available at this moment for netty-ssl.

            Community Discussions


            ActiveMQ Artemis unable to establish connection to Spring Boot Client
            Asked 2022-Feb-04 at 16:40

            I have ActiveMQ Artemis 2.8.1 running and get the following error when I try to connect to it using a Spring Boot application over SSL.



            Answered 2022-Feb-04 at 16:40

            There is definitely a problem with your configuration. The error message even says so:



            SSL implemented on Artemis, but clients with invalid trust stores and user credentials are able to connect to the broker
            Asked 2021-Oct-14 at 14:36

            I'm using JMS on a Spring boot client to connect to an ActiveMQ Artemis broker over SSL. The client is able to connect regardless of the validity of the certificates in the truststore and even if invalid credentials are used. How do I ensure that the broker is filtering clients out based on the configured parameters?

            The acceptors in the broker.xml are defined as show below. The SSL acceptor uses port 61617.



            Answered 2021-Oct-14 at 14:36

            Here's what got things working.

            Firstly, the login.config file on Artemis has a GuestLoginModule that this link says is chained to the PropertiesLoginModule and the guest module allows clients without credentials, or even invalid credentials to connect to the broker. Now, by default, the GuestLoginModule looks like this



            ActiveMQ Artemis prefixes "jms.topic." to all topic names defined on Spring Boot Client
            Asked 2021-Oct-14 at 12:53

            I'm using ActiveMQ Artemis 2.18.0 and version 2.5.5 of the spring-boot-starter-artemis dependency on a Spring Boot client. In my use case clients are required to communicate with each other via topics. The issue is that the string jms.topic. is getting prefixed to every topic defined on the client. For example the topic foo.sendInfo becomes

            The broker.xml file is as shown below. The acceptor used by the Spring Boot client is the netty-ssl-acceptor on port 61617.



            Answered 2021-Oct-13 at 08:24

            You have defined "anycastPrefix=jms.queue;multicastPrefix=jms.topic." in your SSL acceptor. You should remove them. Another solution is to setEnableAmq1Prefix to false on your connection factory (but i think this is the default value)



            Spring Boot 2 using Webflux, Netty and HTTP2, causing invalid certificate, possible misconfiguration
            Asked 2021-Feb-20 at 19:32

            There is not much information that I've found in terms of configuration with Netty and Webflux using HTTP2.

            I have used similiar configurations in the past without using reactor based spring boot modules, typically spring boot web. I have posted my steps below.

            The problem is SSL not working correctly with Netty. Do I require more work in terms of setup? Hoping to get some pointers or examples to understand how to confiure this correctly please.

            Generated Certificate

            • generate cert valid for local dev usage: mkcert localhost

            • output: certificate localhost+1.pem key localhost+1-key.pem

            • generate keystore with openssl: openssl pkcs12 -export -in localhost+1.pem -inkey localhost+1-key.pem -out keystore.p12 -name localdev

            Application Files




            Answered 2021-Feb-20 at 19:32

            Your application.yml file is incorrect. The ssl properties are effectively at server.server.ssl instead of server.ssl. Therefore the SSL settings have no effect and your server is an HTTP server instead of an HTTPS server. That's why curl works with http.

            To fix, remove line 6 (server:) and back indent line "ssl:" and following. This will give you (for example) server.ssl.enabled=true instead of server.server.ssl.enabled=true



            MQTT subscription queues not being cleaned up
            Asked 2021-Jan-11 at 15:46

            We're using ActiveMQ Artemis 2.8.1 with MQTT.

            We integrated ActiveMQ Artemis with Wildfly. Consider our server connects using client id SAM on 50 topics. On checking Artemis with JConsole we can see that each client subscription results in a queue whose name follows the pattern _. In my case consider topic as com/api/output which means the subscription queue name will be SAM_com/api/output. Likewise there will be 50 other subscription queues using the same naming pattern (i.e. SAM_).

            My findings

            Based on my research each queue is used to store messages sent to that topic for each client's subscription. For example, when the same topic (e.g 1/2/3) is subscribed to by 3 different clients (e.g A,B,& C) then there will be 3 subscription queues (i.e. A_1/2/3, B_1/2/3, & C_1/2/3). Therefore when a message is sent to the topic 1/2/3 Artemis will put that messages in the subscription queues A_1/2/3,B_1/2/3, C_1/2/3.

            Actual problem

            Now same client wants to connect to broker with different client id now (e.g. TOM). My Client initiates connection drop and Artemis also recognizes connection drop, then my client connects to broker with new client id (TOM) for the same 50 topics. Now there will be 100 subscription queue total with each topic having 2 (i.e. one for each clientid - SAM & TOM). I find the reason that SAM queues are maintained because while initiating the connection we use cleanSession as false. So all those subscription queues will be durable, hence the queues are maintained even if the client is disconnected.

            When a message is sent to the topic it will be put in two queues (SAM & TOM). Our client is connected to broker with client id TOM so the TOM queue has consumer which results in all the TOM queue messages being consumed by the client. However, the SAM queue accumulates messages and eats up all JVM's heapspace until the server dies.

            The purpose of durable queues is to maintain the message even when the client disconnects, but is there any way to tell ActiveMQ Artemis to purge the client's queues and messages if client doesn't show up for certain time period or to purge the messages from the client's subscription queue when client drops the connection?

            Our broker.xml



            Answered 2021-Jan-11 at 15:46

            It's really up to the subscriber to delete its subscription when it is done with it. In other words, the MQTT client should unsubscribe the existing subscriber before creating a new one. The broker has no way to know whether or not the subscriber plans to reconnect later to fetch the messages from its subscription.

            If you really want the broker to delete the subscription queue you can use the following address-settings:

            • : This must be true.
            • : This is the delay (in milliseconds) from the time the last consumer disconnects until the broker deletes the subscription queue.
            • : This must be -1 in order to ignore any messages in the subscription queue.

            To be clear, I would recommend against this configuration as the broker may inadvertently delete legitimate messages. For example, if a subscriber mistakenly disconnects (e.g. due to a network failure, hardware failure, JVM crash, etc.) for longer than the configured then the broker will delete its subscription queue and all the subscriber's messages will effectively be lost.


            Community Discussions, Code Snippets contain sources that include Stack Exchange Network


            No vulnerabilities reported

            Install netty-ssl

            You can download it from GitHub.
            You can use netty-ssl like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the netty-ssl component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer For Gradle installation, please refer .


            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
          • HTTPS


          • CLI

            gh repo clone bingzhilanmo-bowen/netty-ssl

          • sshUrl


          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular Websocket Libraries


            by netty


            by websockets


            by gorilla


            by joewalnes


            by koel

            Try Top Libraries by bingzhilanmo-bowen


            by bingzhilanmo-bowenJava


            by bingzhilanmo-bowenGo


            by bingzhilanmo-bowenJava


            by bingzhilanmo-bowenJava


            by bingzhilanmo-bowenJava