Sha256: 716ecd4894702228c8c35ddd677f1c5de396044912ff48dbfbf31ce36e59a26d

Contents?: true

Size: 744 Bytes

Versions: 4

Compression:

Stored size: 744 Bytes

Contents

# frozen_string_literal: true

require_relative 'em_test_helper'

class TestSSLExtensions < Test::Unit::TestCase

  require_relative 'em_ssl_handlers'
  include EMSSLHandlers

  def test_tlsext_sni_hostname_1_2
    client = { sni_hostname: 'example.com', ssl_version: %w(TLSv1_2) }
    client_server client: client
    assert Server.handshake_completed?
    assert_equal 'example.com', Server.sni_hostname
  end
  
  def test_tlsext_sni_hostname_1_3
    omit("TLSv1_3 is unavailable") unless EM.const_defined? :EM_PROTO_TLSv1_3
    client = { sni_hostname: 'example.com', ssl_version: %w(TLSv1_3) }
    client_server client: client
    assert Server.handshake_completed?
    assert_equal 'example.com', Server.sni_hostname
  end
end if EM.ssl?

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
eventmachine-mkroman-1.3.0.dev.1 tests/test_ssl_extensions.rb
wj_eventmachine-1.3.2 tests/test_ssl_extensions.rb
wj_eventmachine-1.3.1 tests/test_ssl_extensions.rb
wj_eventmachine-1.3.0.dev.1 tests/test_ssl_extensions.rb