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
(cherry picked from commit 2a21b15)
  • Loading branch information
DilumAluthge authored and StefanKarpinski committed Mar 24, 2022
1 parent 41834ec commit cf7322f
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 @@ -401,9 +401,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 @@ -437,7 +438,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 cf7322f

Please sign in to comment.