Alexander Gromnitsky's Blog

Webrick monkey patch to silence huge SSL certificate dump

Latest update:

The original is in lib/webrick/ssl.rb. This variation only modifies @logger.info line:

require 'webrick/ssl'

module WEBrick
  class GenericServer
    def ssl_context
      @ssl_context ||= begin
        if @config[:SSLEnable]
          ssl_context = setup_ssl_context(@config)
          @logger.info("SSL Cert: #{@config[:SSLCertificate].subject}")
          ssl_context
        end
      end
    end
  end
end

Tags: ойті
Authors: ag