[jboss-jira] [JBoss JIRA] (ELY-1667) Trace logging in SSLUtils

Darran Lofthouse (JIRA) issues at jboss.org
Thu Sep 13 11:24:01 EDT 2018


Darran Lofthouse created ELY-1667:
-------------------------------------

             Summary: Trace logging in SSLUtils
                 Key: ELY-1667
                 URL: https://issues.jboss.org/browse/ELY-1667
             Project: WildFly Elytron
          Issue Type: Bug
          Components: SSL
    Affects Versions: 1.6.0.Final
            Reporter: Martin Choma
            Assignee: Justin Cook
             Fix For: 1.6.1.Final, 1.7.0.CR1


Check Trace logging of ssl context creation. How I read code logging should apply after throw expression. That wouldn never happen. Also there is another throw of exception with SSLUtils::throwIt.
{code:java|title=org.wildfly.security.ssl.SSLUtils}
        // now return a factory that will return the best match is can create.
        final String[] supportedProtocols = protocolSelector.evaluate(preferredProviderByAlgorithm.keySet().toArray(NO_STRINGS));
        if (supportedProtocols.length > 0) {
            return () -> {
                for (String protocol : supportedProtocols) {
                    List<Provider> providerList = preferredProviderByAlgorithm.getOrDefault(protocol, Collections.emptyList());
                        for (Provider provider : providerList) {
                            try {
                                return SSLContext.getInstance(protocol, provider);
                            } catch (NoSuchAlgorithmException ignored) {}
                        }
                }
                throw ElytronMessages.log.noAlgorithmForSslProtocol();
            };
        }

        if (log.isTraceEnabled()) {
            log.tracef("No %s provided by providers in %s: %s", SERVICE_TYPE, SSLUtils.class.getSimpleName(), Arrays.toString(providerSupplier.get()));
        }

        return SSLUtils::throwIt;
{code}



--
This message was sent by Atlassian JIRA
(v7.5.0#75005)


More information about the jboss-jira mailing list