attestedtls

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2022 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dial

func Dial(network, addr string, config *tls.Config) (*tls.Conn, error)

**********************************************************

  • tls.Dial Wrapper -> attestedtls.Dial
  • Additionally requests and then verifies the obtained Attestation Report
  • before returning the established connection.

func GetCert

func GetCert() (tls.Certificate, error)

func Listen

func Listen(network, laddr string, config *tls.Config) (net.Listener, error)

Wrapper for tls.Listen * Returns custom Listener that will perform steps to send the AR right after connection establishment

func Read

func Read(c net.Conn) ([]byte, error)

func Write

func Write(msg []byte, c net.Conn) error

Types

type Listener

type Listener struct {
	Ln net.Listener
}

Struct to implement Listener interface * holds net.Listener and adds additional functionality to its functions

func (Listener) Accept

func (ln Listener) Accept() (net.Conn, error)

Implementation of Accept() in net.Listener iface * Additionally creates AR with obtained nonce and returns it

func (Listener) Addr

func (ln Listener) Addr() net.Addr

Implementation of Addr in net.Listener iface * Only calls original Addr(), since no new functionality required

func (Listener) Close

func (ln Listener) Close() error

Implementation of Close in net.Listener iface * Only calls original Close(), since no new functionality required

type PrivateKey

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

********************************************************** * PrivateKey Wrapper Implementing crypto.Signer interface * Contacts cmcd for signing operations

func (PrivateKey) Public

func (priv PrivateKey) Public() crypto.PublicKey

func (PrivateKey) Sign

func (priv PrivateKey) Sign(random io.Reader, digest []byte, opts crypto.SignerOpts) ([]byte, error)

Implementation of Sign() in crypto.Signer iface * Contacts cmcd for sign operation

Jump to

Keyboard shortcuts

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