|
|
|
@ -31,10 +31,12 @@ function bio_write!(client::SSLClient, data) |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
function bio_read(client::SSLClient) |
|
|
|
|
buff = Vector{UInt8}(undef, 64) |
|
|
|
|
buff_length = 64 |
|
|
|
|
buff = Vector{UInt8}(undef, buff_length) |
|
|
|
|
n = ccall((:BIO_read, libssl), Cint, (Ptr{Cvoid},Ptr{Cvoid},Cint), |
|
|
|
|
client.wbio, buff, length(buff)) |
|
|
|
|
n, n > 0 ? buff[1:n] : buff |
|
|
|
|
client.wbio, buff, buff_length) |
|
|
|
|
n > 0 && splice!(buff, (n+1):buff_length) |
|
|
|
|
n, buff |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
bio_test_flags(bio, flags) = |
|
|
|
|