Sha256: 65d28a82c9d0ccc91182121b47189df63590c4cd91d82c29cb9af747d518cce9

Contents?: true

Size: 775 Bytes

Versions: 4

Compression:

Stored size: 775 Bytes

Contents

# frozen_string_literal: true

require_relative 'em_test_helper'

class TestSSLMethods < Test::Unit::TestCase

  require_relative 'em_ssl_handlers'
  include EMSSLHandlers

  def test_ssl_methods
    omit_if(rbx?)

    client_server
    
    assert Server.handshake_completed?
    assert Client.handshake_completed?

    assert Server.cert_value.is_a? NilClass
    assert Client.cert_value.is_a? String

    assert Client.cipher_bits > 0
    assert_equal Client.cipher_bits, Server.cipher_bits

    assert Client.cipher_name.length > 0
    assert_match(/AES/, Client.cipher_name)
    assert_equal Client.cipher_name, Server.cipher_name

    assert Client.cipher_protocol.start_with? "TLS"
    assert_equal Client.cipher_protocol, Server.cipher_protocol
  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_methods.rb
wj_eventmachine-1.3.2 tests/test_ssl_methods.rb
wj_eventmachine-1.3.1 tests/test_ssl_methods.rb
wj_eventmachine-1.3.0.dev.1 tests/test_ssl_methods.rb