Sha256: 4959b9b6d4c40dd7718e71cabdca03867947e0668cc19db1253d7826c4071c73

Contents?: true

Size: 1.01 KB

Versions: 4

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

4 entries across 4 versions & 1 rubygems

Version Path
yawast-0.6.0 test/test_internalssl.rb
yawast-0.6.0.beta6 test/test_internalssl.rb
yawast-0.6.0.beta5 test/test_internalssl.rb
yawast-0.6.0.beta4 test/test_internalssl.rb