bssl

package
v0.0.0-...-fb56281 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2026 License: MIT Imports: 17 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	OK         int32 = 0
	WantRead   int32 = -1
	WantWrite  int32 = -2
	WantVerify int32 = -3
	ErrFatal   int32 = -4
)

Return codes mirroring native/chrome_tls.h.

View Source
const (
	FlagNoPostQuantum uint32 = 1 << 0
	FlagNoALPS        uint32 = 1 << 1
	FlagNoECHGrease   uint32 = 1 << 2
	FlagNoPermuteExt  uint32 = 1 << 3
	FlagSkipVerify    uint32 = 1 << 4
	FlagTLS13Only     uint32 = 1 << 5
	FlagUseOldALPS    uint32 = 1 << 6
)

Flags mirroring native/chrome_tls.h.

Variables

This section is empty.

Functions

This section is empty.

Types

type Lib

type Lib struct {
	// contains filtered or unexported fields
}

Lib holds the dynamically loaded chrome_tls C ABI function pointers.

func Load

func Load(path string) (*Lib, error)

Load opens libchrometls at the given path (or auto-discovers it when path is empty). Successful auto-discovery is cached for the life of the process.

func (*Lib) ConnBioPending

func (l *Lib) ConnBioPending(conn uintptr) int32

func (*Lib) ConnBioRead

func (l *Lib) ConnBioRead(conn uintptr, wireOut []byte) int32

func (*Lib) ConnBioWrite

func (l *Lib) ConnBioWrite(conn uintptr, wireIn []byte) int32

func (*Lib) ConnCipherID

func (l *Lib) ConnCipherID(conn uintptr) uint16

func (*Lib) ConnDidResume

func (l *Lib) ConnDidResume(conn uintptr) bool

func (*Lib) ConnFree

func (l *Lib) ConnFree(conn uintptr)

func (*Lib) ConnGetALPN

func (l *Lib) ConnGetALPN(conn uintptr) string

func (*Lib) ConnGetPeerCerts

func (l *Lib) ConnGetPeerCerts(conn uintptr) ([][]byte, error)

func (*Lib) ConnHandshake

func (l *Lib) ConnHandshake(conn uintptr) int32

func (*Lib) ConnLastError

func (l *Lib) ConnLastError(conn uintptr) string

func (*Lib) ConnNew

func (l *Lib) ConnNew(ctx uintptr, sni string, alpnWire []byte, flags uint32) uintptr

func (*Lib) ConnRead

func (l *Lib) ConnRead(conn uintptr, plainOut []byte) int32

func (*Lib) ConnReadIO

func (l *Lib) ConnReadIO(conn uintptr, wireIn, plainOut []byte) (int32, int32, bool, bool)

func (*Lib) ConnSetECHConfig

func (l *Lib) ConnSetECHConfig(conn uintptr, ech []byte) int32

func (*Lib) ConnSetSession

func (l *Lib) ConnSetSession(conn uintptr, data []byte) int32

func (*Lib) ConnSetTrustAnchors

func (l *Lib) ConnSetTrustAnchors(conn uintptr, data []byte) int32

func (*Lib) ConnSetVerifyResult

func (l *Lib) ConnSetVerifyResult(conn uintptr, ok bool, alertCode uint8)

func (*Lib) ConnShutdown

func (l *Lib) ConnShutdown(conn uintptr) int32

func (*Lib) ConnTakeSession

func (l *Lib) ConnTakeSession(conn uintptr) []byte

func (*Lib) ConnVersion

func (l *Lib) ConnVersion(conn uintptr) uint16

func (*Lib) ConnWrite

func (l *Lib) ConnWrite(conn uintptr, plainIn []byte) int32

func (*Lib) ConnWriteBio

func (l *Lib) ConnWriteBio(conn uintptr, plainIn, wireOut []byte) (int32, []byte)

func (*Lib) CtxFree

func (l *Lib) CtxFree(ctx uintptr)

func (*Lib) CtxNew

func (l *Lib) CtxNew() uintptr

func (*Lib) SupportsConnReadIO

func (l *Lib) SupportsConnReadIO() bool

func (*Lib) SupportsConnWriteBio

func (l *Lib) SupportsConnWriteBio() bool

Jump to

Keyboard shortcuts

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