code: public static void configureTls(ServerBuilder sb, Ssl ssl,
                                      @Nullable Supplier<KeyStore> keyStoreSupplier,
                                      @Nullable Supplier<KeyStore> trustStoreSupplier) {
          if (!ssl.isEnabled()) {
              return;
          }
          try {
              if (keyStoreSupplier == null && trustStoreSupplier == null &&
                  ssl.getKeyStore() == null && ssl.getTrustStore() == null) {
                  logger.warn("Configuring TLS with a self-signed certificate " +
                              "because no key or trust store was specified");
                  sb.tlsSelfSigned();
                  return;
              }
  
              final KeyManagerFactory keyManagerFactory = getKeyManagerFactory(ssl, keyStoreSupplier);
              final TrustManagerFactory trustManagerFactory = getTrustManagerFactory(ssl, trustStoreSupplier);
  
              sb.tls(keyManagerFactory, sslContextBuilder -> {
                  sslContextBuilder.trustManager(trustManagerFactory);
  
                  final SslProvider sslProvider = ssl.getProvider();
                  if (sslProvider != null) {
                      sslContextBuilder.sslProvider(sslProvider);
                  }
                  final List<String> enabledProtocols = ssl.getEnabledProtocols();
                  if (enabledProtocols != null) {
                      sslContextBuilder.protocols(enabledProtocols.toArray(new String[enabledProtocols.size()]));
                  }
                  final List<String> ciphers = ssl.getCiphers();
                  if (ciphers != null) {
                      sslContextBuilder.ciphers(ImmutableList.copyOf(ciphers),
                                                SupportedCipherSuiteFilter.INSTANCE);
                  }
                  final ClientAuth clientAuth = ssl.getClientAuth();
                  if (clientAuth != null) {
                      sslContextBuilder.clientAuth(clientAuth);
                  }
              });
          } catch (Exception e) {
              throw new IllegalStateException("Failed to configure TLS: " + e, e);
          }
      }
docs: Adds SSL/TLS context to the specified {@link ServerBuilder}.