|
|
|
@ -15,19 +15,19 @@ class SecurityTest < Minitest::Test
|
|
|
|
|
def test_certificate
|
|
|
|
|
output = `#{check_ssl_cert_cmd(domain)}`
|
|
|
|
|
|
|
|
|
|
assert_match /\ASSL_CERT OK/, output, output
|
|
|
|
|
assert_match(/\ASSL_CERT OK/, output, output)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def test_accepts_tls_v1
|
|
|
|
|
output = `#{openssl_verify_cmd(domain, "-tls1")}`
|
|
|
|
|
|
|
|
|
|
assert_match /Verify return code: 0 \(ok\)/, output, "Expected to accept TLSv1"
|
|
|
|
|
assert_match(/Verify return code: 0 \(ok\)/, output, "Expected to accept TLSv1")
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def test_refuse_ssl_v3
|
|
|
|
|
output = `#{openssl_verify_cmd(domain, "-ssl3")}`
|
|
|
|
|
|
|
|
|
|
assert_match /sslv3 alert handshake failure/, output, "Expected to refuse SSLv3"
|
|
|
|
|
assert_match(/sslv3 alert handshake failure/, output, "Expected to refuse SSLv3")
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def test_hsts_header
|
|
|
|
|