Compare commits

...

2 Commits
v0.1 ... master

Author SHA1 Message Date
nixo 619a2d6015 Fix couple of return types 2021-02-04 02:37:29 +01:00
nixo 008b3da487 fix memory leak 2021-02-04 02:37:09 +01:00
3 changed files with 3 additions and 2 deletions

View File

@ -42,6 +42,7 @@ import Base.close
function close(client::SSLClient)
closed = do_ssl_shutdown(client)
close(client.sock)
free(client.context)
free(client)
end

View File

@ -21,7 +21,7 @@ bio_new() = bio_new(s_mem())
function set_bio!(client::SSLClient, rbio, wbio)
client.rbio = rbio
client.wbio = wbio
ccall((:SSL_set_bio, libssl), Ptr{Cvoid}, (Ptr{Cvoid},Ptr{Cvoid},Ptr{Cvoid}),
ccall((:SSL_set_bio, libssl), Cvoid, (Ptr{Cvoid},Ptr{Cvoid},Ptr{Cvoid}),
client.ssl, rbio, wbio)
end

View File

@ -1,5 +1,5 @@
function set_options!(ctx::SSLContext, options::UInt32)
ccall((:SSL_CTX_set_options, libssl), Ptr{Cvoid}, (Ptr{Cvoid}, Clong),
ccall((:SSL_CTX_set_options, libssl), Clong, (Ptr{Cvoid}, Clong),
ctx.ptr, options)
nothing
end