sebthom commented on a change in pull request #3456: URL: https://github.com/apache/activemq-artemis/pull/3456#discussion_r577532185
########## File path: artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/ssl/DefaultOpenSSLContextFactory.java ########## @@ -0,0 +1,95 @@ +/* + * Copyright 2021 The Apache Software Foundation. + * + * Licensed 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 + * + * http://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 org.apache.activemq.artemis.core.remoting.impl.ssl; + +import java.util.Map; + +import org.apache.activemq.artemis.core.remoting.impl.netty.NettyConnector; +import org.apache.activemq.artemis.core.remoting.impl.netty.TransportConstants; +import org.apache.activemq.artemis.spi.core.remoting.ssl.OpenSSLContextFactory; + +import io.netty.handler.ssl.SslContext; + +/** + * Default {@link OpenSSLContextFactory} for use in {@link NettyConnector} and NettyAcceptor. + */ +public class DefaultOpenSSLContextFactory implements OpenSSLContextFactory { + + protected SSLSupport createSSLSupport(final Map<String, Object> config, + final String keystoreProvider, final String keystorePath, final String keystorePassword, Review comment: In the same go I would also like to remove of the confusing SSL_CONTEXT_PROP_NAME "sslContext" property as it's usage does not seem to make much sense. Why would a caching SSL context factory be adviced to always return the same SSL context no matter the given input parameters (keystore/truststore etc) (which is currently how it is implemented in [CachingSSLContextFactory](https://github.com/apache/activemq-artemis/blob/master/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/ssl/CachingSSLContextFactory.java#L48)). @clebertsuconic WDYT? ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
