Sha256: 47af66afecf315ec6062f36ee50510746d86365bfc2929c95801cc1543a4cb93

Contents?: true

Size: 1.01 KB

Versions: 14

Compression:

Stored size: 1.01 KB

Contents

require File.dirname(__FILE__) + '/../lib/yawast'
require File.dirname(__FILE__) + '/base'

class TestInternalSSL < Minitest::Test
  include TestBase

  def test_internalssl_ss_cert
    override_stdout

    uri = URI.parse 'https://self-signed.badssl.com/'
    Yawast::Scanner::Ssl.info uri, false, false

    assert stdout_value.include?('Certificate Is Self-Singed'), 'self-signed certificate warning not found'

    restore_stdout
  end

  def test_internalssl_known_suite
    override_stdout

    uri = URI.parse 'https://self-signed.badssl.com/'
    Yawast::Scanner::Ssl.info uri, true, false

    #HACK: This is an awful test, as it depends on the configuration of the server above, so could
    # easily break if they make any changes, and only tests for a single value, but it's better than nothing.
    # The other awful thing is that this is slow, and may take 60 seconds or more to complete.
    assert stdout_value.include?('Cipher: AES256-SHA'), 'known cipher suite not found in output'

    restore_stdout
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
yawast-0.6.0.beta3 test/test_internalssl.rb
yawast-0.6.0.beta2 test/test_internalssl.rb
yawast-0.6.0.beta1 test/test_internalssl.rb
yawast-0.5.2 test/test_internalssl.rb
yawast-0.5.1 test/test_internalssl.rb
yawast-0.5.1.beta1 test/test_internalssl.rb
yawast-0.5.0 test/test_internalssl.rb
yawast-0.5.0.beta8 test/test_internalssl.rb
yawast-0.5.0.beta7 test/test_internalssl.rb
yawast-0.5.0.beta6 test/test_internalssl.rb
yawast-0.5.0.beta5 test/test_internalssl.rb
yawast-0.5.0.beta4 test/test_internalssl.rb
yawast-0.5.0.beta3 test/test_internalssl.rb
yawast-0.5.0.beta2 test/test_internalssl.rb