Browse Source

add sni support

master
nixo 2 years ago
parent
commit
ee83c67479
  1. 7
      src/ssl.jl

7
src/ssl.jl

@ -37,3 +37,10 @@ shutdown(client::SSLClient) =
ccall((:SSL_shutdown, libssl), Cint, (Ptr{Cvoid},), client.ssl)
free(client::SSLClient) = ccall((:SSL_free, libssl), Cint, (Ptr{Cvoid},), client.ssl)
const TLSEXT_NAMETYPE_host_name = 0
set_host_name(client::SSLClient, name::String) =
ccall((:SSL_ctrl, libssl), Cint, (Ptr{Cvoid}, Cint, Cint, Cstring),
client.ssl, SSL_CTRL_SET_TLSEXT_HOSTNAME, TLSEXT_NAMETYPE_host_name, name)

Loading…
Cancel
Save