Esempio n. 1
0
func newSSL(ctx *C.SSL_CTX) (*C.SSL, error) {
	runtime.LockOSThread()
	defer runtime.UnlockOSThread()
	ssl := C.SSL_new(ctx)
	if ssl == nil {
		return nil, errorFromErrorQueue()
	}
	return ssl, nil
}
Esempio n. 2
0
func NewSSL(context *Context) *SSL {
	ssl := &SSL{C.SSL_new(context.Ctx)}
	return ssl
}