Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

function Base.write(io::IO, evp_pkey::EvpPKey is broken #26

Open
grlap opened this issue May 10, 2023 · 1 comment
Open

function Base.write(io::IO, evp_pkey::EvpPKey is broken #26

grlap opened this issue May 10, 2023 · 1 comment

Comments

@grlap
Copy link
Contributor

grlap commented May 10, 2023

I guess that is why we have this weird workaround:
port, server = Sockets.listenany(10000)
iob = connect(port)
sob = accept(server)
local cert_pem
try
write(iob, x509_certificate)
cert_pem = String(readavailable(sob))
finally
close(iob)
close(sob)
close(server)
end

instead of doing this
private_key_io = IOBuffer()
write(private_key_io, evp_pkey)

public_key_io = IOBuffer()
write(public_key_io, x509_certificate)
@grlap
Copy link
Contributor Author

grlap commented May 10, 2023

function on_bio_stream_write(bio::BIO, in::Ptr{Cchar}, inlen::Cint)::Cint
try
io = bio_get_data(bio)::TCPSocket

@quinnj : Is TCP socket really required here, IO is not good enough ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant