use of org.apache.activemq.transport.tcp.StubSSLServerSocket in project activemq-artemis by apache.
the class JaasDualAuthenticationBrokerTest method setUp.
@Override
protected void setUp() throws Exception {
receiveBroker = new StubBroker();
authBroker = new JaasDualAuthenticationBroker(receiveBroker, "activemq-domain", "activemq-ssl-domain");
connectionContext = new ConnectionContext();
SSLServerSocket sslServerSocket = new StubSSLServerSocket();
StubSSLSocketFactory socketFactory = new StubSSLSocketFactory(sslServerSocket);
try {
sslTransportServer = new SslTransportServer(null, new URI("ssl://localhost:61616?needClientAuth=true"), socketFactory);
} catch (Exception e) {
fail("Unable to create SslTransportServer.");
}
sslTransportServer.setNeedClientAuth(true);
sslTransportServer.bind();
try {
nonSslTransportServer = new TcpTransportServer(null, new URI("tcp://localhost:61613"), socketFactory);
} catch (Exception e) {
fail("Unable to create TcpTransportServer.");
}
connectionInfo = new ConnectionInfo();
createLoginConfig();
}
Aggregations