conpass

package module
v0.0.0-...-e6529c4 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

README

CONPASS for SCION

This repository provides a Go package that SCION applications can use to leverage the CONPASS protocol for their communication.

The code can be tested by running go test in the repository root.

Examples on how to implement a CONPASS initiator (client) or responder (server) are provided in the example directory. Running a CONPASS initiator usually requires SCION connectivity, e.g., through a SCIONLab VM. Running a responder does not require SCION connectivity.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Initiator

type Initiator struct {
	// InitialSegset is the set of segments that is initially available to the
	// Initiator. It may be the result of querying the SCION daemon or it can
	// be set manually for testing, e.g., when no SCION daemon is available.
	InitialSegset segment.SegmentSet
	// Filter is the segment filter according to which the Initiator gives
	// consent to certain segments or combinations of segments.
	Filter segment.Filter
	// Verbose is a flag which makes the Initiator more verbose if true.
	Verbose bool
}

Initiator represents a CONPASS agent in the initiator role.

func (Initiator) NegotiateOver

func (agent Initiator) NegotiateOver(stream io.ReadWriter) (segment.SegmentSet, error)

NegotiateOver makes the Initiator negotiate consent over a given bytestream. If the negotiation is successful, the method returns the set of segments that have bilateral consent. Otherwise, an error is returned.

type Responder

type Responder struct {
	// Filter is the segment filter according to which the Responder gives
	// consent to certain segments or combinations of segments.
	Filter segment.Filter
	// Verbose is a flag which makes the Responder more verbose if true.
	Verbose bool
}

Responder represents a CONPASS agent in the responder role.

func (Responder) NegotiateOver

func (agent Responder) NegotiateOver(stream io.ReadWriter) (segment.SegmentSet, error)

NegotiateOver makes the Responder negotiate consent over a given bytestream. If the negotiation is successful, the method returns the set of segments that have bilateral consent. Otherwise, an error is returned.

Directories

Path Synopsis
benchmarks

Jump to

Keyboard shortcuts

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