Moquette-Broker with BouncyCastle-TLS

时间:2018-03-25 20:12:32

标签: java mqtt bouncycastle moquette

I would like to know if there is a way to configure the Moquette-Broker to setup the TLS-Connection using the BouncyCastle-Library? I need to implement the TLS-Connection-Setup with BouncyCastle because of the different configuration options.

1 个答案:

答案 0 :(得分:0)

默认情况下,moquette支持密钥库和信任库配置。如果你真的需要使用BouncyCastle,我认为你应该覆盖默认实现。 Thi NettyAcceptor.java类可以提供帮助,因为它包含管道定义。我认为自己创建的sslContext只需要放在管道中的第一个位置(类似于pipeline.addFirst(mySslContext)

https://github.com/andsel/moquette/blob/2fb475ae95989e7abc418dffbdd9104c818302bb/broker/src/main/java/io/moquette/server/netty/NettyAcceptor.java