[
https://issues.apache.org/jira/browse/ARTEMIS-590?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15346302#comment-15346302
]
Dominique Toupin commented on ARTEMIS-590:
------------------------------------------
I would say that, at least in my case, the useDefaultSSLContext constant should
be considered in priority as this clearly indicates which SSL Context should be
used while the existing keystore-related constants indicate what should be used
to build the SSL Context.
Therefore, I agree that both set of directives are mutually exclusive since you
should not overwrite the keystore-related configuration of a given (previously
initialized) SSL Context (although I believe you can...) and I believe it would
be wise to honor first a directive specifying which SSL Context to use and if,
none are provided, to then honor keystore-related directives to build a new one.
> Allow NettyConnector to use the default SSL Context
> ---------------------------------------------------
>
> Key: ARTEMIS-590
> URL: https://issues.apache.org/jira/browse/ARTEMIS-590
> Project: ActiveMQ Artemis
> Issue Type: Improvement
> Reporter: Dominique Toupin
> Assignee: Justin Bertram
> Priority: Minor
> Original Estimate: 2h
> Remaining Estimate: 2h
>
> It would be nice if NettyConnector was able to use the "default" SSL Context
> (SSLContext.getDefault()) as the client might already have defined it...
> I believe all it takes is a new system property (e.g.
> org.apache.activemq.ssl.useDefaultSSLContext) and the addition of an if in
> NettyConnector.java where the SSL Context would otherwise be created using
> the other org.apache.activemq.ssl.* properties
> e.g.
> {code:java}
> @@ -396,11 +395,7 @@ public class NettyConnector extends AbstractConnector {
> final SSLContext context;
> if (sslEnabled) {
> try {
> + if
> (System.getProperty(ACTIVEMQ_USE_DEFAULT_SSL_CONTEXT_PROP_NAME) != null)
> + context = SSLContext.getDefault();
> + else {
> // HORNETQ-680 - override the server-side config if
> client-side system properties are set
> String realKeyStorePath = keyStorePath;
> String realKeyStoreProvider = keyStoreProvider;
> String realKeyStorePassword = keyStorePassword;
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)