21
1
Fork 0
mirror of https://github.com/Evolix/chexpire.git synced 2024-04-30 07:50:49 +02:00

SSL: disable hostname matching verification

This commit is contained in:
Colin Darie 2018-07-05 16:04:35 +02:00
parent 4351f2ca5f
commit 663b2de177
No known key found for this signature in database
GPG key ID: 4FB865FDBCA4BCC4
2 changed files with 9 additions and 7 deletions

View file

@ -17,7 +17,7 @@ module SSL
end end
def parse(raw) def parse(raw)
fail DomainNotMatchError unless match_domain?(raw) # fail DomainNotMatchError unless match_domain?(raw) # currently disabled
match = raw.match(DATE_REGEX) match = raw.match(DATE_REGEX)

View file

@ -24,13 +24,15 @@ module SSL
assert response.expire_at.utc? assert response.expire_at.utc?
end end
test "should raises DomainNotMatchError when parsed text does not match the domain" do # test "should raises DomainNotMatchError when parsed text does not match the domain" do
parser = Parser.new("anotherdomain.fr") # parser = Parser.new("anotherdomain.fr")
output = file_fixture("ssl/ssl1.domain.org.txt").read # output = file_fixture("ssl/ssl1.domain.org.txt").read
#
# assert_raises DomainNotMatchError do
# parser.parse(output)
# end
# end
assert_raises DomainNotMatchError do
parser.parse(output)
end
test "should accept responses for wildcard certificates" do test "should accept responses for wildcard certificates" do
parser = Parser.new("ssl1.domain.org") parser = Parser.new("ssl1.domain.org")
output = file_fixture("ssl/wildcard.domain.org.txt").read output = file_fixture("ssl/wildcard.domain.org.txt").read