securetransport

package
v1.2.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 2, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package securetransport wraps macOS Secure Transport.

Built only for darwin under TinyGo, or under host Go with the force_tinygo_logic tag. Elsewhere Supported reports false and the package contains no C.

Index

Constants

View Source
const ProtocolTLS12 = 8
View Source
const Supported = false

Supported reports whether this build has the backend compiled in.

Variables

This section is empty.

Functions

func Handshake

func Handshake(fd int, opt Options, timeoutNanos int64) (*Session, *Error)

Handshake always fails in this build.

Types

type Class

type Class int

Class is the coarse failure category from the C layer.

const (
	ClassOK Class = iota
	ClassAlloc
	ClassSetup
	ClassCA
	ClassClientCert
	ClassHandshake
	ClassTimeout
	ClassIO
	ClassClosed
)

type Error

type Error struct {
	Class  Class
	Status int
}

Error carries the class and the raw OSStatus.

func (*Error) Error

func (e *Error) Error() string

func (*Error) Timeout

func (e *Error) Timeout() bool

type Options

type Options struct {
	Host        string
	RootCAsDER  [][]byte
	RootCAsOnly bool
	SkipVerify  bool
}

Options mirrors the real type so callers compile everywhere.

type Session

type Session struct{}

Session is a placeholder on platforms without the backend.

func (*Session) Close

func (s *Session) Close()

func (*Session) Read

func (s *Session) Read(p []byte, timeoutNanos int64) (int, *Error)

func (*Session) Write

func (s *Session) Write(p []byte, timeoutNanos int64) (int, *Error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL