add sni support (requires latest OpenSSL)
This commit is contained in:
parent
e0c52b3c86
commit
7a2e06129d
|
@ -1,5 +1,6 @@
|
|||
import Base.get
|
||||
function get(request::Request; certs::Union{CAChain,Nothing} = nothing)
|
||||
function get(request::Request; certs::Union{CAChain,Nothing} = nothing,
|
||||
sni = true)
|
||||
req = string(request)
|
||||
let len = sizeof(req)
|
||||
if len > 1024
|
||||
|
@ -15,6 +16,8 @@ function get(request::Request; certs::Union{CAChain,Nothing} = nothing)
|
|||
io = Sockets.connect(request.host, request.port)
|
||||
|
||||
client = SSLClient(ctx, io)
|
||||
sni && @show OpenSSL.set_host_name(client, request.host)
|
||||
|
||||
OpenSSL.do_ssl_handshake(client)
|
||||
|
||||
while true
|
||||
|
|
Loading…
Reference in New Issue