diff --git a/test/Manifest.toml b/test/Manifest.toml new file mode 100644 index 000000000..be85849dd --- /dev/null +++ b/test/Manifest.toml @@ -0,0 +1,38 @@ +# This file is machine-generated - editing it directly is not advised + +julia_version = "1.9.2" +manifest_format = "2.0" +project_hash = "c63a7657042c5ce7aeccc07817619d83f316d1ed" + +[[deps.Base64]] +uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" + +[[deps.InteractiveUtils]] +deps = ["Markdown"] +uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" + +[[deps.Logging]] +uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" + +[[deps.Markdown]] +deps = ["Base64"] +uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" + +[[deps.NetworkOptions]] +uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" +version = "1.2.0" + +[[deps.Random]] +deps = ["SHA", "Serialization"] +uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" + +[[deps.SHA]] +uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" +version = "0.7.0" + +[[deps.Serialization]] +uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" + +[[deps.Test]] +deps = ["InteractiveUtils", "Logging", "Random", "Serialization"] +uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40" diff --git a/test/client.jl b/test/client.jl index f886db705..115df223e 100644 --- a/test/client.jl +++ b/test/client.jl @@ -21,6 +21,15 @@ for x in (10, 12) @test HTTP.Connections.OPENSSL_POOL[].max == x end +@testset "sslconfig without explicit socket_type_tls #1104" begin + # this was supported before 8f35185 + @test isok(HTTP.get("https://$httpbin/ip", sslconfig=MbedTLS.SSLConfig(false))) + # The OpenSSL package doesn't have enough docs, but this is a valid way to initialise an SSLContext. + @test isok(HTTP.get("https://$httpbin/ip", sslconfig=OpenSSL.SSLContext(OpenSSL.TLSClientMethod()))) + # Incompatible socket_type_tls and sslconfig should throw an error. + @test_throws ArgumentError HTTP.get("https://$httpbin/ip", sslconfig=MbedTLS.SSLConfig(false), socket_type_tls=OpenSSL.SSLStream) +end + @testset "@client macro" begin @eval module MyClient using HTTP