You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: server_base.rb
    path of file: ./repos/macaw_framework/lib/macaw_framework/core/common
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

require_relative "../../middlewares/memory_invalidation_middleware"
require_relative "../../middlewares/rate_limiter_middleware"
require_relative "../../data_filters/response_data_filter"
require_relative "../../errors/too_many_requests_error"
require_relative "../../utils/supported_ssl_versions"
require_relative "../../aspects/prometheus_aspect"
require_relative "../../aspects/logging_aspect"
require_relative "../../aspects/cache_aspect"

##
# Base module for Server classes. It contains
# methods for client handling, error handling,
# set features and eve
    
  def set_ssl
    ssl_config = @macaw.config["macaw"]["ssl"] if @macaw.config&.dig("macaw", "ssl")
    ssl_config ||= nil
    unless ssl_config.nil?
      version_config = { min: ssl_config["min"], max: ssl_config["max"] }
      @context = OpenSSL::SSL::SSLContext.new
      @context.min_version = SupportedSSLVersions::VERSIONS[version_config[:min]] unless version_config[:min].nil?
      @context.max_version = SupportedSSLVersions::VERSIONS[version_config[:max]] unless version_config[:max].nil?
      @context.cert = OpenSSL::X509::Certificate.new(File.read(ssl_config["cert_file_name"]))

      if ssl_config["key_type"] == "RSA" || ssl_config["key_type"].nil?
        @context.key = OpenSSL::PKey::RSA.new(File.read(ssl_config["key_file_name"]))
      elsif ssl_config["key_type"] == "EC"
        @context.key = OpenSSL::PKey::EC.new(File.read(ssl_config["key_file_name"]))
      else
        raise ArgumentError, "Unsupported SSL/TLS key type: #{ssl_config["key_type"]}"
      end