net.openssl #

Constants #

const (
	is_used = 1
)

fn new_ssl_conn #

fn new_ssl_conn() &SSLConn

new_ssl_conn instance an new SSLCon struct

fn ssl_error #

fn ssl_error(ret int, ssl voidptr) ?SSLError

ssl_error returns non error ssl code or error if unrecoverable and we should panic

enum SSLError #

enum SSLError {
	ssl_error_none = 0
	ssl_error_ssl = 1
	ssl_error_want_read = 2
	ssl_error_want_write = 3
	ssl_error_want_x509_lookup = 4
	ssl_error_syscall = 5
	ssl_error_zero_return = 6
	ssl_error_want_connect = 7
	ssl_error_want_accept = 8
	ssl_error_want_async = 9
	ssl_error_want_async_job = 10
	ssl_error_want_early = 11
}

struct C.SSL #

struct C.SSL {
}

struct OPENSSL_INIT_SETTINGS #

struct OPENSSL_INIT_SETTINGS {
}

struct SSL #

struct SSL {
}

struct SSL_CTX #

struct SSL_CTX {
}

struct SSL_METHOD #

struct SSL_METHOD {
}

struct SSLConn #

struct SSLConn {
mut:
	sslctx   &C.SSL_CTX
	ssl      &C.SSL
	handle   int
	duration time.Duration
}

SSLConn is the current connection

fn (SSLConn) shutdown #

fn (mut s SSLConn) shutdown() ?

shutdown closes the ssl connection and do clean up

fn (SSLConn) connect #

fn (mut s SSLConn) connect(mut tcp_conn net.TcpConn, hostname string) ?

connect to server using open ssl

fn (SSLConn) socket_read_into_ptr #

fn (mut s SSLConn) socket_read_into_ptr(buf_ptr &byte, len int) ?int

fn (SSLConn) read_into #

fn (mut s SSLConn) read_into(mut buffer []byte) ?int

fn (SSLConn) write #

fn (mut s SSLConn) write(bytes []byte) ?int

write number of bytes to SSL connection