Skip to content

Commit

Permalink
Use our own custom badssl.julialang.org implementation (#178)
Browse files Browse the repository at this point in the history
  • Loading branch information
DilumAluthge authored Feb 12, 2022
1 parent a41840c commit 2a21b15
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -468,9 +468,10 @@ include("setup.jl")
delete!(ENV, "JULIA_SSL_NO_VERIFY_HOSTS")

@testset "bad TLS" begin
badssl = "badssl.julialang.org"
urls = [
"https://untrusted-root.badssl.com"
"https://wrong.host.badssl.com"
"https://untrusted-root.$(badssl)"
"https://wrong.host.$(badssl)"
]
@testset "bad TLS is rejected" for url in urls
resp = request(url, throw=false)
Expand Down Expand Up @@ -504,7 +505,7 @@ include("setup.jl")
Downloads.DOWNLOADER[] = nothing
Downloads.EASY_HOOK[] = nothing
end
ENV["JULIA_SSL_NO_VERIFY_HOSTS"] = "**.badssl.com"
ENV["JULIA_SSL_NO_VERIFY_HOSTS"] = "**.$(badssl)"
# wrong host *should* still fail, but may not due
# to libcurl bugs when using non-OpenSSL backends:
pop!(urls) # <= skip wrong host URL entirely here
Expand Down

0 comments on commit 2a21b15

Please sign in to comment.