You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Export the sslHandle field of sockets in net and asyncnet respectively,
just like SslContext exports context.
Description
Currently, the only way of using libssl procedures that take an ssl handle as a parameter(be them from openssl or imported through FFI separately) is by either rewritting the socket wrapping procedure or include-ing net or asyncnet, both of which being quite overkill for achieving simple tasks, even calling simple procedures from the stdlib openssl such as SSL_get_error or SSL_get_peer_certificate.
The SslContext itself allows us to access the low-level context, why shouldn't Socket?
Alternatives
One could add the needed procedures to the nim openssl, but then comes the problem if it is actually needed, or if it keeps
compatibility with the rest, making development of both openssl and the program itself harder.
Summary
Export the
sslHandle
field of sockets innet
andasyncnet
respectively,just like
SslContext
exportscontext
.Description
Currently, the only way of using libssl procedures that take an ssl handle as a parameter(be them from
openssl
or imported through FFI separately) is by either rewritting the socket wrapping procedure orinclude
-ingnet
orasyncnet
, both of which being quite overkill for achieving simple tasks, even calling simple procedures from the stdlibopenssl
such as SSL_get_error or SSL_get_peer_certificate.The
SslContext
itself allows us to access the low-levelcontext
, why shouldn'tSocket
?Alternatives
One could add the needed procedures to the nim openssl, but then comes the problem if it is actually needed, or if it keeps
compatibility with the rest, making development of both
openssl
and the program itself harder.Additional Information
This problem can be seen discussed here
The text was updated successfully, but these errors were encountered: