static void addServerNameIfNotSet(final SSLParameters parameters,
      final HostAndPort address) {
    final List<SNIServerName> serverNames =
        new ArrayList<>(getIfNull(parameters.getServerNames(), Collections::emptyList));

    if (serverNames.stream()
        .mapToInt(SNIServerName::getType)
        .anyMatch(type -> type == StandardConstants.SNI_HOST_NAME)) {
      // we already have a SNI hostname set. Do nothing.
      return;
    }

    serverNames.add(new SNIHostName(address.getHostName()));
    parameters.setServerNames(serverNames);
  }
When a socket is connected to a server socket, it should be passed to this method for SSL
configuration.
geode-core/src/main/java/org/apache/geode/internal/net/SocketCreator.java