Home / Function/ defaultProtocols() — netty Function Reference

defaultProtocols() — netty Function Reference

Architecture documentation for the defaultProtocols() function in JdkSslContext.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  c06a4c54_3aed_2107_6854_defd58ec014b["defaultProtocols()"]
  3d4632d0_2f31_c47f_5ff2_913e505ddf39["JdkSslContext"]
  c06a4c54_3aed_2107_6854_defd58ec014b -->|defined in| 3d4632d0_2f31_c47f_5ff2_913e505ddf39
  72fd56fa_278f_1c21_43ff_0abc25ab65d4["JdkSslContext()"]
  72fd56fa_278f_1c21_43ff_0abc25ab65d4 -->|calls| c06a4c54_3aed_2107_6854_defd58ec014b
  91c2cc55_5baf_f1e1_9478_d01f7eefe9fd["init()"]
  91c2cc55_5baf_f1e1_9478_d01f7eefe9fd -->|calls| c06a4c54_3aed_2107_6854_defd58ec014b
  style c06a4c54_3aed_2107_6854_defd58ec014b fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

handler/src/main/java/io/netty/handler/ssl/JdkSslContext.java lines 124–139

    private static String[] defaultProtocols(SSLContext context, SSLEngine engine) {
        // Choose the sensible default list of protocols that respects JDK flags, eg. jdk.tls.client.protocols
        final String[] supportedProtocols = context.getDefaultSSLParameters().getProtocols();
        Set<String> supportedProtocolsSet = new HashSet<String>(supportedProtocols.length);
        Collections.addAll(supportedProtocolsSet, supportedProtocols);
        List<String> protocols = new ArrayList<String>();
        addIfSupported(
                supportedProtocolsSet, protocols,
                SslProtocols.TLS_v1_3, SslProtocols.TLS_v1_2,
                SslProtocols.TLS_v1_1, SslProtocols.TLS_v1);

        if (!protocols.isEmpty()) {
            return protocols.toArray(EmptyArrays.EMPTY_STRINGS);
        }
        return engine.getEnabledProtocols();
    }

Domain

Subdomains

Frequently Asked Questions

What does defaultProtocols() do?
defaultProtocols() is a function in the netty codebase, defined in handler/src/main/java/io/netty/handler/ssl/JdkSslContext.java.
Where is defaultProtocols() defined?
defaultProtocols() is defined in handler/src/main/java/io/netty/handler/ssl/JdkSslContext.java at line 124.
What calls defaultProtocols()?
defaultProtocols() is called by 2 function(s): JdkSslContext, init.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free